diff --git a/.env.example b/.env.example index f0a5296c..6964ddb2 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,9 @@ -DB_CONNECTION_STRING=mongodb://localhost:27017/api +DB_CONNECTION_STRING=mongodb://localhost:27017 +DB_NAME=api +DB_USERNAME=admin +DB_PASSWORD=secret + TOKEN_SECRET=1fdd5ab2823e118ee997219330c7abc37a56a5093b753b545ab40e5f216491eec5d400f121e678d6c5b03b01f2e56e1fd14b79afd5c0fdd61477ce469472a8a6 GCLOUD_SECRET=1f123ce56aeec5d400b2823e7abc121e6756e1f4b118ee + VOUCHERS_BUCKET="vouchers-upload-images-bucket" diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..6b00b5a8 --- /dev/null +++ b/.envrc @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +PROJECT_DIR="$(pwd)" + +PATH_add "${PROJECT_DIR}" +PATH_add "${PROJECT_DIR}"/node_modules/.bin +PATH_add "${PROJECT_DIR}"/vendor/**/bin diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..ab8bf7e2 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,28 @@ +{ + "extends": [ + "eslint:recommended", + "plugin:import/errors", + "plugin:import/warnings", + "prettier" + ], + "plugins": [ + "import" + ], + "env": { + "node": true, + "es6": true, + "commonjs": true, + "mocha": true + }, + "parserOptions": { + "ecmaVersion": 9 + }, + "rules": { + "import/no-unresolved": [ + 2, + { + "commonjs": true + } + ] + } +} \ No newline at end of file diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes new file mode 100644 index 00000000..665b10e8 --- /dev/null +++ b/.git-crypt/.gitattributes @@ -0,0 +1,4 @@ +# Do not edit this file. To specify the files to encrypt, create your own +# .gitattributes file in the directory where your files are. +* !filter !diff +*.gpg binary diff --git a/.git-crypt/keys/default/0/04ED20CFC7112DE4E6C4070CED0E3AA9A664E742.gpg b/.git-crypt/keys/default/0/04ED20CFC7112DE4E6C4070CED0E3AA9A664E742.gpg new file mode 100644 index 00000000..33fd86c8 Binary files /dev/null and b/.git-crypt/keys/default/0/04ED20CFC7112DE4E6C4070CED0E3AA9A664E742.gpg differ diff --git a/.git-crypt/keys/default/0/41D2606F66C3FF28874362B61A16916844CE9D82.gpg b/.git-crypt/keys/default/0/41D2606F66C3FF28874362B61A16916844CE9D82.gpg new file mode 100644 index 00000000..15900f75 Binary files /dev/null and b/.git-crypt/keys/default/0/41D2606F66C3FF28874362B61A16916844CE9D82.gpg differ diff --git a/.git-crypt/keys/default/0/B14145CFE7938B456B337E514F2AE1DED258B20E.gpg b/.git-crypt/keys/default/0/B14145CFE7938B456B337E514F2AE1DED258B20E.gpg new file mode 100644 index 00000000..6dab001c Binary files /dev/null and b/.git-crypt/keys/default/0/B14145CFE7938B456B337E514F2AE1DED258B20E.gpg differ diff --git a/.git-crypt/keys/default/0/CF76184B551B037240C4D457AFD792BACA20583D.gpg b/.git-crypt/keys/default/0/CF76184B551B037240C4D457AFD792BACA20583D.gpg new file mode 100644 index 00000000..764c1830 Binary files /dev/null and b/.git-crypt/keys/default/0/CF76184B551B037240C4D457AFD792BACA20583D.gpg differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..986e6e4e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +config/secrets/** filter=git-crypt diff=git-crypt +*.sol linguist-language=Solidity diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..55546479 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +# These are the default owners of the repo +* @bosonprotocol/code-reviewers + +# Anything else added after this line will take precedence diff --git a/.github/workflows/deploy-demo.yaml b/.github/workflows/deploy-demo.yaml new file mode 100644 index 00000000..90cbe1d7 --- /dev/null +++ b/.github/workflows/deploy-demo.yaml @@ -0,0 +1,35 @@ +name: Demo Branch Backend Build and Deploy to GAE +on: + push: + branches: + - demo +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [10.x] + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: build backend + run: | + npm install + - uses: actions-hub/gcloud@master + name: copy environment variables + env: + PROJECT_ID: ${{secrets.APP_ENGINE_PROJECT_ID_DEV}} + APPLICATION_CREDENTIALS: ${{secrets.APP_ENGINE_CONFIG_DEV}} + CLI: gsutil + with: + args: cp gs://boson-variables-dev/demo/.env . + - uses: actions-hub/gcloud@master + name: deploy service + env: + PROJECT_ID: ${{secrets.APP_ENGINE_PROJECT_ID_DEV}} + APPLICATION_CREDENTIALS: ${{secrets.APP_ENGINE_CONFIG_DEV}} + with: + args: app deploy app-demo.yaml diff --git a/.gitignore b/.gitignore index 57d8d11b..9432f1a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,31 @@ -.env +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# Node / NPM / Yarn +node_modules + +# Build +/local +/build +/run +/vendor + +# Secrets +.secret +**/.env .env.prod -/node_modules/ -package-lock.json + +# OS .DS_Store -yarn.lock -/tests -.idea +# IntelliJ IDEA +*.iml +*.iws +*.ipr +.idea/ + +# Test Coverage +/coverage* +.nyc_output + +# Personal Preferences +.vscode diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..4a411670 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +12.20.0 diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..fbafd6b6 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.7.2 \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 00000000..518f1217 --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,12 @@ +# Contributors + +These people have contributed commits to this project. Other developers have also worked on this project and contributed in other ways, such as design, product management, or tech writing. If you think someone should be here who isn't, please add them! + +This list was automatically seeded by running [`git authors`](https://github.com/tj/git-extras/blob/master/Commands.md#git-authors). + +- HristiyanG +- George Spasov +- Vladislav Ivanov +- Aneta +- Richard Littauer +- thecryptofruit diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..fa40e32d --- /dev/null +++ b/Gemfile @@ -0,0 +1,10 @@ +source 'https://rubygems.org' + +gem 'rake', '~> 13.0' +gem 'rake_terraform', '~> 1.19' +gem 'rake_docker', '~> 2.13' +gem 'rake_fly', '~> 2.7' +gem 'rake_gpg', '~> 0.16' +gem 'git', '~> 1.8' +gem 'confidante', '~> 0.27' +gem 'shivers', '~> 0.5' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..a7dfb8bf --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,157 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (6.1.3.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + aws-eventstream (1.1.1) + aws-partitions (1.465.0) + aws-sdk-core (3.114.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-ecr (1.42.0) + aws-sdk-core (~> 3, >= 3.112.0) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.2.3) + aws-eventstream (~> 1, >= 1.0.2) + colored2 (3.1.2) + concourse.rb (0.4.0) + dry-schema (~> 0.5) + excon (~> 0.72) + semantic (~> 1.5) + concurrent-ruby (1.1.8) + confidante (0.27.0) + activesupport (>= 4) + hiera (~> 3.3, >= 3.3.1) + shikashi (~> 0.6) + docker-api (1.34.2) + excon (>= 0.47.0) + multi_json + dry-configurable (0.12.1) + concurrent-ruby (~> 1.0) + dry-core (~> 0.5, >= 0.5.0) + dry-container (0.7.2) + concurrent-ruby (~> 1.0) + dry-configurable (~> 0.1, >= 0.1.3) + dry-core (0.5.0) + concurrent-ruby (~> 1.0) + dry-equalizer (0.3.0) + dry-inflector (0.2.0) + dry-initializer (3.0.4) + dry-logic (1.2.0) + concurrent-ruby (~> 1.0) + dry-core (~> 0.5, >= 0.5) + dry-schema (0.6.0) + concurrent-ruby (~> 1.0) + dry-configurable (~> 0.8, >= 0.8.0) + dry-core (~> 0.4) + dry-equalizer (~> 0.2) + dry-initializer (~> 3.0) + dry-logic (~> 1.0) + dry-types (~> 1.0) + dry-types (1.5.1) + concurrent-ruby (~> 1.0) + dry-container (~> 0.3) + dry-core (~> 0.5, >= 0.5) + dry-inflector (~> 0.1, >= 0.1.2) + dry-logic (~> 1.0, >= 1.0.2) + evalhook (0.6.0) + partialruby (~> 0.3) + sexp_processor (~> 4.0) + excon (0.82.0) + getsource (0.2.2) + git (1.8.1) + rchardet (~> 1.8) + hamster (3.0.0) + concurrent-ruby (~> 1.0) + hiera (3.7.0) + i18n (1.8.10) + concurrent-ruby (~> 1.0) + immutable-struct (2.4.1) + jmespath (1.4.0) + lino (3.0.0) + hamster (~> 3.0) + open4 (~> 1.3) + minitar (0.9) + minitest (5.14.4) + multi_json (1.15.0) + open4 (1.3.4) + partialruby (0.3.0) + ruby2ruby (~> 2) + ruby_parser (~> 3) + rake (13.0.3) + rake_dependencies (2.11.0) + hamster (~> 3.0) + minitar (~> 0.9) + rake_factory (~> 0.23) + rubyzip (>= 1.3) + rake_docker (2.13.0) + aws-sdk-ecr (~> 1.2) + colored2 (~> 3.1) + docker-api (~> 1.34) + rake_factory (~> 0.23) + rake_factory (0.29.0) + activesupport (>= 4) + rake (~> 13.0) + rake_fly (2.7.0) + concourse.rb (>= 0.4) + rake_dependencies (~> 2, < 3) + rake_factory (>= 0.29, < 1) + ruby_fly (>= 0.35) + semantic (~> 1.6.1) + rake_gpg (0.16.0) + rake_factory (>= 0.23, < 1) + ruby_gpg2 (>= 0.6, < 1) + rake_terraform (1.19.0) + colored2 (~> 3.1) + rake_dependencies (~> 2.11) + rake_factory (~> 0.23) + ruby-terraform (~> 1.1) + rchardet (1.8.0) + ruby-terraform (1.2.0) + immutable-struct (~> 2.4) + lino (~> 3.0) + ruby2ruby (2.4.4) + ruby_parser (~> 3.1) + sexp_processor (~> 4.6) + ruby_fly (0.35.0) + lino (>= 1.5) + ruby_gpg2 (0.8.0) + lino (>= 1.5) + ruby_parser (3.16.0) + sexp_processor (~> 4.15, >= 4.15.1) + rubyzip (2.3.0) + semantic (1.6.1) + sexp_processor (4.15.3) + shikashi (0.6.0) + evalhook (>= 0.6.0) + getsource (>= 0.1.0) + shivers (0.5.0) + semantic (~> 1.6) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + zeitwerk (2.4.2) + +PLATFORMS + arm64-darwin-20 + x86_64-darwin-19 + x86_64-darwin-20 + x86_64-linux + +DEPENDENCIES + confidante (~> 0.27) + git (~> 1.8) + rake (~> 13.0) + rake_docker (~> 2.13) + rake_fly (~> 2.7) + rake_gpg (~> 0.16) + rake_terraform (~> 1.19) + shivers (~> 0.5) + +BUNDLED WITH + 2.2.18 diff --git a/README.md b/README.md index 5131fb81..bbe496e8 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,246 @@ -# Reference Backend +[![banner](docs/assets/banner.png)](https://leptonite.io) + +

Leptonite - Powered by Boson Protocol

[![Gitter chat](https://badges.gitter.im/bosonprotocol.png)](https://gitter.im/bosonprotocol/community) -This repository is the backend for the MVP version of the Redeemeum service +This is a reference application which demonstrates how to integrate Boson Protocol into a NodeJS back-end. This repository contains a MongoDB service as well as keeper functions & event listeners. + +This reference app may be used as a template for building your own marketplace powered by Boson Protocol. Users can connect their wallets and list a set of items as a seller, as well as discover products that can be purchased as a buyer. The application also demonstrates how to the transaction lifecycle can be tracked and co-ordinated by both parties. + +--- +**Table of Contents** + +- [Design & Architecture](#design--architecture) +- [Local Development](#local-development) + - [Prerequisites](#prerequisites) + - [Build](#build) + - [Run](#run) + - [Test](#test) + - [Unit Tests](#unit-tests) + - [Component Tests](#component-tests) + - [Persistence Tests](#persistence-tests) + - [Code Linting & Formatting](#code-linting--formatting) +- [Contributing](#contributing) +- [License](#license) + +--- +## Design & Architecture + +The application architecture is as depicted below. There are various components to this: +- `Frontend` (details can be found in the [`reference-frontend`](https://github.com/bosonprotocol/reference-frontend) repository) +- `Backend` + - `Server` + - `Database` + - `Keepers service` - These are cloud functions which run periodically to trigger certain contract methods such as expiry/finalization. Details can be found [here](https://github.com/bosonprotocol/reference-backend/tree/develop/external/keepers). + - `Event Listeners` - This listens for blockchain events and updates the backend accordingly. Details can be found [here](https://github.com/bosonprotocol/reference-backend/tree/develop/external/lambdas). +- `Smart contracts` (details can be found in the [`contracts`](https://github.com/bosonprotocol/contracts) repository) + +[![banner](docs/assets/architecture-diagram.png)](#design-&-architecture) + +--- +## Local Development + +### Prerequisites + +For local development of the reference-backend, your development machine will need a few +tools installed. These will allow you to run the ruby scripts (executed as `./go [args]`) to build and test the project. + +At a minimum, you'll need: +* Node (12.20) +* NPM (> 6) +* Ruby (2.7) +* Bundler (> 2) +* Git +* Docker +* direnv + * This easily allows environment variables to be switched when navigating between project directories (e.g. `contracts`, `reference-backend` and `reference-frontend`). You will be prompted to run `direnv allow` to enable this. + +For instructions on how to get set up with these specific versions: +* See the [OS X guide](docs/setup/osx.md) if you are on a Mac. +* See the [Linux guide](docs/setup/linux.md) if you use a Linux distribution. + +--- +### Build +We have a fully automated local build process to check that your changes are +good to be merged. To run the build: + +```shell script +./go +```` + +By default, the build process fetches all dependencies, compiles, lints, +formats and tests the codebase. There are also tasks for each step. This and +subsequent sections provide more details of each of the tasks. + +To fetch dependencies: + +```shell script +./go app:dependencies:install +``` + +--- +### Run +You will need to: + - Run a MongoDB database instance (can be local or cloud hosted, like MongoDb Atlas). Be sure the deployed instance is secured with authentication enforced (https://docs.mongodb.com/guides/server/auth/) + + * Create a file './.env' on the basis of './.env.example' with the following information: + ``` + DB_CONNECTION_STRING=mongodb://localhost:27017 + DB_NAME=api + DB_USERNAME=admin + DB_PASSWORD=secret + + TOKEN_SECRET=1fdd5ab2823e118ee997219330c7abc37a56a5093b753b545ab40e5f216491eec5d400f121e678d6c5b03b01f2e56e1fd14b79afd5c0fdd61477ce469472a8a6 + GCLOUD_SECRET=1f123ce56aeec5d400b2823e7abc121e6756e1f4b118ee + + VOUCHERS_BUCKET="vouchers-upload-images-bucket" + ``` + Where: + * DB_CONNECTION_STRING: the connection string to the DB + * DB_NAME: the name of the DB (will be created) + * DB_USERNAME/DB_PASSWORD: login/password to access the database + * TOKEN_SECRET: see §Configuration above + * GCLOUD_SECRET: see §Configuration above + * Run the API server: + ```shell + npm install + set PORT=3333 + npm run start + ``` + * Create a file './external/keepers/src/.env' on the basis of './external/keepers/src/.env.example' with the following information: + ``` + TOKENS_CONTRACT_ADDRESS="0x..." + BOSON_ROUTER_CONTRACT_ADDRESS="0x..." + VOUCHER_KERNEL_ADDRESS="0x..." + API_URL="http://localhost:3333" + GCLOUD_SECRET="GENERATED_TOKEN" + ALCHEMY_URL="https://eth-desired-network.alchemyapi.io/v2/your-api-key" + ``` + Where: + * TOKENS_CONTRACT_ADDRESS: the address of the ERC1155721 contract + * BOSON_ROUTER_CONTRACT_ADDRESS: the address of the BosonRouter contract + * VOUCHER_KERNEL_ADDRESS: the address of the VoucherKernel contract + * API_URL: the URL of the backend API server (started above) + * GCLOUD_SECRET: generated on http://jwtbuilder.jamiekurtz.com with payload = {token: } and key=, where GCLOUD_SECRET and TOKEN_SECRET values are defined in the env var of the API server + * ALCHEMY_URL: URL of the blockchain entry node (Alchemy, Infura, ...). If omitted will fallback to local rpc at port 8545 (default) + * Run the Keepers service: + ```shell + npm run start:local:keepers + ``` + * Create a file './external/lambdas/.env' on the basis of './external/lambdas/.env.example' with the following information: + ``` + TOKENS_CONTRACT_ADDRESS="0x..." + BOSON_ROUTER_CONTRACT_ADDRESS="0x..." + CASHIER_ADDRESS="0x..." + VOUCHER_KERNEL_ADDRESS="0x..." + EXECUTOR_PRIVATE_KEY="0x..." + API_URL="http://localhost:3333" + GCLOUD_SECRET="GENERATED_TOKEN" + PROVIDER_URL="https://eth-desired-network.alchemyapi.io/v2/your-api-key" + #If the provider requires a secret authorization field in the request header (like Infura) + PROVIDER_SECRET= + ``` + Where: + * TOKENS_CONTRACT_ADDRESS: the address of the ERC1155721 contract + * BOSON_ROUTER_CONTRACT_ADDRESS: the address of the BosonRouter contract + * CASHIER_ADDRESS: the address of the Cashier contract + * VOUCHER_KERNEL_ADDRESS: the address of the VoucherKernel contract + * EXECUTOR_PRIVATE_KEY: the private key of the wallet to be used to interact with the contracts + * API_URL: the URL of the backend API server (started above) + * GCLOUD_SECRET: generated on http://jwtbuilder.jamiekurtz.com with payload = {token: } and key=, where GCLOUD_SECRET and TOKEN_SECRET values are defined in the env var of the API server + * PROVIDER_URL: URL of the blockchain entry node (Alchemy, Infura, ...). If omitted will fallback to local rpc at port 8545 (default) + * PROVIDER_SECRET: (optional) if the provider requires a secret authorization field in the request header (like Infura) + * Run the Triggers service: + ```shell + npm run start:local:triggers + ``` + +--- +### Test +All tests are written using +[Chai's JavaScript testing](https://www.chaijs.com/guide/) +support. + +#### Unit Tests +To run the unit tests: + +```shell script +./go tests:app:unit +``` -## Running and Deployment -1. Create a `.env` file based on the `.env.example` file. -`DB_CONNECTION_STRING` is the connection string to the mongodb -`TOKEN_SECRET` is a random string used in the JWT token generation -`VOUCHERS_BUCKET` is the name Bucket in a google cloud storage where the images are stored -2. Run the app via `npm start` +#### Component Tests +To run the component tests: +```shell script +./go tests:app:component +``` + +#### Persistence Tests +To run the persistence tests: + +```shell script +./go tests:app:persistence +``` + +--- +### Code Linting & Formatting + +Both the app itself and the tests are linted and formatted as part of +the build process. + +For the tests, we use: +* [eslint](https://eslint.org/) for linting +* [prettier](https://prettier.io/) for formatting + +To lint the app: + +```shell script +./go app:lint +``` + +This will check if the linter is satisfied. If instead you want to attempt to +automatically fix any linting issues: + +```shell script +./go app:lint_fix +``` + +To check the formatting of the app: + +```shell script +./go app:format +``` + +To automatically fix formatting issues: + +```shell script +./go app:format_fix +``` + +Similarly, for the tests, to perform the same tasks: + +```shell script +./go tests:app:lint +./go tests:app:lint_fix +./go tests:app:format +./go tests:app:format_fix +``` + +--- ## Contributing -Contributions are most welcome! +We welcome contributions! Until now, Boson Protocol has been largely worked on by a small dedicated team. However, the ultimate goal is for all of the Boson Protocol repositories to be fully owned by the community and contributors. Issues, pull requests, suggestions, and any sort of involvement are more than welcome. + +If you have noticed a bug, [file an issue](/issues). If you have a large pull request, we recommend filing an issue first; small PRs are always welcome. + +Questions are also welcome, as long as they are tech related. We can use them to improve our documentation. + +All PRs must pass all tests before being merged. + +By being in this community, you agree to the [Code of Conduct](CODE_OF_CONDUCT.md). Take a look at it, if you haven't already. + +--- +## License -Please note that by interacting here you are agreeing to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). Thank you. +Licensed under [LGPL v3](LICENSE). diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..d0c002de --- /dev/null +++ b/Rakefile @@ -0,0 +1,812 @@ +require 'git' +require 'confidante' +require 'rake_terraform' +require 'ruby_terraform/output' +require 'rake_docker' +require 'rake_fly' +require 'rake_gpg' +require 'rake_factory/kernel_extensions' +require 'shivers' + +configuration = Confidante.configuration +version = Shivers::Version.from_file('build/version') + +Docker.options = { + read_timeout: 300 +} + +RakeFly.define_installation_tasks(version: '6.7.2') +RakeTerraform.define_installation_tasks( + path: File.join(Dir.pwd, 'vendor', 'terraform'), + version: '0.15.4') + +task :default => [ + :build_fix, + :test +] + +task :build => [ + :"app:lint", + :"app:format", + :"tests:app:lint", + :"tests:app:format" +] + +task :build_fix => [ + :"app:lint_fix", + :"app:format_fix", + :"tests:app:lint_fix", + :"tests:app:format_fix" +] + +namespace :keys do + namespace :app do + namespace :passphrase do + task :generate do + File.open('config/secrets/app/gpg.passphrase', 'w') do |f| + f.write(SecureRandom.base64(36)) + end + end + end + + namespace :gpg do + RakeGPG.define_generate_key_task( + output_directory: 'config/secrets/app', + name_prefix: 'gpg', + armor: false, + owner_name: 'Leptonite Maintainers', + owner_email: 'maintainers@leptonite.io', + owner_comment: 'Service key' + ) do |t| + t.passphrase = + File.read('config/secrets/app/gpg.passphrase') + end + end + + task generate: %w[passphrase:generate gpg:generate] + end +end + +task :test, [:deployment_type, :deployment_label] do |_, args| + [ + :'tests:app:unit', + :'tests:app:persistence', + :'tests:app:component' + ].each do |task_name| + Rake::Task[task_name].invoke(*args) + end +end + +namespace :secrets do + desc 'Check if secrets are readable' + task :check do + if File.exist?('config/secrets') + puts 'Checking if secrets are accessible.' + unless File.read('config/secrets/.unlocked').strip == "true" + raise RuntimeError, Paint['Cannot access secrets.', :red] + end + puts 'Secrets accessible. Continuing.' + end + end + + desc 'Unlock secrets' + task :unlock do + if File.exist?('config/secrets') + puts 'Unlocking secrets.' + sh('git crypt unlock') + end + end +end + +namespace :app do + namespace :dependencies do + desc "Install all app dependencies" + task :install do + sh('npm', 'install') + end + end + + desc "Lint all app sources" + task :lint => [:'dependencies:install'] do + sh('npm', 'run', 'app:lint') + end + + desc "Lint & fix all app source" + task :lint_fix => [:'dependencies:install'] do + sh('npm', 'run', 'app:lint-fix') + end + + desc "Format all app sources" + task :format => [:'dependencies:install'] do + sh('npm', 'run', 'app:format') + end + + desc "Format & fix all app sources" + task :format_fix => [:'dependencies:install'] do + sh('npm', 'run', 'app:format-fix') + end + + desc "Run the app as a local process" + task :run => [:'dependencies:install', :'database:local:provision'] do + configuration = configuration + .for_scope( + deployment_type: 'local', + deployment_label: 'development', + role: 'local-app' + ) + + environment = configuration + .environment + .map { |k, v| [k.to_s, v] } + .to_h + + sh(environment, 'npm', 'run', 'start') + end +end + +namespace :functions do + namespace :dependencies do + desc "Install all functions dependencies" + task :install do + Dir.chdir('external/lambdas') do + sh('npm', 'install') + end + end + end + + desc "Lint all function sources" + task :lint => [:'dependencies:install'] do + Dir.chdir('external/lambdas') do + sh('npm', 'run', 'functions:lint') + end + end + + desc "Lint & fix all app source" + task :lint_fix => [:'dependencies:install'] do + Dir.chdir('external/lambdas') do + sh('npm', 'run', 'functions:lint-fix') + end + end + + desc "Format all app sources" + task :format => [:'dependencies:install'] do + Dir.chdir('external/lambdas') do + sh('npm', 'run', 'functions:format') + end + end + + desc "Format & fix all app sources" + task :format_fix => [:'dependencies:install'] do + Dir.chdir('external/lambdas') do + sh('npm', 'run', 'functions:format-fix') + end + end +end + +namespace :bootstrap do + RakeTerraform.define_command_tasks( + configuration_name: 'bootstrap infrastructure', + argument_names: [:deployment_type, :deployment_label]) do |t, args| + configuration = configuration + .for_scope(args.to_h.merge(role: 'bootstrap')) + + deployment_identifier = configuration.deployment_identifier + vars = configuration.vars + + t.source_directory = 'infra/bootstrap' + t.work_directory = 'build' + + t.state_file = + File.join( + Dir.pwd, "state/bootstrap/#{deployment_identifier}.tfstate") + t.vars = vars + end +end + +namespace :database do + namespace :test do + RakeDocker.define_container_tasks( + container_name: 'reference-backend-test-database') do |t| + configuration = configuration + .for_scope( + deployment_type: 'local', + deployment_label: 'testing') + + t.image = "mongo:#{configuration.database_version}" + t.ports = ["#{configuration.database_port}:27017"] + t.environment = [ + "MONGO_INITDB_ROOT_USERNAME=#{configuration.database_username}", + "MONGO_INITDB_ROOT_PASSWORD=#{configuration.database_password}", + ] + end + end + + namespace :local do + RakeDocker.define_container_tasks( + container_name: 'reference-backend-local-database') do |t| + configuration = configuration + .for_scope( + deployment_type: 'local', + deployment_label: 'development') + + t.image = "mongo:#{configuration.database_version}" + t.ports = ["#{configuration.database_port}:27017"] + t.environment = [ + "MONGO_INITDB_ROOT_USERNAME=#{configuration.database_username}", + "MONGO_INITDB_ROOT_PASSWORD=#{configuration.database_password}", + ] + end + end + + namespace :environment do + RakeTerraform.define_command_tasks( + configuration_name: 'database', + argument_names: [:deployment_type, :deployment_label]) do |t, args| + configuration = configuration + .for_scope(args.to_h.merge(role: 'database')) + + vars = configuration.vars + backend_config = configuration.backend_config + + t.source_directory = 'infra/database' + t.work_directory = 'build' + + t.vars = vars + t.backend_config = backend_config + end + end + + namespace :contextual do + task :ensure, [:deployment_type, :deployment_label] do |_, args| + args.with_defaults( + deployment_type: 'local', + deployment_label: 'testing') + + database_type = configuration + .for_scope(args.to_h) + .database_type + task_name = (database_type == 'deployed') ? + 'database:environment:provision' : + 'database:test:provision' + + Rake::Task[task_name].invoke(*args) + end + end +end + +namespace :tests do + namespace :app do + desc "Lint all tests" + task :lint => [:'app:dependencies:install'] do + sh('npm', 'run', 'tests:app:lint') + end + + desc "Lint & fix all tests" + task :lint_fix => [:'app:dependencies:install'] do + sh('npm', 'run', 'tests:app:lint-fix') + end + + desc "Format all test files" + task :format => [:'app:dependencies:install'] do + sh('npm', 'run', 'tests:app:format') + end + + desc "Format & fix all test files" + task :format_fix => [:'app:dependencies:install'] do + sh('npm', 'run', 'tests:app:format-fix') + end + + desc "Run all unit tests" + task :unit => [:'app:dependencies:install'] do + script_name = ENV["INCLUDE_COVERAGE"] == 'true' ? + 'tests:app:unit:coverage' : + 'tests:app:unit' + sh('npm', 'run', script_name) + end + + desc "Run all integration tests" + task :integration => [:'app:dependencies:install'] do + configuration = configuration + .for_scope( + deployment_type: 'local', + deployment_label: 'testing', + role: 'integration-tests' + ) + + environment = configuration + .environment + .map { |k, v| [k.to_s, v] } + .to_h + + sh(environment, 'npm', 'run', 'tests:app:integration') + end + + desc "Run all persistence tests" + task :persistence, + [:deployment_type, :deployment_label] => + [:'app:dependencies:install'] do |_, args| + args.with_defaults( + deployment_type: 'local', + deployment_label: 'testing') + + Rake::Task['database:contextual:ensure'].invoke(*args) + + script_name = ENV["INCLUDE_COVERAGE"] == 'true' ? + 'tests:app:persistence:coverage' : + 'tests:app:persistence' + sh(database_overrides_for(configuration, args), + 'npm', 'run', script_name) + end + + desc "Run all component tests" + task :component, + [:deployment_type, :deployment_label] => + [:'app:dependencies:install'] do |_, args| + args.with_defaults( + deployment_type: 'local', + deployment_label: 'testing') + + Rake::Task['database:contextual:ensure'].invoke(*args) + + script_name = ENV["INCLUDE_COVERAGE"] == 'true' ? + 'tests:app:component:coverage' : + 'tests:app:component' + sh(database_overrides_for(configuration, args), + 'npm', 'run', script_name) + end + + namespace :coverage do + desc "Run coverage badge creation" + task :badge => [:'app:dependencies:install'] do |_, args| + sh('npm', 'run', 'tests:coverage:badge') + end + end + end +end + +namespace :lambda do + RakeTerraform.define_command_tasks( + configuration_name: 'reference backend keepers lambda', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + configuration = + configuration.for_scope(args.to_h.merge(role: 'functions')) + + t.source_directory = 'infra/functions' + t.work_directory = 'build' + + t.backend_config = configuration.backend_config + t.vars = configuration.vars + end +end + +namespace :keepers_image_repository do + RakeTerraform.define_command_tasks( + configuration_name: 'keepers image repository', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + configuration = + configuration.for_scope(args.to_h.merge(role: 'keepers-image-repository')) + + t.source_directory = 'infra/keepers-image-repository' + t.work_directory = 'build' + + t.backend_config = configuration.backend_config + t.vars = configuration.vars + end +end + +namespace :image_repository do + RakeTerraform.define_command_tasks( + configuration_name: 'reference backend image repository', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + configuration = + configuration.for_scope(args.to_h.merge(role: 'image-repository')) + + t.source_directory = 'infra/image-repository' + t.work_directory = 'build' + + t.backend_config = configuration.backend_config + t.vars = configuration.vars + end +end + +namespace :image do + RakeDocker.define_image_tasks( + image_name: 'reference-backend', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + configuration = + configuration.for_scope(args.to_h.merge(role: 'image-repository')) + + t.work_directory = 'build/images' + + t.copy_spec = [ + 'image/Dockerfile', + 'image/docker-entrypoint.sh', + 'src/', + 'app.js', + 'package.json', + 'package-lock.json' + ] + t.create_spec = [ + { content: version.to_s, to: 'VERSION' }, + { content: version.to_docker_tag, to: 'TAG' } + ] + + t.repository_name = configuration.image_repository_name + t.repository_url = dynamic do + JSON.parse( + RubyTerraform::Output.for( + name: 'repository_url', + source_directory: 'infra/image-repository', + work_directory: 'build', + backend_config: configuration.backend_config + ) + ) + end + + t.credentials = dynamic do + RakeDocker::Authentication::ECR.new do |c| + c.region = configuration.region + c.registry_id = + JSON.parse( + RubyTerraform::Output.for( + name: 'registry_id', + source_directory: 'infra/image-repository', + work_directory: 'build', + backend_config: configuration.backend_config + ) + ) + end.call + end + + t.tags = [version.to_docker_tag, 'latest'] + end +end + +namespace :image_keepers do + RakeDocker.define_image_tasks( + image_name: 'keepers', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + configuration = + configuration.for_scope(args.to_h.merge(role: 'keepers-image-repository')) + + t.work_directory = 'build/images' + + t.copy_spec = [ + 'image-keepers/Dockerfile', + 'image-keepers/docker-entrypoint.sh', + 'external/keepers/src/', + 'external/keepers/package.json', + 'external/keepers/package-lock.json' + ] + t.create_spec = [ + { content: version.to_s, to: 'VERSION' }, + { content: version.to_docker_tag, to: 'TAG' } + ] + + t.repository_name = configuration.keepers_image_repository_name + t.repository_url = dynamic do + JSON.parse( + RubyTerraform::Output.for( + name: 'repository_url', + source_directory: 'infra/keepers-image-repository', + work_directory: 'build', + backend_config: configuration.backend_config + ) + ) + end + + t.credentials = dynamic do + RakeDocker::Authentication::ECR.new do |c| + c.region = configuration.region + c.registry_id = + JSON.parse( + RubyTerraform::Output.for( + name: 'registry_id', + source_directory: 'infra/keepers-image-repository', + work_directory: 'build', + backend_config: configuration.backend_config + ) + ) + end.call + end + + t.tags = [version.to_docker_tag, 'latest'] + end +end + +namespace :image_storage_bucket do + RakeTerraform.define_command_tasks( + configuration_name: 'reference backend image storage bucket', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + configuration = + configuration.for_scope(args.to_h.merge(role: 'image-storage-bucket')) + + t.source_directory = 'infra/image-storage-bucket' + t.work_directory = 'build' + + t.backend_config = configuration.backend_config + t.vars = configuration.vars + end +end + +namespace :service do + RakeTerraform.define_command_tasks( + configuration_name: 'reference backend', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + version_configuration = { version_number: version.to_docker_tag } + service_configuration = + configuration + .for_overrides(version_configuration) + .for_scope(args.to_h.merge(role: 'service')) + + t.source_directory = 'infra/service' + t.work_directory = 'build' + + t.backend_config = service_configuration.backend_config + t.vars = service_configuration.vars + end +end + +namespace :service_keepers do + RakeTerraform.define_command_tasks( + configuration_name: 'keepers', + argument_names: %i[deployment_type deployment_label] + ) do |t, args| + version_configuration = { version_number: version.to_docker_tag } + service_configuration = + configuration + .for_overrides(version_configuration) + .for_scope(args.to_h.merge(role: 'keepers-service')) + + t.source_directory = 'infra/keepers-service' + t.work_directory = 'build' + + t.backend_config = service_configuration.backend_config + t.vars = service_configuration.vars + end +end + +namespace :ci do + RakeFly.define_authentication_tasks( + namespace: :authentication, + argument_names: [ + :ci_deployment_type, + :ci_deployment_label + ]) do |t, args| + configuration = configuration + .for_scope(args.to_h) + + t.target = configuration.concourse_team + t.concourse_url = configuration.concourse_url + t.team = configuration.concourse_team + t.username = configuration.concourse_username + t.password = configuration.concourse_password + + t.home_directory = 'build/fly' + end + + namespace :pipeline do + RakeFly.define_pipeline_tasks( + namespace: :develop, + argument_names: [ + :ci_deployment_type, + :ci_deployment_label + ] + ) do |t, args| + configuration = configuration + .for_scope(args.to_h.merge(role: 'develop-pipeline')) + ci_deployment_type = configuration.ci_deployment_identifier + + t.target = configuration.concourse_team + t.team = configuration.concourse_team + t.pipeline = "reference-backend-develop" + + t.config = 'pipelines/develop/pipeline.yaml' + + t.vars = configuration.vars + t.var_files = [ + 'config/secrets/pipeline/constants.yaml', + "config/secrets/pipeline/#{ci_deployment_type}.yaml" + ] + + t.non_interactive = true + t.home_directory = 'build/fly' + end + + RakeFly.define_pipeline_tasks( + namespace: :demo, + argument_names: [ + :ci_deployment_type, + :ci_deployment_label + ] + ) do |t, args| + configuration = configuration + .for_scope(args.to_h.merge(role: 'demo-pipeline')) + ci_deployment_type = configuration.ci_deployment_identifier + + t.target = configuration.concourse_team + t.team = configuration.concourse_team + t.pipeline = "reference-backend-demo" + + t.config = 'pipelines/demo/pipeline.yaml' + + t.vars = configuration.vars + t.var_files = [ + 'config/secrets/pipeline/constants.yaml', + "config/secrets/pipeline/#{ci_deployment_type}.yaml" + ] + + t.non_interactive = true + t.home_directory = 'build/fly' + end + + RakeFly.define_pipeline_tasks( + namespace: :production, + argument_names: [ + :ci_deployment_type, + :ci_deployment_label + ] + ) do |t, args| + configuration = configuration + .for_scope(args.to_h.merge(role: 'tag-pipeline')) + ci_deployment_type = configuration.ci_deployment_identifier + + t.target = configuration.concourse_team + t.team = configuration.concourse_team + t.pipeline = "reference-backend-production" + + t.config = 'pipelines/tag/pipeline.yaml' + + t.vars = configuration.vars + t.var_files = [ + 'config/secrets/pipeline/constants.yaml', + "config/secrets/pipeline/#{ci_deployment_type}.yaml" + ] + + t.non_interactive = true + t.home_directory = 'build/fly' + end + + RakeFly.define_pipeline_tasks( + namespace: :builder, + argument_names: [ + :ci_deployment_type, + :ci_deployment_label] + ) do |t, args| + configuration = configuration + .for_scope(args.to_h.merge(role: 'builder-pipeline')) + ci_deployment_type = configuration.ci_deployment_identifier + + t.target = configuration.concourse_team + t.team = configuration.concourse_team + t.pipeline = "reference-backend-builder" + + t.config = 'pipelines/builder/pipeline.yaml' + + t.vars = configuration.vars + t.var_files = [ + 'config/secrets/pipeline/constants.yaml', + "config/secrets/pipeline/#{ci_deployment_type}.yaml" + ] + + t.non_interactive = true + t.home_directory = 'build/fly' + end + + namespace :pr do + RakeFly.define_pipeline_tasks( + argument_names: [ + :ci_deployment_type, + :ci_deployment_label, + :branch + ] + ) do |t, args| + branch = args.branch || pr_metadata_branch + + configuration = configuration + .for_scope(args.to_h.merge(role: 'pr-pipeline')) + .for_overrides(source_repository_branch: branch) + + ci_deployment_type = configuration.ci_deployment_identifier + + t.target = configuration.concourse_team + t.team = configuration.concourse_team + t.pipeline = "reference-backend-pr-#{to_pipeline_name(branch)}" + + t.config = 'pipelines/pr/pipeline.yaml' + + t.vars = configuration.vars + t.var_files = [ + 'config/secrets/pipeline/constants.yaml', + "config/secrets/pipeline/#{ci_deployment_type}.yaml" + ] + + t.non_interactive = true + t.home_directory = 'build/fly' + end + + task :handle, [ + :ci_deployment_type, + :ci_deployment_label, + :branch, + :state + ] do |_, args| + branch = args.branch || pr_metadata_branch + state = args.state || pr_metadata_state + + if state == "OPEN" + Rake::Task[:"ci:pipeline:pr:push"].invoke( + args.ci_deployment_type, + args.ci_deployment_label, + branch) + else + Rake::Task[:"ci:pipeline:pr:destroy"].invoke( + args.ci_deployment_type, + args.ci_deployment_label, + branch) + end + end + end + end + + namespace :pipelines do + desc "Push all pipelines" + task :push, [:ci_deployment_type, :ci_deployment_label] do |_, args| + Rake::Task[:"ci:pipeline:develop:push"].invoke(*args) + Rake::Task[:"ci:pipeline:demo:push"].invoke(*args) + Rake::Task[:"ci:pipeline:builder:push"].invoke(*args) + end + end +end + +def pr_metadata_value(key) + File.exist?(".git/resource/#{key}") ? + File.read(".git/resource/#{key}") : + nil +end + +def pr_metadata_branch + pr_metadata_value("head_name") +end + +def pr_metadata_state + pr_metadata_value("state") +end + +def current_branch + Git.open(File.dirname(__FILE__)).current_branch +end + +def to_db_name(string) + string.gsub(/[^a-zA-Z0-9_-]/, "") +end + +def to_pipeline_name(string) + string.gsub(/[^a-zA-Z0-9_-]/, "_") +end + +def database_overrides_for(configuration, args) + configuration = configuration + .for_scope(args.to_h.merge(role: 'database')) + + (configuration.database_type == 'deployed') ? + { + "DB_CONNECTION_STRING" => + RubyTerraform::Output.for( + name: 'connection_string', + source_directory: 'infra/database', + work_directory: 'build', + backend_config: configuration.backend_config), + "DB_USERNAME" => configuration.database_username, + "DB_PASSWORD" => configuration.database_password, + "DB_NAME" => to_db_name(current_branch) + } : + {} +end diff --git a/app-demo.yaml b/app-demo.yaml new file mode 100644 index 00000000..5e1f9c90 --- /dev/null +++ b/app-demo.yaml @@ -0,0 +1,2 @@ +service: demo +runtime: nodejs10 diff --git a/app.js b/app.js index 64f0c4c3..a08220a9 100644 --- a/app.js +++ b/app.js @@ -1,37 +1,86 @@ -require('dotenv').config(); -const express = require('express'); -const MongooseClient = require('./src/clients/mongoose-client'); - -const usersRouter = require('./src/api/routes/users-route'); -const voucherRouter = require('./src/api/routes/vouchers-route'); -const usersVoucherRouter = require('./src/api/routes/user-vouchers-route'); -const paymentRouter = require('./src/api/routes/payments-route'); -const adminRouter = require('./src/api/routes/admin-route') -const ErrorHandler = require('./src/api/middlewares/error-handler'); - -const cors = require('cors'); - -const app = express(); - -app.use(cors()); -app.use(function (req, res, next) { - console.log('Time:', Date.now()) - next() -}); -app.use(express.json()); - -app.use('/users', usersRouter.route(express)); -app.use('/vouchers', voucherRouter.route(express)); -app.use('/user-vouchers', usersVoucherRouter.route(express)); -app.use('/payments', paymentRouter.route(express)); -app.use('/admin', adminRouter.route(express)) - -// Attach API Error handler -app.use(ErrorHandler.apiErrorHandler); - -const PORT = process.env.PORT || 3000; -app.listen(PORT, async () => { - await MongooseClient.getInstance(); - - console.info(`App listening on: ` + PORT); -}); \ No newline at end of file +require("dotenv").config(); + +const Server = require("./src/Server"); + +const ConfigurationService = require("./src/services/ConfigurationService.js"); +const AuthenticationService = require("./src/services/AuthenticationService"); + +const MongooseClient = require("./src/clients/MongooseClient"); + +const UsersRepository = require("./src/database/User/UsersRepository"); +const VouchersRepository = require("./src/database/Voucher/VouchersRepository"); +const VoucherSuppliesRepository = require("./src/database/VoucherSupply/VoucherSuppliesRepository"); +const PaymentsRepository = require("./src/database/Payment/PaymentsRepository"); +const EventRepository = require("./src/database/Event/EventsRepository"); + +const AdministratorAuthenticationMiddleware = require("./src/api/middlewares/AdministratorAuthenticationMiddleware"); +const UserAuthenticationMiddleware = require("./src/api/middlewares/UserAuthenticationMiddleware"); + +const UsersModule = require("./src/modules/UsersModule"); +const VoucherSuppliesModule = require("./src/modules/VoucherSuppliesModule"); +const VouchersModule = require("./src/modules/VouchersModule"); +const PaymentsModule = require("./src/modules/PaymentsModule"); +const EventsModule = require("./src/modules/EventsModule"); +const AdministrationModule = require("./src/modules/AdministrationModule"); +const HealthModule = require("./src/modules/HealthModule"); + +const configurationService = new ConfigurationService(); + +const authenticationService = new AuthenticationService( + configurationService.tokenSecret +); + +const mongooseClient = new MongooseClient( + configurationService.databaseConnectionString, + configurationService.databaseName, + configurationService.databaseUsername, + configurationService.databasePassword +); + +const usersRepository = new UsersRepository(); +const vouchersRepository = new VouchersRepository(); +const voucherSuppliesRepository = new VoucherSuppliesRepository(); +const paymentsRepository = new PaymentsRepository(); +const eventsRepository = new EventRepository(); + +const administratorAuthenticationMiddleware = new AdministratorAuthenticationMiddleware( + authenticationService, + usersRepository +); +const userAuthenticationMiddleware = new UserAuthenticationMiddleware( + configurationService.gcloudSecret, + authenticationService +); + +const dependencies = { + configurationService, + authenticationService, + + usersRepository, + vouchersRepository, + voucherSuppliesRepository, + paymentsRepository, + eventsRepository, + + administratorAuthenticationMiddleware, + userAuthenticationMiddleware, +}; + +const healthModule = new HealthModule(dependencies); +const usersModule = new UsersModule(dependencies); +const voucherSuppliesModule = new VoucherSuppliesModule(dependencies); +const vouchersModule = new VouchersModule(dependencies); +const paymentsModule = new PaymentsModule(dependencies); +const eventsModule = new EventsModule(dependencies); +const administrationModule = new AdministrationModule(dependencies); + +new Server() + .withMongooseClient(mongooseClient) + .withModule(healthModule) + .withModule(usersModule) + .withModule(voucherSuppliesModule) + .withModule(vouchersModule) + .withModule(paymentsModule) + .withModule(eventsModule) + .withModule(administrationModule) + .start(process.env.PORT || 3000); diff --git a/app.yaml b/app.yaml index d8b704c6..b626e0a0 100644 --- a/app.yaml +++ b/app.yaml @@ -1,2 +1,2 @@ service: default -runtime: nodejs10 \ No newline at end of file +runtime: nodejs12 \ No newline at end of file diff --git a/config/ci/rdm-management-default.yaml b/config/ci/rdm-management-default.yaml new file mode 100644 index 00000000..f9e09032 --- /dev/null +++ b/config/ci/rdm-management-default.yaml @@ -0,0 +1,20 @@ +--- +ci_account_id: "%{hiera('rdm_management_account_id')}" + +ci_deployment_identifier: "%{ci_deployment_type}-%{ci_deployment_label}" + +ci_storage_bucket_name: "bsn-%{hiera('component')}-%{hiera('ci_deployment_identifier')}" +ci_storage_bucket_region: "%{hiera('region')}" +ci_storage_bucket_encryption: "AES256" + +concourse_url: "https://ci-server.rdm-management.redeemeum.io" +concourse_team: "bosonprotocol" + +image_repository_base_url: "%{hiera('rdm_management_account_id')}.dkr.ecr.%{hiera('region')}.amazonaws.com" + +node_builder_image_repository_name: "rdm/node-12-builder" +node_builder_image_repository_url: "%{hiera('image_repository_base_url')}/%{hiera('node_builder_image_repository_name')}" + +app_image_repository_name: "%{hiera('image_repository_name')}" +app_image_repository_url: "%{hiera('image_repository_base_url')}/%{hiera('app_image_repository_name')}" +keepers_image_repository_url: "%{hiera('image_repository_base_url')}/%{hiera('keepers_image_repository_name')}" diff --git a/config/defaults.yaml b/config/defaults.yaml new file mode 100644 index 00000000..7e09c4fa --- /dev/null +++ b/config/defaults.yaml @@ -0,0 +1,32 @@ +--- +# General +region: "eu-west-2" + +component: "reference-backend" +deployment_identifier: "%{deployment_type}-%{deployment_label}" + +source_repository_name: "bosonprotocol/reference-backend" +source_repository_url: "git@github.com:%{hiera('source_repository_name')}.git" +source_repository_branch: "develop" + +image_repository_name: "bsn/reference-backend" +keepers_image_repository_name: "bsn/keepers" + +storage_bucket_name: "bsn-%{hiera('component')}-%{hiera('deployment_identifier')}" +storage_bucket_encryption: "AES256" + +secrets_bucket_name: "%{hiera('storage_bucket_name')}" + +image_storage_bucket_name: "bsn-%{hiera('component')}-%{hiera('deployment_identifier')}-image-storage" +image_storage_user_name: "bsn-%{hiera('component')}-%{hiera('deployment_identifier')}-image-storage-user" +image_storage_user_public_gpg_key_path: "%{cwd}/config/secrets/app/gpg.public" + +admin_role_name: "cross-account-admin-role" + +rdm_management_account_id: "031036423983" + +bsn_parent_account_id: "915981965568" +bsn_development_potassium_account_id: "384010198059" +bsn_production_lutetium_account_id: "371854298993" + +bsn_parent_account_admin_role: "arn:aws:iam::%{hiera('bsn_parent_account_id')}:role/%{hiera('admin_role_name')}" diff --git a/config/deployments/bsn-demo-mendelevium.yaml b/config/deployments/bsn-demo-mendelevium.yaml new file mode 100644 index 00000000..df643a26 --- /dev/null +++ b/config/deployments/bsn-demo-mendelevium.yaml @@ -0,0 +1,73 @@ +--- +# General +storage_bucket_allowed_account_ids: + - "%{hiera('bsn_development_potassium_account_id')}" + +database_version: "4.4" +database_instance_size_name: "M10" +database_allow_cidrs: + - "10.0.0.0/8" + +database_name: "api" +database_username: "%{hiera('database_service_user_username')}" +database_password: "%{hiera('database_service_user_password')}" + +database_type: "deployed" + +image_upload_storage_engine: "AWS" + +voucher_kernel_address: "0x6ae1FCe8b0BcEe14d498C043D64b6a4a19c0E4A8" +token_contact_address: "0x66c02B4C0f1b8205B090AEB0266577557167AF47" +boson_router_contact_address: "0xe2AfF6a81Aa47149AAd39a0c320B5895E6f266D0" +cashier_address: "0xa49925E6064CeB7E0777BD9E864a71518Cd141A8" + +# State +domain_state_bucket_name: "bsn-aws-application-account-bsn-development-potassium" +domain_state_key: "common/deployment-state/default.tfstate" +domain_state_bucket_region: "%{hiera('region')}" +domain_state_bucket_is_encrypted: "true" + +network_state_bucket_name: "bsn-application-network-bsn-development-palladium" +network_state_key: "network/deployment-state/default.tfstate" +network_state_bucket_region: "%{hiera('region')}" +network_state_bucket_is_encrypted: "true" + +cluster_state_bucket_name: "bsn-application-cluster-bsn-demo-selenium" +cluster_state_key: "cluster/deployment-state/default.tfstate" +cluster_state_bucket_region: "%{hiera('region')}" +cluster_state_bucket_is_encrypted: "true" + +image_repository_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +image_repository_state_key: "image-repository/deployment-state/default.tfstate" +image_repository_state_bucket_region: "%{hiera('region')}" +image_repository_state_bucket_is_encrypted: "true" + +keepers_image_repository_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +keepers_image_repository_state_key: "keepers-image-repository/deployment-state/default.tfstate" +keepers_image_repository_state_bucket_region: "%{hiera('region')}" +keepers_image_repository_state_bucket_is_encrypted: "true" + +image_storage_bucket_state_bucket_name: "%{hiera('storage_bucket_name')}" +image_storage_bucket_state_key: "image-storage-bucket/deployment-state/default.tfstate" +image_storage_bucket_state_bucket_region: "%{hiera('region')}" +image_storage_bucket_state_bucket_is_encrypted: "true" + +database_state_bucket_name: "%{hiera('storage_bucket_name')}" +database_state_key: "database/deployment-state/default.tfstate" +database_state_bucket_region: "%{hiera('region')}" +database_state_bucket_is_encrypted: "true" + +service_state_bucket_name: "%{hiera('storage_bucket_name')}" +service_state_key: "service/deployment-state/default.tfstate" +service_state_bucket_region: "%{hiera('region')}" +service_state_bucket_is_encrypted: "true" + +keepers_service_state_bucket_name: "%{hiera('storage_bucket_name')}" +keepers_service_state_key: "keepers-service/deployment-state/default.tfstate" +keepers_service_state_bucket_region: "%{hiera('region')}" +keepers_service_state_bucket_is_encrypted: "true" + +functions_state_bucket_name: "%{hiera('storage_bucket_name')}" +functions_state_key: "functions/deployment-state/default.tfstate" +functions_state_bucket_region: "%{hiera('region')}" +functions_state_bucket_is_encrypted: "true" diff --git a/config/deployments/bsn-development-plutonium.yaml b/config/deployments/bsn-development-plutonium.yaml new file mode 100644 index 00000000..e4fe1967 --- /dev/null +++ b/config/deployments/bsn-development-plutonium.yaml @@ -0,0 +1,73 @@ +--- +# General +storage_bucket_allowed_account_ids: + - "%{hiera('bsn_development_potassium_account_id')}" + +database_version: "4.4" +database_instance_size_name: "M10" +database_allow_cidrs: + - "10.0.0.0/8" + +database_name: "api" +database_username: "%{hiera('database_service_user_username')}" +database_password: "%{hiera('database_service_user_password')}" + +database_type: "deployed" + +image_upload_storage_engine: "AWS" + +voucher_kernel_address: "0x469eF8b9F583920318Ce3dd095A0402A4b061bb0" +token_contact_address: "0xe8637906721051D860af222E6021826887d9e358" +boson_router_contact_address: "0xf7EEBa6c7a4eC07735b4AcaC8f8AF608f9Ecb8Cf" +cashier_address: "0x0ab0Fec353C6653F2eD05b5E5ceb4fB27c7d7902" + +# State +domain_state_bucket_name: "bsn-aws-application-account-bsn-development-potassium" +domain_state_key: "common/deployment-state/default.tfstate" +domain_state_bucket_region: "%{hiera('region')}" +domain_state_bucket_is_encrypted: "true" + +network_state_bucket_name: "bsn-application-network-bsn-development-palladium" +network_state_key: "network/deployment-state/default.tfstate" +network_state_bucket_region: "%{hiera('region')}" +network_state_bucket_is_encrypted: "true" + +cluster_state_bucket_name: "bsn-application-cluster-bsn-development-tennessine" +cluster_state_key: "cluster/deployment-state/default.tfstate" +cluster_state_bucket_region: "%{hiera('region')}" +cluster_state_bucket_is_encrypted: "true" + +image_repository_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +image_repository_state_key: "image-repository/deployment-state/default.tfstate" +image_repository_state_bucket_region: "%{hiera('region')}" +image_repository_state_bucket_is_encrypted: "true" + +keepers_image_repository_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +keepers_image_repository_state_key: "keepers-image-repository/deployment-state/default.tfstate" +keepers_image_repository_state_bucket_region: "%{hiera('region')}" +keepers_image_repository_state_bucket_is_encrypted: "true" + +image_storage_bucket_state_bucket_name: "%{hiera('storage_bucket_name')}" +image_storage_bucket_state_key: "image-storage-bucket/deployment-state/default.tfstate" +image_storage_bucket_state_bucket_region: "%{hiera('region')}" +image_storage_bucket_state_bucket_is_encrypted: "true" + +database_state_bucket_name: "%{hiera('storage_bucket_name')}" +database_state_key: "database/deployment-state/default.tfstate" +database_state_bucket_region: "%{hiera('region')}" +database_state_bucket_is_encrypted: "true" + +service_state_bucket_name: "%{hiera('storage_bucket_name')}" +service_state_key: "service/deployment-state/default.tfstate" +service_state_bucket_region: "%{hiera('region')}" +service_state_bucket_is_encrypted: "true" + +keepers_service_state_bucket_name: "%{hiera('storage_bucket_name')}" +keepers_service_state_key: "keepers-service/deployment-state/default.tfstate" +keepers_service_state_bucket_region: "%{hiera('region')}" +keepers_service_state_bucket_is_encrypted: "true" + +functions_state_bucket_name: "%{hiera('storage_bucket_name')}" +functions_state_key: "functions/deployment-state/default.tfstate" +functions_state_bucket_region: "%{hiera('region')}" +functions_state_bucket_is_encrypted: "true" diff --git a/config/deployments/bsn-production-oganesson.yaml b/config/deployments/bsn-production-oganesson.yaml new file mode 100644 index 00000000..9f81d75d --- /dev/null +++ b/config/deployments/bsn-production-oganesson.yaml @@ -0,0 +1,73 @@ +--- +# General +storage_bucket_allowed_account_ids: + - "%{hiera('bsn_production_lutetium_account_id')}" + +database_version: "4.4" +database_instance_size_name: "M10" +database_allow_cidrs: + - "10.0.0.0/8" + +database_name: "api" +database_username: "%{hiera('database_service_user_username')}" +database_password: "%{hiera('database_service_user_password')}" + +database_type: "deployed" + +image_upload_storage_engine: "AWS" + +voucher_kernel_address: "0x72ed3a45303D5102B92b6F837162684673c40477" +token_contact_address: "0x94588Ba858c7F67B60a0a079FE2131c4C0351fB9" +boson_router_contact_address: "0x6D7f06CC2F2583A44226A9077Bea8C5f646B5095" +cashier_address: "0x5aF8E92541Ce126d2BfF69A03F301a7E16943A9c" + +# State +domain_state_bucket_name: "bsn-aws-application-account-bsn-production-lutetium" +domain_state_key: "common/deployment-state/default.tfstate" +domain_state_bucket_region: "%{hiera('region')}" +domain_state_bucket_is_encrypted: "true" + +network_state_bucket_name: "bsn-application-network-bsn-production-fluorine" +network_state_key: "network/deployment-state/default.tfstate" +network_state_bucket_region: "%{hiera('region')}" +network_state_bucket_is_encrypted: "true" + +cluster_state_bucket_name: "bsn-application-cluster-bsn-production-gold" +cluster_state_key: "cluster/deployment-state/default.tfstate" +cluster_state_bucket_region: "%{hiera('region')}" +cluster_state_bucket_is_encrypted: "true" + +image_repository_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +image_repository_state_key: "image-repository/deployment-state/default.tfstate" +image_repository_state_bucket_region: "%{hiera('region')}" +image_repository_state_bucket_is_encrypted: "true" + +keepers_image_repository_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +keepers_image_repository_state_key: "keepers-image-repository/deployment-state/default.tfstate" +keepers_image_repository_state_bucket_region: "%{hiera('region')}" +keepers_image_repository_state_bucket_is_encrypted: "true" + +image_storage_bucket_state_bucket_name: "%{hiera('storage_bucket_name')}" +image_storage_bucket_state_key: "image-storage-bucket/deployment-state/default.tfstate" +image_storage_bucket_state_bucket_region: "%{hiera('region')}" +image_storage_bucket_state_bucket_is_encrypted: "true" + +database_state_bucket_name: "%{hiera('storage_bucket_name')}" +database_state_key: "database/deployment-state/default.tfstate" +database_state_bucket_region: "%{hiera('region')}" +database_state_bucket_is_encrypted: "true" + +service_state_bucket_name: "%{hiera('storage_bucket_name')}" +service_state_key: "service/deployment-state/default.tfstate" +service_state_bucket_region: "%{hiera('region')}" +service_state_bucket_is_encrypted: "true" + +keepers_service_state_bucket_name: "%{hiera('storage_bucket_name')}" +keepers_service_state_key: "keepers-service/deployment-state/default.tfstate" +keepers_service_state_bucket_region: "%{hiera('region')}" +keepers_service_state_bucket_is_encrypted: "true" + +functions_state_bucket_name: "%{hiera('storage_bucket_name')}" +functions_state_key: "functions/deployment-state/default.tfstate" +functions_state_bucket_region: "%{hiera('region')}" +functions_state_bucket_is_encrypted: "true" diff --git a/config/deployments/local-development.yaml b/config/deployments/local-development.yaml new file mode 100644 index 00000000..c4a85e3d --- /dev/null +++ b/config/deployments/local-development.yaml @@ -0,0 +1,21 @@ +--- +# General +database_username: "admin" +database_password: "secret" +database_port: "27018" +database_version: "4.4" + +database_type: "local" + +app_port: "3001" + +token_secret: "e039b2caa4b26f6ec6c65388676389e917e0cd248aaf1222df0540b9bb60d160393e15620e5155cbe2abb97f1b3f96483f670a5788d17a2488077bbce696afcc" +gcloud_secret: "e9c21f96242935be36928c9acb44ef88b1153644994ba1" + +image_upload_storage_engine: "AWS" + +# State +image_storage_bucket_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +image_storage_bucket_state_key: "image-storage-bucket/deployment-state/%{hiera('deployment_identifier')}.tfstate" +image_storage_bucket_state_bucket_region: "%{hiera('region')}" +image_storage_bucket_state_bucket_is_encrypted: "true" diff --git a/config/deployments/local-testing.yaml b/config/deployments/local-testing.yaml new file mode 100644 index 00000000..8f5b31b2 --- /dev/null +++ b/config/deployments/local-testing.yaml @@ -0,0 +1,14 @@ +--- +# General +database_username: "admin" +database_password: "secret" +database_port: "27017" +database_version: "4.4" + +database_type: "local" + +# State +image_storage_bucket_state_bucket_name: "bsn-%{hiera('component')}-rdm-management-default" +image_storage_bucket_state_key: "image-storage-bucket/deployment-state/%{hiera('deployment_identifier')}.tfstate" +image_storage_bucket_state_bucket_region: "%{hiera('region')}" +image_storage_bucket_state_bucket_is_encrypted: "true" diff --git a/config/deployments/rdm-management-default.yaml b/config/deployments/rdm-management-default.yaml new file mode 100644 index 00000000..636ee0d8 --- /dev/null +++ b/config/deployments/rdm-management-default.yaml @@ -0,0 +1,58 @@ +--- +# General +storage_bucket_allowed_account_ids: + - "%{hiera('rdm_management_account_id')}" + - "%{hiera('bsn_development_potassium_account_id')}" + - "%{hiera('bsn_production_lutetium_account_id')}" + +development_tennessine_cluster_instance_role_arn: "arn:aws:iam::384010198059:role/terraform-20210413135553345900000003" +demo_selenium_cluster_instance_role_arn: "arn:aws:iam::384010198059:role/terraform-20210623150921670400000003" +production_gold_cluster_instance_role_arn: "arn:aws:iam::371854298993:role/terraform-20210413135959680100000003" + +image_repository_allowed_role_arns: + - "%{hiera('development_tennessine_cluster_instance_role_arn')}" + - "%{hiera('demo_selenium_cluster_instance_role_arn')}" + - "%{hiera('production_gold_cluster_instance_role_arn')}" + +keepers_image_repository_allowed_role_arns: + - "%{hiera('development_tennessine_cluster_instance_role_arn')}" + - "%{hiera('demo_selenium_cluster_instance_role_arn')}" + - "%{hiera('production_gold_cluster_instance_role_arn')}" + +database_version: "4.4" +database_instance_size_name: "M10" +database_allow_cidrs: + - "10.0.0.0/8" + +database_username: "%{hiera('database_service_user_username')}" +database_password: "%{hiera('database_service_user_password')}" + +database_type: "deployed" + +image_upload_storage_engine: "AWS" + +# State +network_state_bucket_name: "rdm-tooling-network-rdm-management-default" +network_state_key: "network/deployment-state/default.tfstate" +network_state_bucket_region: "%{hiera('region')}" +network_state_bucket_is_encrypted: "true" + +database_state_bucket_name: "%{hiera('storage_bucket_name')}" +database_state_key: "database/deployment-state/default.tfstate" +database_state_bucket_region: "%{hiera('region')}" +database_state_bucket_is_encrypted: "true" + +image_repository_state_bucket_name: "%{hiera('storage_bucket_name')}" +image_repository_state_key: "image-repository/deployment-state/default.tfstate" +image_repository_state_bucket_region: "%{hiera('region')}" +image_repository_state_bucket_is_encrypted: "true" + +keepers_image_repository_state_bucket_name: "%{hiera('storage_bucket_name')}" +keepers_image_repository_state_key: "keepers-image-repository/deployment-state/default.tfstate" +keepers_image_repository_state_bucket_region: "%{hiera('region')}" +keepers_image_repository_state_bucket_is_encrypted: "true" + +image_storage_bucket_state_bucket_name: "%{hiera('storage_bucket_name')}" +image_storage_bucket_state_key: "image-storage-bucket/deployment-state/default.tfstate" +image_storage_bucket_state_bucket_region: "%{hiera('region')}" +image_storage_bucket_state_bucket_is_encrypted: "true" diff --git a/config/hiera.yaml b/config/hiera.yaml new file mode 100644 index 00000000..86af7c11 --- /dev/null +++ b/config/hiera.yaml @@ -0,0 +1,19 @@ +--- +:backends: + - "overrides" + - "env" + - "yaml" +:logger: "noop" +:yaml: + :datadir: "config" +:hierarchy: + - "roles/%{role}" + - "deployments/%{deployment_type}-%{deployment_label}" + - "pipelines/defaults" + - "ci/%{ci_deployment_type}-%{ci_deployment_label}" + - "secrets/gcp/%{deployment_type}-%{deployment_label}" + - "secrets/app/%{deployment_type}-%{deployment_label}" + - "secrets/mongodbatlas/credentials" + - "secrets/database/%{deployment_type}-%{deployment_label}" + - "secrets/pipeline/%{ci_deployment_type}-%{ci_deployment_label}" + - "defaults" diff --git a/config/pipelines/defaults.yaml b/config/pipelines/defaults.yaml new file mode 100644 index 00000000..3eb81db6 --- /dev/null +++ b/config/pipelines/defaults.yaml @@ -0,0 +1,16 @@ +--- +ci_provisioning_role_arn: "arn:aws:iam::%{hiera('rdm_management_account_id')}:role/cross-account-admin-role" +ci_deployment_type: "%{ci_deployment_type}" +ci_deployment_label: "%{ci_deployment_label}" + +development_plutonium_provisioning_role_arn: "arn:aws:iam::%{hiera('bsn_development_potassium_account_id')}:role/cross-account-admin-role" +development_plutonium_deployment_type: "bsn-development" +development_plutonium_deployment_label: "plutonium" + +demo_mendelevium_provisioning_role_arn: "arn:aws:iam::%{hiera('bsn_development_potassium_account_id')}:role/cross-account-admin-role" +demo_mendelevium_deployment_type: "bsn-demo" +demo_mendelevium_deployment_label: "mendelevium" + +production_oganesson_provisioning_role_arn: "arn:aws:iam::%{hiera('bsn_production_lutetium_account_id')}:role/cross-account-admin-role" +production_oganesson_deployment_type: "bsn-production" +production_oganesson_deployment_label: "oganesson" diff --git a/config/roles/bootstrap.yaml b/config/roles/bootstrap.yaml new file mode 100644 index 00000000..68a22522 --- /dev/null +++ b/config/roles/bootstrap.yaml @@ -0,0 +1,11 @@ +--- +vars: + region: "%{hiera('region')}" + + deployment_type: "%{deployment_type}" + deployment_label: "%{deployment_label}" + deployment_identifier: "%{hiera('deployment_identifier')}" + + storage_bucket_name: "%{hiera('storage_bucket_name')}" + + allowed_account_ids: "%{hiera('storage_bucket_allowed_account_ids')}" diff --git a/config/roles/builder-pipeline.yaml b/config/roles/builder-pipeline.yaml new file mode 100644 index 00000000..f7cb38c5 --- /dev/null +++ b/config/roles/builder-pipeline.yaml @@ -0,0 +1,20 @@ +--- +vars: + source_repository_name: "%{hiera('source_repository_name')}" + source_repository_url: "%{hiera('source_repository_url')}" + source_repository_branch: "%{hiera('source_repository_branch')}" + + node_builder_image_repository_url: "%{hiera('node_builder_image_repository_url')}" + + ci_provisioning_role_arn: "%{hiera('ci_provisioning_role_arn')}" + ci_deployment_type: "%{hiera('ci_deployment_type')}" + ci_deployment_label: "%{hiera('ci_deployment_label')}" + + slack_success_channel: "#builds" + slack_success_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> _successful_! :clap:." + slack_error_channel: "#engineering" + slack_error_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *errored*! :cry:." + slack_failure_channel: "#engineering" + slack_failure_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *failed*! :cry:." + slack_abort_channel: "#engineering" + slack_abort_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *aborted*! :warning:." \ No newline at end of file diff --git a/config/roles/database.yaml b/config/roles/database.yaml new file mode 100644 index 00000000..bb7e2271 --- /dev/null +++ b/config/roles/database.yaml @@ -0,0 +1,29 @@ +--- +vars: + region: "%{hiera('region')}" + + component: "%{hiera('component')}" + deployment_identifier: "%{hiera('deployment_identifier')}" + + mongodb_atlas_organization_id: "%{hiera('mongodb_atlas_organization_id')}" + mongodb_atlas_public_key: "%{hiera('mongodb_atlas_public_key')}" + mongodb_atlas_private_key: "%{hiera('mongodb_atlas_private_key')}" + + database_version: "%{hiera('database_version')}" + database_instance_size_name: "%{hiera('database_instance_size_name')}" + database_service_user_username: "%{hiera('database_service_user_username')}" + database_service_user_password: "%{hiera('database_service_user_password')}" + database_read_only_user_username: "%{hiera('database_read_only_user_username')}" + database_read_only_user_password: "%{hiera('database_read_only_user_password')}" + database_allow_cidrs: "%{hiera('database_allow_cidrs')}" + + network_state_bucket_name: "%{hiera('network_state_bucket_name')}" + network_state_key: "%{hiera('network_state_key')}" + network_state_bucket_region: "%{hiera('network_state_bucket_region')}" + network_state_bucket_is_encrypted: "%{hiera('network_state_bucket_is_encrypted')}" + +backend_config: + bucket: "%{hiera('database_state_bucket_name')}" + key: "%{hiera('database_state_key')}" + region: "%{hiera('database_state_bucket_region')}" + encrypt: "%{hiera('database_state_bucket_is_encrypted')}" diff --git a/config/roles/demo-pipeline.yaml b/config/roles/demo-pipeline.yaml new file mode 100644 index 00000000..7996eb63 --- /dev/null +++ b/config/roles/demo-pipeline.yaml @@ -0,0 +1,29 @@ +--- +vars: + source_repository_url: "%{hiera('source_repository_url')}" + source_repository_branch: "%{hiera('source_repository_branch')}" + + app_image_repository_url: "%{hiera('app_image_repository_url')}" + keepers_image_repository_url: "%{hiera('keepers_image_repository_url')}" + node_builder_image_repository_url: "%{hiera('node_builder_image_repository_url')}" + + storage_bucket_name: "%{hiera('ci_storage_bucket_name')}" + storage_bucket_region: "%{hiera('ci_storage_bucket_region')}" + storage_bucket_encryption: "%{hiera('ci_storage_bucket_encryption')}" + + ci_provisioning_role_arn: "%{hiera('ci_provisioning_role_arn')}" + ci_deployment_type: "%{hiera('ci_deployment_type')}" + ci_deployment_label: "%{hiera('ci_deployment_label')}" + + demo_mendelevium_provisioning_role_arn: "%{hiera('demo_mendelevium_provisioning_role_arn')}" + demo_mendelevium_deployment_type: "%{hiera('demo_mendelevium_deployment_type')}" + demo_mendelevium_deployment_label: "%{hiera('demo_mendelevium_deployment_label')}" + + slack_success_channel: "#builds" + slack_success_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> _successful_! :clap:." + slack_error_channel: "#engineering" + slack_error_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *errored*! :cry:." + slack_failure_channel: "#engineering" + slack_failure_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *failed*! :cry:." + slack_abort_channel: "#engineering" + slack_abort_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *aborted*! :warning:." diff --git a/config/roles/develop-pipeline.yaml b/config/roles/develop-pipeline.yaml new file mode 100644 index 00000000..3b73acd7 --- /dev/null +++ b/config/roles/develop-pipeline.yaml @@ -0,0 +1,29 @@ +--- +vars: + source_repository_url: "%{hiera('source_repository_url')}" + source_repository_branch: "%{hiera('source_repository_branch')}" + + app_image_repository_url: "%{hiera('app_image_repository_url')}" + keepers_image_repository_url: "%{hiera('keepers_image_repository_url')}" + node_builder_image_repository_url: "%{hiera('node_builder_image_repository_url')}" + + storage_bucket_name: "%{hiera('ci_storage_bucket_name')}" + storage_bucket_region: "%{hiera('ci_storage_bucket_region')}" + storage_bucket_encryption: "%{hiera('ci_storage_bucket_encryption')}" + + ci_provisioning_role_arn: "%{hiera('ci_provisioning_role_arn')}" + ci_deployment_type: "%{hiera('ci_deployment_type')}" + ci_deployment_label: "%{hiera('ci_deployment_label')}" + + development_plutonium_provisioning_role_arn: "%{hiera('development_plutonium_provisioning_role_arn')}" + development_plutonium_deployment_type: "%{hiera('development_plutonium_deployment_type')}" + development_plutonium_deployment_label: "%{hiera('development_plutonium_deployment_label')}" + + slack_success_channel: "#builds" + slack_success_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> _successful_! :clap:." + slack_error_channel: "#engineering" + slack_error_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *errored*! :cry:." + slack_failure_channel: "#engineering" + slack_failure_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *failed*! :cry:." + slack_abort_channel: "#engineering" + slack_abort_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *aborted*! :warning:." diff --git a/config/roles/functions.yaml b/config/roles/functions.yaml new file mode 100644 index 00000000..767a80b1 --- /dev/null +++ b/config/roles/functions.yaml @@ -0,0 +1,24 @@ +--- +vars: + region: "%{hiera('region')}" + + component: "%{hiera('component')}" + deployment_identifier: "%{hiera('deployment_identifier')}" + + voucher_kernel_address: "%{hiera('voucher_kernel_address')}" + cashier_address: "%{hiera('cashier_address')}" + gcloud_keepers_secret: "%{hiera('gcloud_keepers_secret')}" + executor_secret: "%{hiera('executor_secret')}" + etherscan_apikey: "%{hiera('etherscan_apikey')}" + infura_apikey: "%{hiera('infura_apikey')}" + + service_state_bucket_region: "%{hiera('service_state_bucket_region')}" + service_state_bucket_name: "%{hiera('service_state_bucket_name')}" + service_state_bucket_is_encrypted: "%{hiera('service_state_bucket_is_encrypted')}" + service_state_key: "%{hiera('service_state_key')}" + +backend_config: + region: "%{hiera('functions_state_bucket_region')}" + bucket: "%{hiera('functions_state_bucket_name')}" + encrypt: "%{hiera('functions_state_bucket_is_encrypted')}" + key: "%{hiera('functions_state_key')}" diff --git a/config/roles/image-repository.yaml b/config/roles/image-repository.yaml new file mode 100644 index 00000000..4b05dc4a --- /dev/null +++ b/config/roles/image-repository.yaml @@ -0,0 +1,13 @@ +--- +vars: + region: "%{hiera('region')}" + + repository_name: "%{hiera('image_repository_name')}" + + allowed_role_arns: "%{hiera('image_repository_allowed_role_arns')}" + +backend_config: + bucket: "%{hiera('image_repository_state_bucket_name')}" + key: "%{hiera('image_repository_state_key')}" + region: "%{hiera('image_repository_state_bucket_region')}" + encrypt: "%{hiera('image_repository_state_bucket_is_encrypted')}" diff --git a/config/roles/image-storage-bucket.yaml b/config/roles/image-storage-bucket.yaml new file mode 100644 index 00000000..dfd1570c --- /dev/null +++ b/config/roles/image-storage-bucket.yaml @@ -0,0 +1,17 @@ +--- +vars: + region: "%{hiera('region')}" + + deployment_type: "%{deployment_type}" + deployment_label: "%{deployment_label}" + deployment_identifier: "%{hiera('deployment_identifier')}" + + image_storage_bucket_name: "%{hiera('image_storage_bucket_name')}" + image_storage_user_name: "%{hiera('image_storage_user_name')}" + image_storage_user_public_gpg_key_path: "%{hiera('image_storage_user_public_gpg_key_path')}" + +backend_config: + bucket: "%{hiera('image_storage_bucket_state_bucket_name')}" + key: "%{hiera('image_storage_bucket_state_key')}" + region: "%{hiera('image_storage_bucket_state_bucket_region')}" + encrypt: "%{hiera('image_storage_bucket_state_bucket_is_encrypted')}" diff --git a/config/roles/integration-tests.yaml b/config/roles/integration-tests.yaml new file mode 100644 index 00000000..90a94ada --- /dev/null +++ b/config/roles/integration-tests.yaml @@ -0,0 +1,9 @@ +environment: + AWS_IMAGE_UPLOAD_STORAGE_BUCKET_NAME: "%{hiera('image_storage_bucket_name')}" + AWS_REGION: "%{hiera('region')}" + AWS_ACCESS_KEY_ID: "%{hiera('aws_image_storage_user_access_key_id')}" + AWS_SECRET_ACCESS_KEY: "%{hiera('aws_image_storage_user_secret_access_key')}" + + GCP_IMAGE_UPLOAD_STORAGE_BUCKET_NAME: "%{hiera('gcp_image_upload_storage_bucket_name')}" + + GOOGLE_APPLICATION_CREDENTIALS: "%{hiera('google_application_credentials')}" diff --git a/config/roles/keepers-image-repository.yaml b/config/roles/keepers-image-repository.yaml new file mode 100644 index 00000000..ef38598a --- /dev/null +++ b/config/roles/keepers-image-repository.yaml @@ -0,0 +1,13 @@ +--- +vars: + region: "%{hiera('region')}" + + repository_name: "%{hiera('keepers_image_repository_name')}" + + allowed_role_arns: "%{hiera('keepers_image_repository_allowed_role_arns')}" + +backend_config: + bucket: "%{hiera('keepers_image_repository_state_bucket_name')}" + key: "%{hiera('keepers_image_repository_state_key')}" + region: "%{hiera('keepers_image_repository_state_bucket_region')}" + encrypt: "%{hiera('keepers_image_repository_state_bucket_is_encrypted')}" diff --git a/config/roles/keepers-service.yaml b/config/roles/keepers-service.yaml new file mode 100644 index 00000000..b22ab5e3 --- /dev/null +++ b/config/roles/keepers-service.yaml @@ -0,0 +1,46 @@ +--- +vars: + region: "%{hiera('region')}" + component: "keepers" + deployment_identifier: "%{hiera('deployment_identifier')}" + + service_desired_count: 1 + + secrets_bucket_name: "%{hiera('secrets_bucket_name')}" + + version_number: "%{hiera('version_number')}" + + service_name: "keepers" + container_http_port: "3001" + + token_contact_address: "%{hiera('token_contact_address')}" + boson_router_contact_address: "%{hiera('boson_router_contact_address')}" + voucher_kernel_address: "%{hiera('voucher_kernel_address')}" + alchemy_url: "%{hiera('alchemy_url')}" + gcloud_keepers_secret: "%{hiera('gcloud_keepers_secret')}" + + network_state_bucket_region: "%{hiera('network_state_bucket_region')}" + network_state_bucket_name: "%{hiera('network_state_bucket_name')}" + network_state_bucket_is_encrypted: "%{hiera('network_state_bucket_is_encrypted')}" + network_state_key: "%{hiera('network_state_key')}" + + cluster_state_bucket_region: "%{hiera('cluster_state_bucket_region')}" + cluster_state_bucket_name: "%{hiera('cluster_state_bucket_name')}" + cluster_state_bucket_is_encrypted: "%{hiera('cluster_state_bucket_is_encrypted')}" + cluster_state_key: "%{hiera('cluster_state_key')}" + + image_repository_state_bucket_region: "%{hiera('keepers_image_repository_state_bucket_region')}" + image_repository_state_bucket_name: "%{hiera('keepers_image_repository_state_bucket_name')}" + image_repository_state_bucket_is_encrypted: "%{hiera('keepers_image_repository_state_bucket_is_encrypted')}" + image_repository_state_key: "%{hiera('keepers_image_repository_state_key')}" + + service_state_bucket_region: "%{hiera('service_state_bucket_region')}" + service_state_bucket_name: "%{hiera('service_state_bucket_name')}" + service_state_bucket_is_encrypted: "%{hiera('service_state_bucket_is_encrypted')}" + service_state_key: "%{hiera('service_state_key')}" + +backend_config: + region: "%{hiera('keepers_service_state_bucket_region')}" + bucket: "%{hiera('keepers_service_state_bucket_name')}" + encrypt: "%{hiera('keepers_service_state_bucket_is_encrypted')}" + key: "%{hiera('keepers_service_state_key')}" diff --git a/config/roles/local-app.yaml b/config/roles/local-app.yaml new file mode 100644 index 00000000..ee8ffcda --- /dev/null +++ b/config/roles/local-app.yaml @@ -0,0 +1,18 @@ +environment: + PORT: "%{hiera('app_port')}" + + DB_CONNECTION_STRING: "mongodb://localhost:%{hiera('database_port')}" + DB_NAME: "api" + DB_USERNAME: "%{hiera('database_username')}" + DB_PASSWORD: "%{hiera('database_password')}" + + TOKEN_SECRET: "%{hiera('token_secret')}" + GCLOUD_SECRET: "%{hiera('gcloud_secret')}" + + AWS_ACCESS_KEY_ID: "%{hiera('aws_image_storage_user_access_key_id')}" + AWS_SECRET_ACCESS_KEY: "%{hiera('aws_image_storage_user_secret_access_key')}" + + IMAGE_UPLOAD_STORAGE_ENGINE: "%{hiera('image_upload_storage_engine')}" + IMAGE_UPLOAD_STORAGE_BUCKET_NAME: "%{hiera('image_storage_bucket_name')}" + + GOOGLE_APPLICATION_CREDENTIALS: "%{hiera('google_application_credentials')}" diff --git a/config/roles/pr-pipeline.yaml b/config/roles/pr-pipeline.yaml new file mode 100644 index 00000000..f7cb38c5 --- /dev/null +++ b/config/roles/pr-pipeline.yaml @@ -0,0 +1,20 @@ +--- +vars: + source_repository_name: "%{hiera('source_repository_name')}" + source_repository_url: "%{hiera('source_repository_url')}" + source_repository_branch: "%{hiera('source_repository_branch')}" + + node_builder_image_repository_url: "%{hiera('node_builder_image_repository_url')}" + + ci_provisioning_role_arn: "%{hiera('ci_provisioning_role_arn')}" + ci_deployment_type: "%{hiera('ci_deployment_type')}" + ci_deployment_label: "%{hiera('ci_deployment_label')}" + + slack_success_channel: "#builds" + slack_success_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> _successful_! :clap:." + slack_error_channel: "#engineering" + slack_error_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *errored*! :cry:." + slack_failure_channel: "#engineering" + slack_failure_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *failed*! :cry:." + slack_abort_channel: "#engineering" + slack_abort_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *aborted*! :warning:." \ No newline at end of file diff --git a/config/roles/service.yaml b/config/roles/service.yaml new file mode 100644 index 00000000..8748d710 --- /dev/null +++ b/config/roles/service.yaml @@ -0,0 +1,59 @@ +--- +vars: + region: "%{hiera('region')}" + component: "%{hiera('component')}" + deployment_identifier: "%{hiera('deployment_identifier')}" + + service_desired_count: 3 + + secrets_bucket_name: "%{hiera('secrets_bucket_name')}" + + version_number: "%{hiera('version_number')}" + + service_name: "reference-backend" + container_http_port: "3000" + host_http_port: "3000" + + token_secret: "%{hiera('token_secret')}" + gcloud_secret: "%{hiera('gcloud_secret')}" + + image_upload_storage_engine: "%{hiera('image_upload_storage_engine')}" + image_upload_storage_bucket_name: "%{hiera('image_storage_bucket_name')}" + + superadmin_username: "%{hiera('superadmin_username')}" + superadmin_password: "%{hiera('superadmin_password')}" + + database_username: "%{hiera('database_username')}" + database_password: "%{hiera('database_password')}" + database_name: "%{hiera('database_name')}" + + domain_state_bucket_region: "%{hiera('domain_state_bucket_region')}" + domain_state_bucket_name: "%{hiera('domain_state_bucket_name')}" + domain_state_bucket_is_encrypted: "%{hiera('domain_state_bucket_is_encrypted')}" + domain_state_key: "%{hiera('domain_state_key')}" + + network_state_bucket_region: "%{hiera('network_state_bucket_region')}" + network_state_bucket_name: "%{hiera('network_state_bucket_name')}" + network_state_bucket_is_encrypted: "%{hiera('network_state_bucket_is_encrypted')}" + network_state_key: "%{hiera('network_state_key')}" + + database_state_bucket_name: "%{hiera('database_state_bucket_name')}" + database_state_key: "%{hiera('database_state_key')}" + database_state_bucket_region: "%{hiera('database_state_bucket_region')}" + database_state_bucket_is_encrypted: "%{hiera('database_state_bucket_is_encrypted')}" + + cluster_state_bucket_region: "%{hiera('cluster_state_bucket_region')}" + cluster_state_bucket_name: "%{hiera('cluster_state_bucket_name')}" + cluster_state_bucket_is_encrypted: "%{hiera('cluster_state_bucket_is_encrypted')}" + cluster_state_key: "%{hiera('cluster_state_key')}" + + image_repository_state_bucket_region: "%{hiera('image_repository_state_bucket_region')}" + image_repository_state_bucket_name: "%{hiera('image_repository_state_bucket_name')}" + image_repository_state_bucket_is_encrypted: "%{hiera('image_repository_state_bucket_is_encrypted')}" + image_repository_state_key: "%{hiera('image_repository_state_key')}" + +backend_config: + region: "%{hiera('service_state_bucket_region')}" + bucket: "%{hiera('service_state_bucket_name')}" + encrypt: "%{hiera('service_state_bucket_is_encrypted')}" + key: "%{hiera('service_state_key')}" diff --git a/config/roles/tag-pipeline.yaml b/config/roles/tag-pipeline.yaml new file mode 100644 index 00000000..9b5a221c --- /dev/null +++ b/config/roles/tag-pipeline.yaml @@ -0,0 +1,29 @@ +--- +vars: + source_repository_url: "%{hiera('source_repository_url')}" + source_repository_branch: "%{hiera('source_repository_branch')}" + + app_image_repository_url: "%{hiera('app_image_repository_url')}" + keepers_image_repository_url: "%{hiera('keepers_image_repository_url')}" + node_builder_image_repository_url: "%{hiera('node_builder_image_repository_url')}" + + storage_bucket_name: "%{hiera('ci_storage_bucket_name')}" + storage_bucket_region: "%{hiera('ci_storage_bucket_region')}" + storage_bucket_encryption: "%{hiera('ci_storage_bucket_encryption')}" + + ci_provisioning_role_arn: "%{hiera('ci_provisioning_role_arn')}" + ci_deployment_type: "%{hiera('ci_deployment_type')}" + ci_deployment_label: "%{hiera('ci_deployment_label')}" + + production_oganesson_provisioning_role_arn: "%{hiera('production_oganesson_provisioning_role_arn')}" + production_oganesson_deployment_type: "%{hiera('production_oganesson_deployment_type')}" + production_oganesson_deployment_label: "%{hiera('production_oganesson_deployment_label')}" + + slack_success_channel: "#builds" + slack_success_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> _successful_! :clap:." + slack_error_channel: "#engineering" + slack_error_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *errored*! :cry:." + slack_failure_channel: "#engineering" + slack_failure_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *failed*! :cry:." + slack_abort_channel: "#engineering" + slack_abort_message: "<%{hiera('concourse_url')}/builds/$BUILD_ID|$BUILD_TEAM_NAME:$BUILD_PIPELINE_NAME:$BUILD_JOB_NAME [$BUILD_NAME]> *aborted*! :warning:." diff --git a/config/secrets/.unlocked b/config/secrets/.unlocked new file mode 100644 index 00000000..08384ac3 Binary files /dev/null and b/config/secrets/.unlocked differ diff --git a/config/secrets/app/bsn-demo-mendelevium.yaml b/config/secrets/app/bsn-demo-mendelevium.yaml new file mode 100644 index 00000000..3a61ab1b Binary files /dev/null and b/config/secrets/app/bsn-demo-mendelevium.yaml differ diff --git a/config/secrets/app/bsn-development-plutonium.yaml b/config/secrets/app/bsn-development-plutonium.yaml new file mode 100644 index 00000000..35e25dd6 Binary files /dev/null and b/config/secrets/app/bsn-development-plutonium.yaml differ diff --git a/config/secrets/app/bsn-production-oganesson.yaml b/config/secrets/app/bsn-production-oganesson.yaml new file mode 100644 index 00000000..0cd2b52f Binary files /dev/null and b/config/secrets/app/bsn-production-oganesson.yaml differ diff --git a/config/secrets/app/gpg.passphrase b/config/secrets/app/gpg.passphrase new file mode 100644 index 00000000..2a40252d Binary files /dev/null and b/config/secrets/app/gpg.passphrase differ diff --git a/config/secrets/app/gpg.private b/config/secrets/app/gpg.private new file mode 100644 index 00000000..40f5c37a Binary files /dev/null and b/config/secrets/app/gpg.private differ diff --git a/config/secrets/app/gpg.public b/config/secrets/app/gpg.public new file mode 100644 index 00000000..147ffc34 Binary files /dev/null and b/config/secrets/app/gpg.public differ diff --git a/config/secrets/app/local-development.yaml b/config/secrets/app/local-development.yaml new file mode 100644 index 00000000..f0cbcbbf Binary files /dev/null and b/config/secrets/app/local-development.yaml differ diff --git a/config/secrets/app/local-testing.yaml b/config/secrets/app/local-testing.yaml new file mode 100644 index 00000000..66d2375a Binary files /dev/null and b/config/secrets/app/local-testing.yaml differ diff --git a/config/secrets/database/bsn-demo-mendelevium.yaml b/config/secrets/database/bsn-demo-mendelevium.yaml new file mode 100644 index 00000000..45db43bc Binary files /dev/null and b/config/secrets/database/bsn-demo-mendelevium.yaml differ diff --git a/config/secrets/database/bsn-development-plutonium.yaml b/config/secrets/database/bsn-development-plutonium.yaml new file mode 100644 index 00000000..45db43bc Binary files /dev/null and b/config/secrets/database/bsn-development-plutonium.yaml differ diff --git a/config/secrets/database/bsn-production-oganesson.yaml b/config/secrets/database/bsn-production-oganesson.yaml new file mode 100644 index 00000000..eefcdd92 Binary files /dev/null and b/config/secrets/database/bsn-production-oganesson.yaml differ diff --git a/config/secrets/database/rdm-management-default.yaml b/config/secrets/database/rdm-management-default.yaml new file mode 100644 index 00000000..96337abd Binary files /dev/null and b/config/secrets/database/rdm-management-default.yaml differ diff --git a/config/secrets/gcp/local-development.yaml b/config/secrets/gcp/local-development.yaml new file mode 100644 index 00000000..3c1405e8 Binary files /dev/null and b/config/secrets/gcp/local-development.yaml differ diff --git a/config/secrets/gcp/local-testing.yaml b/config/secrets/gcp/local-testing.yaml new file mode 100644 index 00000000..3c1405e8 Binary files /dev/null and b/config/secrets/gcp/local-testing.yaml differ diff --git a/config/secrets/gcp/test-bucket-credentials.json b/config/secrets/gcp/test-bucket-credentials.json new file mode 100644 index 00000000..0b6dd95a Binary files /dev/null and b/config/secrets/gcp/test-bucket-credentials.json differ diff --git a/config/secrets/mongodbatlas/credentials.yaml b/config/secrets/mongodbatlas/credentials.yaml new file mode 100644 index 00000000..b2c255f2 Binary files /dev/null and b/config/secrets/mongodbatlas/credentials.yaml differ diff --git a/config/secrets/pipeline/constants.yaml b/config/secrets/pipeline/constants.yaml new file mode 100644 index 00000000..894a40a2 Binary files /dev/null and b/config/secrets/pipeline/constants.yaml differ diff --git a/config/secrets/pipeline/rdm-management-default.yaml b/config/secrets/pipeline/rdm-management-default.yaml new file mode 100644 index 00000000..27e627c6 Binary files /dev/null and b/config/secrets/pipeline/rdm-management-default.yaml differ diff --git a/docs/assets/architecture-diagram.png b/docs/assets/architecture-diagram.png new file mode 100644 index 00000000..6e35d3a5 Binary files /dev/null and b/docs/assets/architecture-diagram.png differ diff --git a/docs/assets/banner.png b/docs/assets/banner.png new file mode 100644 index 00000000..630810db Binary files /dev/null and b/docs/assets/banner.png differ diff --git a/docs/setup/linux.md b/docs/setup/linux.md new file mode 100644 index 00000000..192b21dc --- /dev/null +++ b/docs/setup/linux.md @@ -0,0 +1,97 @@ +# Machine Setup - Linux + +## Requirements + +In order for the build to run correctly, a few tools will need to be installed +on your development machine: + +* git +* direnv +* Node (12.20) +* NPM (> 6) +* Ruby (2.7) +* Bundler (> 2) +* Docker + +## Installation + +Installing the required tools is dependent on your distribution. In this guide, +we assume a Debian based distribution. + +### git & direnv + +To install git: + +```shell script +apt-get install git +``` + +To install direnv: + +```shell script +apt-get install direnv +echo "$(direnv hook bash)" >> ~/.bashrc +exec $SHELL + +direnv allow +``` + +Note: if you use zsh instead of bash, change `~/.bashrc` above to `~/.zshrc` +and use `direnv hook zsh`. + +### Node & NPM + +To install Node & NPM: + +```shell script +apt-get update +apt-get install curl +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash +mkdir ~/.nvm +echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc +echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc +echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> ~/.bashrc +exec $SHELL +nvm install 10.23.0 +nvm use 10.23.0 +``` + +Note: if you use zsh instead of bash, change `~/.bashrc` above to `~/.zshrc`. + +### Ruby & Bundler + +To install Ruby and bundler: + +```shell script +apt-get update +apt-get install \ + git curl libssl-dev libreadline-dev zlib1g-dev \ + autoconf bison build-essential libyaml-dev \ + libreadline-dev libncurses5-dev libffi-dev libgdbm-dev +curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash +echo 'export PATH="$PATH:~/.rbenv/bin"' >> ~/.bashrc +echo 'eval "$(rbenv init - bash)"' >> ~/.bashrc +exec $SHELL +rbenv install 2.7.2 +rbenv rehash +rbenv local 2.7.2 +gem install bundler +``` + +Note: if you use zsh instead of bash, change `~/.bashrc` above to `~/.zshrc` +and use `rbenv init - zsh`. + +Note: if you use Fedora, see installation instructions at +[Installing Ruby and Rails with rbenv](https://developer.fedoraproject.org/start/sw/web-app/rails.html). + +### Docker + +To install Docker: + +```shell script +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh +sudo systemctl start docker +``` + +Note: if your system does not have systemctl, change `sudo systemctl start docker` above to `sudo service docker start` \ No newline at end of file diff --git a/docs/setup/osx.md b/docs/setup/osx.md new file mode 100644 index 00000000..d9a773f3 --- /dev/null +++ b/docs/setup/osx.md @@ -0,0 +1,89 @@ +# Machine Setup - OS X + +## Requirements + +In order for the build to run correctly, a few tools will need to be installed +on your development machine: + +* git +* direnv +* Node (12.20) +* NPM (> 6) +* Ruby (2.7) +* Bundler (> 2) +* Docker + +## Installation + +Installing the required tools is best managed by [homebrew](http://brew.sh). + +To install homebrew: + +``` +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +``` + +### git & direnv + +To install git: + +```shell script +brew install git +``` + +To install direnv: + +```shell script +brew install direnv +echo "$(direnv hook zsh)" >> ~/.zshrc +exec $SHELL + +direnv allow +``` + +Note: if you use bash instead of zsh, change `~/.zshrc` above to `~/.bashrc` +and use `direnv hook bash`. + +### Node & NPM + +To install Node & NPM: + +```shell script +brew install nvm +mkdir ~/.nvm +echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc +echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> ~/.zshrc +echo '[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm"' >> ~/.zshrc +exec $SHELL +nvm install 10.23.0 +nvm use 10.23.0 +``` + +Note: if you use bash instead of zsh, change `~/.zshrc` above to `~/.bashrc` + +### Ruby & Bundler + +To install Ruby and bundler: + +```shell script +brew install rbenv +brew install ruby-build +echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc +exec $SHELL +rbenv install 2.7.2 +rbenv rehash +rbenv local 2.7.2 +gem install bundler +``` + +Note: if you use bash instead of zsh, change `~/.zshrc` above to `~/.bashrc` +and use `rbenv init - bash`. + +### Docker + +To install Docker: + +```shell script +Download Docker Desktop from the following link: https://hub.docker.com/editions/community/docker-ce-desktop-mac/ +Follow the installation instructions. +``` diff --git a/firebase.json b/external/firebase.json similarity index 100% rename from firebase.json rename to external/firebase.json diff --git a/external/functions/src/utils_BACKUP_17854.js b/external/functions/src/utils_BACKUP_17854.js new file mode 100644 index 00000000..329c38b5 --- /dev/null +++ b/external/functions/src/utils_BACKUP_17854.js @@ -0,0 +1,116 @@ +const ethers = require("ethers"); +const VoucherKernel = require("../abis/VoucherKernel.json"); + +const ONE = 1; + +const IDX_COMMIT = 7; +const IDX_REDEEM = 6; +const IDX_REFUND = 5; +const IDX_EXPIRE = 4; +const IDX_COMPLAIN = 3; +const IDX_CANCEL_FAULT = 2; +const IDX_FINAL = 1; + +async function findEventByName(txReceipt, eventName, ...eventFields) { + if (typeof txReceipt !== "object" || txReceipt === null) return; + + let eventsArr = []; + + for (const key in txReceipt.events) { + if ( + Object.prototype.hasOwnProperty.call(txReceipt.events, key) && + txReceipt.events[key].event === eventName + ) { + const event = txReceipt.events[key]; + + const resultObj = { + txHash: txReceipt.transactionHash, + }; + + for (let index = 0; index < eventFields.length; index++) { + resultObj[eventFields[index]] = event.args[ + eventFields[index] + ].toString(); + } + eventsArr.push(resultObj); + } + } + + return eventsArr; +} + +function isStatus(_status, idx) { + return (_status >> idx) & (ONE == 1); +} + +async function getComplainPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getComplainPeriod(); +} + +async function getCancelFaultPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getCancelFaultPeriod(); +} + +async function getVoucherValidTo(config, executor, voucherId) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + const promiseKey = await vk.getPromiseIdFromVoucherId(voucherId); + return (await vk.getPromiseData(promiseKey)).validTo.toString(); +} + +async function getCurrTimestamp(provider) { + let blockNumber = await provider.getBlockNumber(); + let block = await provider.getBlock(blockNumber); + + return block.timestamp; +} + +function isStateCommitted(status) { + return status == setChange(0, IDX_COMMIT); +} + +function isStateRedemptionSigned(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REDEEM); +} + +function isStateRefunded(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REFUND); +} + +function isStateExpired(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_EXPIRE); +} + +function setChange(status, changeIdx) { + return status | (ONE << changeIdx); +} + +module.exports = { + IDX_FINAL, + IDX_EXPIRE, + IDX_COMPLAIN, + IDX_CANCEL_FAULT, + findEventByName, + isStatus, + getCurrTimestamp, + getComplainPeriod, + getCancelFaultPeriod, + getVoucherValidTo, + isStateCommitted, + isStateRedemptionSigned, + isStateRefunded, + isStateExpired, +}; diff --git a/external/keepers/.gitignore b/external/keepers/.gitignore new file mode 100644 index 00000000..1bf44009 --- /dev/null +++ b/external/keepers/.gitignore @@ -0,0 +1,10 @@ +# Node / NPM / Yarn +node_modules + +# OS +.DS_Store + +#Personal Preferences +.vscode + +.env \ No newline at end of file diff --git a/external/keepers/README.md b/external/keepers/README.md new file mode 100644 index 00000000..5950e164 --- /dev/null +++ b/external/keepers/README.md @@ -0,0 +1,12 @@ +# Keepers +Keeper services for Leptonite + +Whenever an event is emitted on the network the Keepers will catch the event and store the required information in the database respectively. + +### Local Development +In order to run the keepers locally you would need to create your `.env` file similar to `.env.example` in the current directory. + +### Run +```shell +npm run start:local:keepers +``` diff --git a/external/keepers/package-lock.json b/external/keepers/package-lock.json new file mode 100644 index 00000000..07b581b7 --- /dev/null +++ b/external/keepers/package-lock.json @@ -0,0 +1,576 @@ +{ + "name": "event-listeners", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.10.tgz", + "integrity": "sha512-cfC3lGgotfxX3SMri4+CisOPwignoj/QGHW9J29spC4R4Qqcnk/SYuVkPFBMdLbvBp3f/pGiVqPNwont0TSXhg==", + "requires": { + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.8.tgz", + "integrity": "sha512-fqJXkewcGdi8LogKMgRyzc/Ls2js07yor7+g9KfPs09uPOcQLg7cc34JN+lk34HH9gg2HU0DIA5797ZR8znkfw==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/networks": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/web": "^5.0.12" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.11.tgz", + "integrity": "sha512-RKOgPSEYafknA62SrD3OCK42AllHE4YBfKYXyQeM+sBP7Nq3X5FpzeoY4uzC43P4wIhmNoTHCKQuwnX7fBqb6Q==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7" + } + }, + "@ethersproject/address": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.9.tgz", + "integrity": "sha512-gKkmbZDMyGbVjr8nA5P0md1GgESqSGH7ILIrDidPdNXBl4adqbuA3OAuZx/O2oGpL6PtJ9BDa0kHheZ1ToHU3w==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" + } + }, + "@ethersproject/base64": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.7.tgz", + "integrity": "sha512-S5oh5DVfCo06xwJXT8fQC68mvJfgScTl2AXvbYMsHNfIBTDb084Wx4iA9MNlEReOv6HulkS+gyrUM/j3514rSw==", + "requires": { + "@ethersproject/bytes": "^5.0.9" + } + }, + "@ethersproject/basex": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.7.tgz", + "integrity": "sha512-OsXnRsujGmYD9LYyJlX+cVe5KfwgLUbUJrJMWdzRWogrygXd5HvGd7ygX1AYjlu1z8W/+t2FoQnczDR/H2iBjA==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/properties": "^5.0.7" + } + }, + "@ethersproject/bignumber": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.13.tgz", + "integrity": "sha512-b89bX5li6aK492yuPP5mPgRVgIxxBP7ksaBtKX5QQBsrZTpNOjf/MR4CjcUrAw8g+RQuD6kap9lPjFgY4U1/5A==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "bn.js": "^4.4.0" + } + }, + "@ethersproject/bytes": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.9.tgz", + "integrity": "sha512-k+17ZViDtAugC0s7HM6rdsTWEdIYII4RPCDkPEuxKc6i40Bs+m6tjRAtCECX06wKZnrEoR9pjOJRXHJ/VLoOcA==", + "requires": { + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/constants": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.8.tgz", + "integrity": "sha512-sCc73pFBsl59eDfoQR5OCEZCRv5b0iywadunti6MQIr5lt3XpwxK1Iuzd8XSFO02N9jUifvuZRrt0cY0+NBgTg==", + "requires": { + "@ethersproject/bignumber": "^5.0.13" + } + }, + "@ethersproject/contracts": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.9.tgz", + "integrity": "sha512-CCTxVeDh6sjdSEbjzONhtwPjECvaHE62oGkY8M7kP0CHmgLD2SEGel0HZib8e5oQKRKGly9AKcUFW4g3rQ0AQw==", + "requires": { + "@ethersproject/abi": "^5.0.10", + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7" + } + }, + "@ethersproject/hash": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", + "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" + } + }, + "@ethersproject/hdnode": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.8.tgz", + "integrity": "sha512-Mscpjd7BBjxYSWghaNMwV0xrBBkOoCq6YEPRm9MgE24CiBlzzbfEB5DGq6hiZqhQaxPkdCUtKKqZi3nt9hx43g==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/basex": "^5.0.7", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/pbkdf2": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/wordlists": "^5.0.8" + } + }, + "@ethersproject/json-wallets": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.10.tgz", + "integrity": "sha512-Ux36u+d7Dm0M5AQ+mWuHdvfGPMN8K1aaLQgwzrsD4ELTWlwRuHuQbmn7/GqeOpbfaV6POLwdYcBk2TXjlGp/IQ==", + "requires": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hdnode": "^5.0.8", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/pbkdf2": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "@ethersproject/keccak256": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.7.tgz", + "integrity": "sha512-zpUBmofWvx9PGfc7IICobgFQSgNmTOGTGLUxSYqZzY/T+b4y/2o5eqf/GGmD7qnTGzKQ42YlLNo+LeDP2qe55g==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "js-sha3": "0.5.7" + } + }, + "@ethersproject/logger": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.8.tgz", + "integrity": "sha512-SkJCTaVTnaZ3/ieLF5pVftxGEFX56pTH+f2Slrpv7cU0TNpUZNib84QQdukd++sWUp/S7j5t5NW+WegbXd4U/A==" + }, + "@ethersproject/networks": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.7.tgz", + "integrity": "sha512-dI14QATndIcUgcCBL1c5vUr/YsI5cCHLN81rF7PU+yS7Xgp2/Rzbr9+YqpC6NBXHFUASjh6GpKqsVMpufAL0BQ==", + "requires": { + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/pbkdf2": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.7.tgz", + "integrity": "sha512-0SNLNixPMqnosH6pyc4yPiUu/C9/Jbu+f6I8GJW9U2qNpMBddmRJviwseoha5Zw1V+Aw0Z/yvYyzIIE8yPXqLA==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/sha2": "^5.0.7" + } + }, + "@ethersproject/properties": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.7.tgz", + "integrity": "sha512-812H1Rus2vjw0zbasfDI1GLNPDsoyX1pYqiCgaR1BuyKxUTbwcH1B+214l6VGe1v+F6iEVb7WjIwMjKhb4EUsg==", + "requires": { + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/providers": { + "version": "5.0.19", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.19.tgz", + "integrity": "sha512-G+flo1jK1y/rvQy6b71+Nu7qOlkOKz+XqpgqFMZslkCzGuzQRmk9Qp7Ln4soK8RSyP1e5TCujaRf1H+EZahoaw==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/basex": "^5.0.7", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/networks": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/rlp": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/web": "^5.0.12", + "bech32": "1.1.4", + "ws": "7.2.3" + } + }, + "@ethersproject/random": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.7.tgz", + "integrity": "sha512-PxSRWwN3s+FH9AWMZU6AcWJsNQ9KzqKV6NgdeKPtxahdDjCuXxTAuzTZNXNRK+qj+Il351UnweAGd+VuZcOAlQ==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/rlp": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.7.tgz", + "integrity": "sha512-ulUTVEuV7PT4jJTPpfhRHK57tkLEDEY9XSYJtrSNHOqdwMvH0z7BM2AKIMq4LVDlnu4YZASdKrkFGEIO712V9w==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/sha2": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.7.tgz", + "integrity": "sha512-MbUqz68hhp5RsaZdqi1eg1rrtiqt5wmhRYqdA7MX8swBkzW2KiLgK+Oh25UcWhUhdi1ImU9qrV6if5j0cC7Bxg==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "hash.js": "1.1.3" + }, + "dependencies": { + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + } + } + }, + "@ethersproject/signing-key": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.8.tgz", + "integrity": "sha512-YKxQM45eDa6WAD+s3QZPdm1uW1MutzVuyoepdRRVmMJ8qkk7iOiIhUkZwqKLNxKzEJijt/82ycuOREc9WBNAKg==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "elliptic": "6.5.3" + } + }, + "@ethersproject/solidity": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.8.tgz", + "integrity": "sha512-OJkyBq9KaoGsi8E8mYn6LX+vKyCURvxSp0yuGBcOqEFM3vkn9PsCiXsHdOXdNBvlHG5evJXwAYC2UR0TzgJeKA==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/strings": "^5.0.8" + } + }, + "@ethersproject/strings": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.8.tgz", + "integrity": "sha512-5IsdXf8tMY8QuHl8vTLnk9ehXDDm6x9FB9S9Og5IA1GYhLe5ZewydXSjlJlsqU2t9HRbfv97OJZV/pX8DVA/Hw==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/transactions": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", + "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", + "requires": { + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/rlp": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8" + } + }, + "@ethersproject/units": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.9.tgz", + "integrity": "sha512-4jIkcMVrJ3lCgXMO4M/2ww0/T/IN08vJTZld7FIAwa6aoBDTAy71+sby3sShl1SG3HEeKYbI3fBWauCUgPRUpQ==", + "requires": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/logger": "^5.0.8" + } + }, + "@ethersproject/wallet": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.10.tgz", + "integrity": "sha512-5siYr38NhqZKH6DUr6u4PdhgOKur8Q6sw+JID2TitEUmW0tOl8f6rpxAe77tw6SJT60D2UcvgsyLtl32+Nl+ig==", + "requires": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/hdnode": "^5.0.8", + "@ethersproject/json-wallets": "^5.0.10", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/wordlists": "^5.0.8" + } + }, + "@ethersproject/web": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.12.tgz", + "integrity": "sha512-gVxS5iW0bgidZ76kr7LsTxj4uzN5XpCLzvZrLp8TP+4YgxHfCeetFyQkRPgBEAJdNrexdSBayvyJvzGvOq0O8g==", + "requires": { + "@ethersproject/base64": "^5.0.7", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" + } + }, + "@ethersproject/wordlists": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.8.tgz", + "integrity": "sha512-px2mloc1wAcdTbzv0ZotTx+Uh/dfnDO22D9Rx8xr7+/PUwAhZQjoJ9t7Hn72nsaN83rWBXsLvFcIRZju4GIaEQ==", + "requires": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" + } + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "env-cmd": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-10.1.0.tgz", + "integrity": "sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==", + "requires": { + "commander": "^4.0.0", + "cross-spawn": "^7.0.0" + } + }, + "ethers": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.4.tgz", + "integrity": "sha512-/VzvmgsrBDOxGo+WIZD7kKXcEUFCrr53P40w5fk1EcGYidv+XVbtTWil5FMsijV6BVXTKqxwMv7hDvKLAObfNQ==", + "requires": { + "@ethersproject/abi": "^5.0.0", + "@ethersproject/abstract-provider": "^5.0.0", + "@ethersproject/abstract-signer": "^5.0.0", + "@ethersproject/address": "^5.0.0", + "@ethersproject/base64": "^5.0.0", + "@ethersproject/bignumber": "^5.0.0", + "@ethersproject/bytes": "^5.0.0", + "@ethersproject/constants": "^5.0.0", + "@ethersproject/contracts": "^5.0.0", + "@ethersproject/hash": "^5.0.0", + "@ethersproject/hdnode": "^5.0.0", + "@ethersproject/json-wallets": "^5.0.0", + "@ethersproject/keccak256": "^5.0.0", + "@ethersproject/logger": "^5.0.0", + "@ethersproject/networks": "^5.0.0", + "@ethersproject/pbkdf2": "^5.0.0", + "@ethersproject/properties": "^5.0.0", + "@ethersproject/providers": "^5.0.0", + "@ethersproject/random": "^5.0.0", + "@ethersproject/rlp": "^5.0.0", + "@ethersproject/sha2": "^5.0.0", + "@ethersproject/signing-key": "^5.0.0", + "@ethersproject/solidity": "^5.0.0", + "@ethersproject/strings": "^5.0.0", + "@ethersproject/transactions": "^5.0.0", + "@ethersproject/units": "^5.0.0", + "@ethersproject/wallet": "^5.0.0", + "@ethersproject/web": "^5.0.0", + "@ethersproject/wordlists": "^5.0.0" + } + }, + "follow-redirects": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "ws": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" + } + } +} diff --git a/external/keepers/package.json b/external/keepers/package.json new file mode 100644 index 00000000..abcb1649 --- /dev/null +++ b/external/keepers/package.json @@ -0,0 +1,20 @@ +{ + "name": "event-listeners", + "version": "1.0.0", + "description": "Redemeeum event listeners to trace events emitted from smart contracts", + "main": "index.js", + "scripts": { + "start:dev": "env-cmd -f .env.dev node index.js", + "start:demo": "env-cmd -f .env.demo node index.js", + "start:playground": "env-cmd -f .env.playground node index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "LimeChain", + "license": "ISC", + "dependencies": { + "axios": "^0.21.1", + "dotenv": "^8.2.0", + "env-cmd": "^10.1.0", + "ethers": "^5.0.4" + } +} diff --git a/external/keepers/src/.env.example b/external/keepers/src/.env.example new file mode 100644 index 00000000..7ad6180c --- /dev/null +++ b/external/keepers/src/.env.example @@ -0,0 +1,12 @@ +TOKENS_CONTRACT_ADDRESS="0x..." +BOSON_ROUTER_CONTRACT_ADDRESS="0x..." +VOUCHER_KERNEL_ADDRESS="0x..." +API_URL="http://localhost:3000" +# generated on http://jwtbuilder.jamiekurtz.com with payload = {token: } and key=, +# where GCLOUD_SECRET and TOKEN_SECRET values are defined in the env var of the API server +GCLOUD_SECRET="GENERATED_TOKEN" + +#Serves as a RPC provider if you want to connect to a certain network. If omitted will fallback to local rpc at port 8545 (default) +ALCHEMY_URL="https://eth-desired-network.alchemyapi.io/v2/your-api-key" + + diff --git a/external/keepers/src/abis/BosonRouter.json b/external/keepers/src/abis/BosonRouter.json new file mode 100644 index 00000000..e2e0759f --- /dev/null +++ b/external/keepers/src/abis/BosonRouter.json @@ -0,0 +1,43271 @@ +{ + "contractName": "BosonRouter", + "abi": [{ + "inputs": [{ + "internalType": "address", + "name": "_voucherKernel", + "type": "address" + }, + { + "internalType": "address", + "name": "_fundLimitsOracle", + "type": "address" + }, + { + "internalType": "address", + "name": "_cashierAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [{ + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_paymentType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogOrderCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ + "internalType": "address", + "name": "", + "type": "address" + }], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ + "internalType": "bool", + "name": "", + "type": "bool" + }], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "address", + "name": "newOwner", + "type": "address" + }], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256[]", + "name": "metadata", + "type": "uint256[]" + }], + "name": "requestCreateOrderETHETH", + "outputs": [], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [{ + "internalType": "address", + "name": "_tokenPriceAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenDepositAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokensSent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "metadata", + "type": "uint256[]" + } + ], + "name": "requestCreateOrderTKNTKNWithPermit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "address", + "name": "_tokenDepositAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokensSent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "metadata", + "type": "uint256[]" + } + ], + "name": "requestCreateOrderETHTKNWithPermit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "address", + "name": "_tokenPriceAddress", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "metadata", + "type": "uint256[]" + } + ], + "name": "requestCreateOrderTKNETH", + "outputs": [], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "requestVoucherETHETH", + "outputs": [], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokensSent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "vPrice", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "rPrice", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "sPrice", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "vDeposit", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "rDeposit", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "sDeposit", + "type": "bytes32" + } + ], + "name": "requestVoucherTKNTKNWithPermit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokensSent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "requestVoucherTKNTKNSameWithPermit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokensDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "requestVoucherETHTKNWithPermit", + "outputs": [], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokensPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "requestVoucherTKNETHWithPermit", + "outputs": [], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }], + "name": "requestCancelOrFaultVoucherSet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }], + "name": "redeem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }], + "name": "complain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }], + "name": "cancelOrFault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "address", + "name": "_party", + "type": "address" + }], + "name": "incrementCorrelationId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ + "internalType": "address", + "name": "_party", + "type": "address" + }], + "name": "getCorrelationId", + "outputs": [{ + "internalType": "uint256", + "name": "", + "type": "uint256" + }], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCashierAddress", + "outputs": [{ + "internalType": "address", + "name": "", + "type": "address" + }], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getVoucherKernelAddress", + "outputs": [{ + "internalType": "address", + "name": "", + "type": "address" + }], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getFundLimitOracleAddress", + "outputs": [{ + "internalType": "address", + "name": "", + "type": "address" + }], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voucherKernel\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_fundLimitsOracle\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_cashierAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_paymentType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"LogOrderCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"cancelOrFault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"complain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCashierAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"}],\"name\":\"getCorrelationId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFundLimitOracleAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVoucherKernelAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"}],\"name\":\"incrementCorrelationId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"requestCancelOrFaultVoucherSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"metadata\",\"type\":\"uint256[]\"}],\"name\":\"requestCreateOrderETHETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenDepositAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokensSent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"metadata\",\"type\":\"uint256[]\"}],\"name\":\"requestCreateOrderETHTKNWithPermit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenPriceAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"metadata\",\"type\":\"uint256[]\"}],\"name\":\"requestCreateOrderTKNETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenPriceAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenDepositAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokensSent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"metadata\",\"type\":\"uint256[]\"}],\"name\":\"requestCreateOrderTKNTKNWithPermit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"requestVoucherETHETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokensDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"requestVoucherETHTKNWithPermit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokensPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"requestVoucherTKNETHWithPermit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokensSent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"requestVoucherTKNTKNSameWithPermit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokensSent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"vPrice\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"rPrice\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sPrice\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"vDeposit\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"rDeposit\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"sDeposit\",\"type\":\"bytes32\"}],\"name\":\"requestVoucherTKNTKNWithPermit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelOrFault(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"complain(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"getCashierAddress()\":{\"returns\":{\"_0\":\"Address of Cashier address\"}},\"getCorrelationId(address)\":{\"params\":{\"_party\":\"The address of the seller or buyer\"},\"returns\":{\"_0\":\"the specified party's correlation Id\"}},\"getFundLimitOracleAddress()\":{\"returns\":{\"_0\":\"Address of Fund Limits Oracle contract\"}},\"getVoucherKernelAddress()\":{\"returns\":{\"_0\":\"Address of Voucher Kernel contract\"}},\"incrementCorrelationId(address)\":{\"params\":{\"_party\":\"The address of the seller or buyer\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"refund(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"requestCancelOrFaultVoucherSet(uint256)\":{\"params\":{\"_tokenIdSupply\":\"an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for\"}},\"requestCreateOrderETHETH(uint256[])\":{\"params\":{\"metadata\":\"metadata which is required for creation of a voucher Metadata array is used as in some scenarios we need several more params, as we need to recover owner address in order to permit the contract to transfer funds on his behalf. Since the params get too many, we end up in situation that the stack is too deep. uint256 _validFrom = metadata[0]; uint256 _validTo = metadata[1]; uint256 _price = metadata[2]; uint256 _depositSe = metadata[3]; uint256 _depositBu = metadata[4]; uint256 _quantity = metadata[5];\"}},\"requestVoucherETHETH(uint256,address)\":{\"params\":{\"_issuer\":\"Address of the issuer of the supply token\",\"_tokenIdSupply\":\"ID of the supply token\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Contract for interacting with Boson Protocol from the user's perspective.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelOrFault(uint256)\":{\"notice\":\"Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\"},\"complain(uint256)\":{\"notice\":\"Issue a complain for a voucher\"},\"getCashierAddress()\":{\"notice\":\"Get the address of Cashier contract\"},\"getCorrelationId(address)\":{\"notice\":\"Return a seller or buyer's correlation Id\"},\"getFundLimitOracleAddress()\":{\"notice\":\"Get the address of Fund Limits Oracle contract\"},\"getVoucherKernelAddress()\":{\"notice\":\"Get the address of Voucher Kernel contract\"},\"incrementCorrelationId(address)\":{\"notice\":\"Increment a seller or buyer's correlation Id\"},\"pause()\":{\"notice\":\"Pause the Cashier && the Voucher Kernel contracts in case of emergency. All functions related to creating new batch, requestVoucher or withdraw will be paused, hence cannot be executed. There is special function for withdrawing funds if contract is paused.\"},\"redeem(uint256)\":{\"notice\":\"Redemption of the vouchers promise\"},\"refund(uint256)\":{\"notice\":\"Refunding a voucher\"},\"requestCancelOrFaultVoucherSet(uint256)\":{\"notice\":\"Seller burns the remaining supply in case it's no longer in exchange and withdrawal of the locked deposits for them are being sent back.\"},\"requestCreateOrderETHETH(uint256[])\":{\"notice\":\"Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\"},\"requestVoucherETHETH(uint256,address)\":{\"notice\":\"Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\"},\"unpause()\":{\"notice\":\"Unpause the Cashier && the Voucher Kernel contracts. All functions related to creating new batch, requestVoucher or withdraw will be unpaused.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/BosonRouter.sol\":\"BosonRouter\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/BosonRouter.sol\":{\"keccak256\":\"0x25444cd631878cf6e842b872ea6594a36f738f416f3ab1795f65020560400dcc\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://42a6b8d3901d63ec707cf2168f678571996833ef78d3913a2e9e533b9439bf25\",\"dweb:/ipfs/QmTdpis42t7qR1zvMgyR7BUPAoQzAEFSPPF6zxvLKwr9eS\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol\":{\"keccak256\":\"0x867daada4cae6f8f547fc7eba2db9f8aa282228901c125e773dfd808943a235a\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://e50dc3939a48de65fd3ba74d54c20d2370adad18ddc97c8dca721839d20e0224\",\"dweb:/ipfs/QmcL6Z8wCcQfgcTQ2UH4vyJ84hYckJW7LGpN6oKg2kQKBm\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IBosonRouter.sol\":{\"keccak256\":\"0xd7e0608d454b7a6a5201d407f21f1382b2a796bb9118ea09a5f2713d29db97db\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://034bd3d0fa0b65b7248c46e4f13533940c19c5ab781cf2315b8cc4821187eba6\",\"dweb:/ipfs/QmQn9ZATUwywqi1BFDvoZFo5cNrPdwWpNvELEM5D67GLL8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol\":{\"keccak256\":\"0x9d1d5312c331d6a2abc6b40ff3fa19fa0a7803cbc78bd68540689c31e18def53\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://aec82b84697324001ce65295a830144740750470fc2e0653530720fcd68fbb4b\",\"dweb:/ipfs/QmXgkKo2MgYWY16YD4zW3c8F2Ajbyz1tsTQmRjR12G7Vuw\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC20WithPermit.sol\":{\"keccak256\":\"0xd0d726dce7620e673977af6b4b3aabe0e58d141766519b583bc49d4eb32d5d26\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://9ee65d5dfe8ea488c97f896ad7e7e9004906170e3f789a235927ebadbdafe74a\",\"dweb:/ipfs/QmWU9btiDAYYQpEUaphprpVAaZeCfk2SEnaaz3VGNpUVm2\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IFundLimitsOracle.sol\":{\"keccak256\":\"0xa3e03a58b63266cc88f7f26429941aff56a61d086c98fdfb09efa82a4cf7f51c\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://6a742feffefc4a9b70ec761aae636e935ebca9ee853e5b81b7802b17aaca2bc4\",\"dweb:/ipfs/Qmb584QNfQqq2NZR7wL7HxkYgf3G6wXt8Vxs76FCYdnuWw\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://19c0dfbf7bb7744af0c03156e372d0096e0d07de8805ead7722243b8b42276a3\",\"dweb:/ipfs/QmPEFDvi6mJZ3sVii3uBs3CQzAARXPFwCKiHG5zkiCmC4V\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x4c5617b558186dc4b2b994b18ab9236410cd2dd1d9ad1213bbcca2e1d5321ce8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27b103fe3d550cf3717751a2c67e14008806af25baa3916b5717eeb68a2767ad\",\"dweb:/ipfs/QmS6gG9XVCx3qco7ewaSgJdcQRfZuurqxqPnKmRJ3Dj7Fg\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x1153f6dd334c01566417b8c551122450542a2b75a2bbb379d59a8c320ed6da28\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://002b4e5c26a2a069ba42486b83bf9c4b5461f3d5def32f9ef52b0aef8905d6d2\",\"dweb:/ipfs/QmPG44XDF4npiqRzzGvqJroDtUKfcR78wcreQ9bXa6guW6\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162003d2238038062003d22833981810160405260608110156200003757600080fd5b50805160208201516040909201516000805460ff19168155600180559192916200006062000112565b600280546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000b98362000116565b620000c48262000116565b620000cf8162000116565b600580546001600160a01b039485166001600160a01b0319918216179091556006805493851693821693909317909255600480549190931691161790556200015a565b3390565b6001600160a01b03811662000157576040805162461bcd60e51b8152602060048201526002602482015261304160f01b604482015290519081900360640190fd5b50565b613bb8806200016a6000396000f3fe6080604052600436106101265760003560e01c80630353b31e1461012b5780630bd747051461017057806317d001b01461019c5780631a245b8e146101cd578063278ecde114610227578063284f0923146102515780633f4ba83a1461027b5780635c975abb146102905780636ad0cfe1146102b9578063715018a6146102e5578063765e0fb8146102fa5780637ff97ac1146103245780638456cb59146103575780638da5cb5b1461036c57806392fcbdc114610381578063ad7f0493146103ce578063b2c076c81461041b578063bc16ba471461048e578063c241649a14610539578063d7e308bd146105f1578063db006a751461066f578063dea7f42314610699578063e3f5d2d514610707578063f2fde38b1461071c578063f9d930991461074f575b600080fd5b34801561013757600080fd5b5061015e6004803603602081101561014e57600080fd5b50356001600160a01b0316610764565b60408051918252519081900360200190f35b34801561017c57600080fd5b5061019a6004803603602081101561019357600080fd5b503561077f565b005b3480156101a857600080fd5b506101b1610922565b604080516001600160a01b039092168252519081900360200190f35b3480156101d957600080fd5b5061019a600480360360e08110156101f057600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff6080820135169060a08101359060c00135610931565b34801561023357600080fd5b5061019a6004803603602081101561024a57600080fd5b5035610e3e565b34801561025d57600080fd5b5061019a6004803603602081101561027457600080fd5b5035610eac565b34801561028757600080fd5b5061019a610eff565b34801561029c57600080fd5b506102a5611078565b604080519115158252519081900360200190f35b61019a600480360360408110156102cf57600080fd5b50803590602001356001600160a01b0316611081565b3480156102f157600080fd5b5061019a6112eb565b34801561030657600080fd5b5061019a6004803603602081101561031d57600080fd5b5035611385565b34801561033057600080fd5b5061019a6004803603602081101561034757600080fd5b50356001600160a01b03166113d8565b34801561036357600080fd5b5061019a6113f8565b34801561037857600080fd5b506101b16114b3565b61019a600480360360e081101561039757600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff6080820135169060a08101359060c001356114c2565b61019a600480360360e08110156103e457600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff6080820135169060a08101359060c0013561197d565b34801561042757600080fd5b5061019a600480360361014081101561043f57600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff608082013581169160a08101359160c08201359160e081013590911690610100810135906101200135611dcf565b34801561049a57600080fd5b5061019a600480360360e08110156104b157600080fd5b6001600160a01b038235169160208101359160408201359160ff6060820135169160808201359160a08101359181019060e0810160c0820135600160201b8111156104fb57600080fd5b82018360208201111561050d57600080fd5b803590602001918460208302840111600160201b8311171561052e57600080fd5b509092509050612440565b34801561054557600080fd5b5061019a600480360361010081101561055d57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359160ff6080830135169160a08101359160c08201359190810190610100810160e0820135600160201b8111156105b357600080fd5b8201836020820111156105c557600080fd5b803590602001918460208302840111600160201b831117156105e657600080fd5b509092509050612924565b61019a6004803603604081101561060757600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561063157600080fd5b82018360208201111561064357600080fd5b803590602001918460208302840111600160201b8311171561066457600080fd5b509092509050612db8565b34801561067b57600080fd5b5061019a6004803603602081101561069257600080fd5b5035613168565b61019a600480360360208110156106af57600080fd5b810190602081018135600160201b8111156106c957600080fd5b8201836020820111156106db57600080fd5b803590602001918460208302840111600160201b831117156106fc57600080fd5b5090925090506131bb565b34801561071357600080fd5b506101b1613549565b34801561072857600080fd5b5061019a6004803603602081101561073f57600080fd5b50356001600160a01b0316613558565b34801561075b57600080fd5b506101b1613649565b6001600160a01b031660009081526003602052604090205490565b600260015414156107c5576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b60026001556107d2611078565b15610812576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b600554604080516322af217960e11b81526004810184905233602482015290516000926001600160a01b03169163455e42f291604480830192602092919082900301818787803b15801561086557600080fd5b505af1158015610879573d6000803e3d6000fd5b505050506040513d602081101561088f57600080fd5b50516004805460408051632990c23f60e11b815292830186905260248301849052336044840152519293506001600160a01b031691635321847e9160648082019260009290919082900301818387803b1580156108eb57600080fd5b505af11580156108ff573d6000803e3d6000fd5b505033600090815260036020526040902080546001908101909155805550505050565b6006546001600160a01b031690565b60026001541415610977576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155610984611078565b156109c4576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018a9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b158015610a1057600080fd5b505afa158015610a24573d6000803e3d6000fd5b505050506040513d6040811015610a3a57600080fd5b508051602090910151909250905081610a538883613658565b14610a8a576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546040805163e875a61360e01b8152600481018c905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015610ad657600080fd5b505afa158015610aea573d6000803e3d6000fd5b505050506040513d6020811015610b0057600080fd5b505160055460408051639a751bbd60e01b8152600481018e905290519293506000926001600160a01b0390921691639a751bbd91602480820192602092909190829003018186803b158015610b5457600080fd5b505afa158015610b68573d6000803e3d6000fd5b505050506040513d6020811015610b7e57600080fd5b505190506001600160a01b0382811690821614610bc7576040805162461bcd60e51b8152602060048201526002602482015261494360f01b604482015290519081900360640190fd5b6040805163d505accf60e01b8152336004820152306024820152604481018b9052606481018a905260ff8916608482015260a4810188905260c4810187905290516001600160a01b0384169163d505accf9160e480830192600092919082900301818387803b158015610c3957600080fd5b505af1158015610c4d573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8c8c33600460036000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b158015610d1557600080fd5b505af1158015610d29573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018e90525190861693506323b872dd925060648083019260209291908290030181600087803b158015610d8a57600080fd5b505af1158015610d9e573d6000803e3d6000fd5b505050506040513d6020811015610db457600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b0386811694820194909452336024820152604481018d905290519290911691631429dae89160648082019260009290919082900301818387803b158015610e1557600080fd5b505af1158015610e29573d6000803e3d6000fd5b50506001805550505050505050505050505050565b60055460408051631eb489b760e21b81526004810184905233602482015290516001600160a01b0390921691637ad226dc9160448082019260009290919082900301818387803b158015610e9157600080fd5b505af1158015610ea5573d6000803e3d6000fd5b5050505050565b600554604080516366db9a0960e01b81526004810184905233602482015290516001600160a01b03909216916366db9a099160448082019260009290919082900301818387803b158015610e9157600080fd5b610f076136ba565b6004805460408051635702442760e11b815290516001600160a01b039092169263ae04884e928282019260209290829003018186803b158015610f4957600080fd5b505afa158015610f5d573d6000803e3d6000fd5b505050506040513d6020811015610f7357600080fd5b5051610fab576040805162461bcd60e51b81526020600482015260026024820152612aa360f11b604482015290519081900360640190fd5b610fb3613715565b600560009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561100357600080fd5b505af1158015611017573d6000803e3d6000fd5b50506004805460408051631fa5d41d60e11b815290516001600160a01b039092169450633f4ba83a9350808301926000929182900301818387803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b50505050565b60005460ff1690565b600260015414156110c7576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b60026001556110d4611078565b15611114576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b6005546040805163d887b4e760e01b8152600481018590529051349260009283926001600160a01b039092169163d887b4e791602480820192606092909190829003018186803b15801561116757600080fd5b505afa15801561117b573d6000803e3d6000fd5b505050506040513d606081101561119157600080fd5b5080516040909101519092509050826111aa83836137b5565b146111e1576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005543360008181526003602052604080822080546001818101909255825163b0df130d60e01b8152600481018c90526001600160a01b038b811660248301526044820196909652606481019290925260848201529051929093169263b0df130d9260a4808301939282900301818387803b15801561125f57600080fd5b505af1158015611273573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b1580156112c757600080fd5b505af11580156112db573d6000803e3d6000fd5b5050600180555050505050505050565b6112f3613814565b6001600160a01b03166113046114b3565b6001600160a01b03161461134d576040805162461bcd60e51b81526020600482018190526024820152600080516020613b23833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b031690600080516020613b43833981519152908390a3600280546001600160a01b0319169055565b60055460408051631ebaf54360e31b81526004810184905233602482015290516001600160a01b039092169163f5d7aa189160448082019260009290919082900301818387803b158015610e9157600080fd5b6001600160a01b0316600090815260036020526040902080546001019055565b6114006136ba565b611408613818565b600560009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561145857600080fd5b505af115801561146c573d6000803e3d6000fd5b50506004805460408051638456cb5960e01b815290516001600160a01b039092169450638456cb599350808301926000929182900301818387803b15801561105e57600080fd5b6002546001600160a01b031690565b60026001541415611508576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155611515611078565b15611555576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018a9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b1580156115a157600080fd5b505afa1580156115b5573d6000803e3d6000fd5b505050506040513d60408110156115cb57600080fd5b5080516020909101519092509050348214611612576040805162461bcd60e51b8152602060048201526002602482015261049560f41b604482015290519081900360640190fd5b86811461164b576040805162461bcd60e51b8152602060048201526002602482015261125160f21b604482015290519081900360640190fd5b60055460408051639a751bbd60e01b8152600481018c905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b15801561169757600080fd5b505afa1580156116ab573d6000803e3d6000fd5b505050506040513d60208110156116c157600080fd5b50516040805163d505accf60e01b8152336004820152306024820152604481018b9052606481018a905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0383169163d505accf9160e48082019260009290919082900301818387803b15801561173957600080fd5b505af115801561174d573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8b8b33600260036000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b15801561181557600080fd5b505af1158015611829573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018d90525190851693506323b872dd925060648083019260209291908290030181600087803b15801561188a57600080fd5b505af115801561189e573d6000803e3d6000fd5b505050506040513d60208110156118b457600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b0385811694820194909452336024820152604481018c905290519290911691631429dae89160648082019260009290919082900301818387803b15801561191557600080fd5b505af1158015611929573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b158015610e1557600080fd5b600260015414156119c3576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b60026001556119d0611078565b15611a10576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018a9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b158015611a5c57600080fd5b505afa158015611a70573d6000803e3d6000fd5b505050506040513d6040811015611a8657600080fd5b5080516020909101519092509050868214611acd576040805162461bcd60e51b8152602060048201526002602482015261049560f41b604482015290519081900360640190fd5b348114611b06576040805162461bcd60e51b8152602060048201526002602482015261125160f21b604482015290519081900360640190fd5b6005546040805163e875a61360e01b8152600481018c905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015611b5257600080fd5b505afa158015611b66573d6000803e3d6000fd5b505050506040513d6020811015611b7c57600080fd5b50516040805163d505accf60e01b815233600482015230602482015260448101869052606481018a905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0383169163d505accf9160e48082019260009290919082900301818387803b158015611bf457600080fd5b505af1158015611c08573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8b8b336003806000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b158015611ccf57600080fd5b505af1158015611ce3573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018890525190851693506323b872dd925060648083019260209291908290030181600087803b158015611d4457600080fd5b505af1158015611d58573d6000803e3d6000fd5b505050506040513d6020811015611d6e57600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b03858116948201949094523360248201526044810187905290519290911691631429dae89160648082019260009290919082900301818387803b15801561191557600080fd5b60026001541415611e15576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155611e22611078565b15611e62576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018d9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b158015611eae57600080fd5b505afa158015611ec2573d6000803e3d6000fd5b505050506040513d6040811015611ed857600080fd5b508051602090910151909250905081611ef18b83613658565b14611f28576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546040805163e875a61360e01b8152600481018f905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015611f7457600080fd5b505afa158015611f88573d6000803e3d6000fd5b505050506040513d6020811015611f9e57600080fd5b810190808051906020019092919050505090506000600560009054906101000a90046001600160a01b03166001600160a01b0316639a751bbd8f6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561200c57600080fd5b505afa158015612020573d6000803e3d6000fd5b505050506040513d602081101561203657600080fd5b50516040805163d505accf60e01b815233600482015230602482015260448101879052606481018e905260ff8d16608482015260a481018c905260c481018b905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156120ae57600080fd5b505af11580156120c2573d6000803e3d6000fd5b50506040805163d505accf60e01b815233600482015230602482015260448101879052606481018f905260ff8b16608482015260a481018a905260c4810189905290516001600160a01b038516935063d505accf925060e480830192600092919082900301818387803b15801561213857600080fd5b505af115801561214c573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8f8f33600460036000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b15801561221457600080fd5b505af1158015612228573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018990525190861693506323b872dd925060648083019260209291908290030181600087803b15801561228957600080fd5b505af115801561229d573d6000803e3d6000fd5b505050506040513d60208110156122b357600080fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b0391821660248401526044830186905251908316916323b872dd9160648083019260209291908290030181600087803b15801561231257600080fd5b505af1158015612326573d6000803e3d6000fd5b505050506040513d602081101561233c57600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b03868116948201949094523360248201526044810188905290519290911691631429dae89160648082019260009290919082900301818387803b15801561239d57600080fd5b505af11580156123b1573d6000803e3d6000fd5b505060048054604080516302853b5d60e31b81526001600160a01b0387811694820194909452336024820152604481018990529051929091169350631429dae8925060648082019260009290919082900301818387803b15801561241457600080fd5b505af1158015612428573d6000803e3d6000fd5b50506001805550505050505050505050505050505050565b612448611078565b15612488576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b61249188613896565b6124d26124cd838360058181106124a457fe5b90506020020135848460028181106124b857fe5b905060200201356138d990919063ffffffff16565b613932565b6124ff886124fa848460058181106124e657fe5b90506020020135858560038181106124b857fe5b6139e5565b612527886124fa8484600581811061251357fe5b90506020020135858560048181106124b857fe5b8661254c8383600581811061253857fe5b90506020020135848460038181106124b857fe5b14612583576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6040805163d505accf60e01b8152336004820152306024820152604481018990526064810188905260ff8716608482015260a4810186905260c4810185905290516001600160a01b038a169163d505accf9160e480830192600092919082900301818387803b1580156125f557600080fd5b505af1158015612609573d6000803e3d6000fd5b5050600554600092506001600160a01b0316905063797f2a26338585858161262d57fe5b905060200201358686600181811061264157fe5b905060200201358787600281811061265557fe5b905060200201358888600381811061266957fe5b905060200201358989600481811061267d57fe5b905060200201358a8a600581811061269157fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b15801561270157600080fd5b505af1158015612715573d6000803e3d6000fd5b505050506040513d602081101561272b57600080fd5b5051600554604080516319eb920160e31b815260048101849052600260248201526000604482018190526001600160a01b038e811660648401529251949550919092169263cf5c900892608480820193929182900301818387803b15801561279257600080fd5b505af11580156127a6573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018d905251908d1693506323b872dd925060648083019260209291908290030181600087803b15801561280757600080fd5b505af115801561281b573d6000803e3d6000fd5b505050506040513d602081101561283157600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b038d811694820194909452336024820152604481018c905290519290911691631429dae89160648082019260009290919082900301818387803b15801561289257600080fd5b505af11580156128a6573d6000803e3d6000fd5b5050505080600080516020613ae283398151915233858560058181106128c857fe5b3360009081526003602090815260409182902080546001810190915582516001600160a01b03979097168752928102949094013593850193909352600284840152606084015250519081900360800190a2505050505050505050565b61292c611078565b1561296c576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b61297589613896565b61297e88613896565b6129a6896124fa8484600581811061299257fe5b90506020020135858560028181106124b857fe5b6129ba886124fa848460058181106124e657fe5b6129ce886124fa8484600581811061251357fe5b866129df8383600581811061253857fe5b14612a16576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6040805163d505accf60e01b8152336004820152306024820152604481018990526064810188905260ff8716608482015260a4810186905260c4810185905290516001600160a01b038a169163d505accf9160e480830192600092919082900301818387803b158015612a8857600080fd5b505af1158015612a9c573d6000803e3d6000fd5b5050600554600092506001600160a01b0316905063797f2a263385858581612ac057fe5b9050602002013586866001818110612ad457fe5b9050602002013587876002818110612ae857fe5b9050602002013588886003818110612afc57fe5b9050602002013589896004818110612b1057fe5b905060200201358a8a6005818110612b2457fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b158015612b9457600080fd5b505af1158015612ba8573d6000803e3d6000fd5b505050506040513d6020811015612bbe57600080fd5b5051600554604080516319eb920160e31b8152600481810185905260248201526001600160a01b038e811660448301528d81166064830152915193945091169163cf5c90089160848082019260009290919082900301818387803b158015612c2557600080fd5b505af1158015612c39573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018d905251908d1693506323b872dd925060648083019260209291908290030181600087803b158015612c9a57600080fd5b505af1158015612cae573d6000803e3d6000fd5b505050506040513d6020811015612cc457600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b038d811694820194909452336024820152604481018c905290519290911691631429dae89160648082019260009290919082900301818387803b158015612d2557600080fd5b505af1158015612d39573d6000803e3d6000fd5b5050505080600080516020613ae28339815191523385856005818110612d5b57fe5b3360009081526003602090815260409182902080546001810190915582516001600160a01b03979097168752928102949094013593850193909352600484840152606084015250519081900360800190a250505050505050505050565b60026001541415612dfe576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155612e0b611078565b15612e4b576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b612e5483613896565b612e68836124fa8484600581811061299257fe5b612e7b6124cd8383600581811061253857fe5b612ea26124cd83836005818110612e8e57fe5b90506020020135848460048181106124b857fe5b34612eb38383600581811061253857fe5b14612eea576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546000906001600160a01b031663797f2a263385858581612f0957fe5b9050602002013586866001818110612f1d57fe5b9050602002013587876002818110612f3157fe5b9050602002013588886003818110612f4557fe5b9050602002013589896004818110612f5957fe5b905060200201358a8a6005818110612f6d57fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b158015612fdd57600080fd5b505af1158015612ff1573d6000803e3d6000fd5b505050506040513d602081101561300757600080fd5b5051600554604080516319eb920160e31b815260048101849052600360248201526001600160a01b03888116604483015260006064830181905292519495509092169263cf5c900892608480820193929182900301818387803b15801561306d57600080fd5b505af1158015613081573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b1580156130d557600080fd5b505af11580156130e9573d6000803e3d6000fd5b505050505080600080516020613ae2833981519152338585600581811061310c57fe5b3360009081526003602081815260409283902080546001810190915583516001600160a01b0398909816885293810295909501359486019490945284810193909352606084015250519081900360800190a25050600180555050565b60055460408051633def417960e11b81526004810184905233602482015290516001600160a01b0390921691637bde82f29160448082019260009290919082900301818387803b158015610e9157600080fd5b60026001541415613201576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b600260015561320e611078565b1561324e576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b6132616124cd838360058181106124a457fe5b6132746124cd8383600581811061253857fe5b6132876124cd83836005818110612e8e57fe5b346132988383600581811061253857fe5b146132cf576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546000906001600160a01b031663797f2a2633858585816132ee57fe5b905060200201358686600181811061330257fe5b905060200201358787600281811061331657fe5b905060200201358888600381811061332a57fe5b905060200201358989600481811061333e57fe5b905060200201358a8a600581811061335257fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b1580156133c257600080fd5b505af11580156133d6573d6000803e3d6000fd5b505050506040513d60208110156133ec57600080fd5b5051600554604080516319eb920160e31b815260048101849052600160248201526000604482018190526064820181905291519394506001600160a01b039092169263cf5c900892608480820193929182900301818387803b15801561345157600080fd5b505af1158015613465573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b1580156134b957600080fd5b505af11580156134cd573d6000803e3d6000fd5b505050505080600080516020613ae283398151915233858560058181106134f057fe5b336000908152600360209081526040918290208054600181810190925583516001600160a01b0398909816885293820295909501359086015284810193909352606084015250519081900360800190a250506001805550565b6005546001600160a01b031690565b613560613814565b6001600160a01b03166135716114b3565b6001600160a01b0316146135ba576040805162461bcd60e51b81526020600482018190526024820152600080516020613b23833981519152604482015290519081900360640190fd5b6001600160a01b0381166135ff5760405162461bcd60e51b8152600401808060200182810382526026815260200180613abc6026913960400191505060405180910390fd5b6002546040516001600160a01b03808416921690600080516020613b4383398151915290600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000828211156136af576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6136c2613814565b6001600160a01b03166136d36114b3565b6001600160a01b031614613713576040805162461bcd60e51b81526020600482015260026024820152614e4f60f01b604482015290519081900360640190fd5b565b61371d611078565b613765576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613798613814565b604080516001600160a01b039092168252519081900360200190a1565b60008282018381101561380d576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b3390565b613820611078565b15613860576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613798613814565b6001600160a01b0381166138d6576040805162461bcd60e51b8152602060048201526002602482015261304160f01b604482015290519081900360640190fd5b50565b6000826138e8575060006136b4565b828202828482816138f557fe5b041461380d5760405162461bcd60e51b8152600401808060200182810382526021815260200180613b026021913960400191505060405180910390fd5b600660009054906101000a90046001600160a01b03166001600160a01b0316630f878aed6040518163ffffffff1660e01b815260040160206040518083038186803b15801561398057600080fd5b505afa158015613994573d6000803e3d6000fd5b505050506040513d60208110156139aa57600080fd5b50518111156138d6576040805162461bcd60e51b8152602060048201526002602482015261105360f21b604482015290519081900360640190fd5b60065460408051635a860c8760e01b81526001600160a01b03858116600483015291519190921691635a860c87916024808301926020929190829003018186803b158015613a3257600080fd5b505afa158015613a46573d6000803e3d6000fd5b505050506040513d6020811015613a5c57600080fd5b5051811115613a97576040805162461bcd60e51b8152602060048201526002602482015261105360f21b604482015290519081900360640190fd5b505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373306fc6597e2ee1311ae9c98a7cb35eefa1fb5eccecc259e85185cb2aaf157146536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05061757361626c653a2070617573656400000000000000000000000000000000a26469706673582212200acff1259167916819b3e37b57351a59ce9d6d417bc58bdeef974e7d2613d81464736f6c63430007010033", + "deployedBytecode": "0x6080604052600436106101265760003560e01c80630353b31e1461012b5780630bd747051461017057806317d001b01461019c5780631a245b8e146101cd578063278ecde114610227578063284f0923146102515780633f4ba83a1461027b5780635c975abb146102905780636ad0cfe1146102b9578063715018a6146102e5578063765e0fb8146102fa5780637ff97ac1146103245780638456cb59146103575780638da5cb5b1461036c57806392fcbdc114610381578063ad7f0493146103ce578063b2c076c81461041b578063bc16ba471461048e578063c241649a14610539578063d7e308bd146105f1578063db006a751461066f578063dea7f42314610699578063e3f5d2d514610707578063f2fde38b1461071c578063f9d930991461074f575b600080fd5b34801561013757600080fd5b5061015e6004803603602081101561014e57600080fd5b50356001600160a01b0316610764565b60408051918252519081900360200190f35b34801561017c57600080fd5b5061019a6004803603602081101561019357600080fd5b503561077f565b005b3480156101a857600080fd5b506101b1610922565b604080516001600160a01b039092168252519081900360200190f35b3480156101d957600080fd5b5061019a600480360360e08110156101f057600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff6080820135169060a08101359060c00135610931565b34801561023357600080fd5b5061019a6004803603602081101561024a57600080fd5b5035610e3e565b34801561025d57600080fd5b5061019a6004803603602081101561027457600080fd5b5035610eac565b34801561028757600080fd5b5061019a610eff565b34801561029c57600080fd5b506102a5611078565b604080519115158252519081900360200190f35b61019a600480360360408110156102cf57600080fd5b50803590602001356001600160a01b0316611081565b3480156102f157600080fd5b5061019a6112eb565b34801561030657600080fd5b5061019a6004803603602081101561031d57600080fd5b5035611385565b34801561033057600080fd5b5061019a6004803603602081101561034757600080fd5b50356001600160a01b03166113d8565b34801561036357600080fd5b5061019a6113f8565b34801561037857600080fd5b506101b16114b3565b61019a600480360360e081101561039757600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff6080820135169060a08101359060c001356114c2565b61019a600480360360e08110156103e457600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff6080820135169060a08101359060c0013561197d565b34801561042757600080fd5b5061019a600480360361014081101561043f57600080fd5b508035906001600160a01b036020820135169060408101359060608101359060ff608082013581169160a08101359160c08201359160e081013590911690610100810135906101200135611dcf565b34801561049a57600080fd5b5061019a600480360360e08110156104b157600080fd5b6001600160a01b038235169160208101359160408201359160ff6060820135169160808201359160a08101359181019060e0810160c0820135600160201b8111156104fb57600080fd5b82018360208201111561050d57600080fd5b803590602001918460208302840111600160201b8311171561052e57600080fd5b509092509050612440565b34801561054557600080fd5b5061019a600480360361010081101561055d57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359160ff6080830135169160a08101359160c08201359190810190610100810160e0820135600160201b8111156105b357600080fd5b8201836020820111156105c557600080fd5b803590602001918460208302840111600160201b831117156105e657600080fd5b509092509050612924565b61019a6004803603604081101561060757600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561063157600080fd5b82018360208201111561064357600080fd5b803590602001918460208302840111600160201b8311171561066457600080fd5b509092509050612db8565b34801561067b57600080fd5b5061019a6004803603602081101561069257600080fd5b5035613168565b61019a600480360360208110156106af57600080fd5b810190602081018135600160201b8111156106c957600080fd5b8201836020820111156106db57600080fd5b803590602001918460208302840111600160201b831117156106fc57600080fd5b5090925090506131bb565b34801561071357600080fd5b506101b1613549565b34801561072857600080fd5b5061019a6004803603602081101561073f57600080fd5b50356001600160a01b0316613558565b34801561075b57600080fd5b506101b1613649565b6001600160a01b031660009081526003602052604090205490565b600260015414156107c5576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b60026001556107d2611078565b15610812576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b600554604080516322af217960e11b81526004810184905233602482015290516000926001600160a01b03169163455e42f291604480830192602092919082900301818787803b15801561086557600080fd5b505af1158015610879573d6000803e3d6000fd5b505050506040513d602081101561088f57600080fd5b50516004805460408051632990c23f60e11b815292830186905260248301849052336044840152519293506001600160a01b031691635321847e9160648082019260009290919082900301818387803b1580156108eb57600080fd5b505af11580156108ff573d6000803e3d6000fd5b505033600090815260036020526040902080546001908101909155805550505050565b6006546001600160a01b031690565b60026001541415610977576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155610984611078565b156109c4576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018a9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b158015610a1057600080fd5b505afa158015610a24573d6000803e3d6000fd5b505050506040513d6040811015610a3a57600080fd5b508051602090910151909250905081610a538883613658565b14610a8a576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546040805163e875a61360e01b8152600481018c905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015610ad657600080fd5b505afa158015610aea573d6000803e3d6000fd5b505050506040513d6020811015610b0057600080fd5b505160055460408051639a751bbd60e01b8152600481018e905290519293506000926001600160a01b0390921691639a751bbd91602480820192602092909190829003018186803b158015610b5457600080fd5b505afa158015610b68573d6000803e3d6000fd5b505050506040513d6020811015610b7e57600080fd5b505190506001600160a01b0382811690821614610bc7576040805162461bcd60e51b8152602060048201526002602482015261494360f01b604482015290519081900360640190fd5b6040805163d505accf60e01b8152336004820152306024820152604481018b9052606481018a905260ff8916608482015260a4810188905260c4810187905290516001600160a01b0384169163d505accf9160e480830192600092919082900301818387803b158015610c3957600080fd5b505af1158015610c4d573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8c8c33600460036000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b158015610d1557600080fd5b505af1158015610d29573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018e90525190861693506323b872dd925060648083019260209291908290030181600087803b158015610d8a57600080fd5b505af1158015610d9e573d6000803e3d6000fd5b505050506040513d6020811015610db457600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b0386811694820194909452336024820152604481018d905290519290911691631429dae89160648082019260009290919082900301818387803b158015610e1557600080fd5b505af1158015610e29573d6000803e3d6000fd5b50506001805550505050505050505050505050565b60055460408051631eb489b760e21b81526004810184905233602482015290516001600160a01b0390921691637ad226dc9160448082019260009290919082900301818387803b158015610e9157600080fd5b505af1158015610ea5573d6000803e3d6000fd5b5050505050565b600554604080516366db9a0960e01b81526004810184905233602482015290516001600160a01b03909216916366db9a099160448082019260009290919082900301818387803b158015610e9157600080fd5b610f076136ba565b6004805460408051635702442760e11b815290516001600160a01b039092169263ae04884e928282019260209290829003018186803b158015610f4957600080fd5b505afa158015610f5d573d6000803e3d6000fd5b505050506040513d6020811015610f7357600080fd5b5051610fab576040805162461bcd60e51b81526020600482015260026024820152612aa360f11b604482015290519081900360640190fd5b610fb3613715565b600560009054906101000a90046001600160a01b03166001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561100357600080fd5b505af1158015611017573d6000803e3d6000fd5b50506004805460408051631fa5d41d60e11b815290516001600160a01b039092169450633f4ba83a9350808301926000929182900301818387803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b50505050565b60005460ff1690565b600260015414156110c7576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b60026001556110d4611078565b15611114576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b6005546040805163d887b4e760e01b8152600481018590529051349260009283926001600160a01b039092169163d887b4e791602480820192606092909190829003018186803b15801561116757600080fd5b505afa15801561117b573d6000803e3d6000fd5b505050506040513d606081101561119157600080fd5b5080516040909101519092509050826111aa83836137b5565b146111e1576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005543360008181526003602052604080822080546001818101909255825163b0df130d60e01b8152600481018c90526001600160a01b038b811660248301526044820196909652606481019290925260848201529051929093169263b0df130d9260a4808301939282900301818387803b15801561125f57600080fd5b505af1158015611273573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b1580156112c757600080fd5b505af11580156112db573d6000803e3d6000fd5b5050600180555050505050505050565b6112f3613814565b6001600160a01b03166113046114b3565b6001600160a01b03161461134d576040805162461bcd60e51b81526020600482018190526024820152600080516020613b23833981519152604482015290519081900360640190fd5b6002546040516000916001600160a01b031690600080516020613b43833981519152908390a3600280546001600160a01b0319169055565b60055460408051631ebaf54360e31b81526004810184905233602482015290516001600160a01b039092169163f5d7aa189160448082019260009290919082900301818387803b158015610e9157600080fd5b6001600160a01b0316600090815260036020526040902080546001019055565b6114006136ba565b611408613818565b600560009054906101000a90046001600160a01b03166001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561145857600080fd5b505af115801561146c573d6000803e3d6000fd5b50506004805460408051638456cb5960e01b815290516001600160a01b039092169450638456cb599350808301926000929182900301818387803b15801561105e57600080fd5b6002546001600160a01b031690565b60026001541415611508576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155611515611078565b15611555576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018a9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b1580156115a157600080fd5b505afa1580156115b5573d6000803e3d6000fd5b505050506040513d60408110156115cb57600080fd5b5080516020909101519092509050348214611612576040805162461bcd60e51b8152602060048201526002602482015261049560f41b604482015290519081900360640190fd5b86811461164b576040805162461bcd60e51b8152602060048201526002602482015261125160f21b604482015290519081900360640190fd5b60055460408051639a751bbd60e01b8152600481018c905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b15801561169757600080fd5b505afa1580156116ab573d6000803e3d6000fd5b505050506040513d60208110156116c157600080fd5b50516040805163d505accf60e01b8152336004820152306024820152604481018b9052606481018a905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0383169163d505accf9160e48082019260009290919082900301818387803b15801561173957600080fd5b505af115801561174d573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8b8b33600260036000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b15801561181557600080fd5b505af1158015611829573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018d90525190851693506323b872dd925060648083019260209291908290030181600087803b15801561188a57600080fd5b505af115801561189e573d6000803e3d6000fd5b505050506040513d60208110156118b457600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b0385811694820194909452336024820152604481018c905290519290911691631429dae89160648082019260009290919082900301818387803b15801561191557600080fd5b505af1158015611929573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b158015610e1557600080fd5b600260015414156119c3576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b60026001556119d0611078565b15611a10576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018a9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b158015611a5c57600080fd5b505afa158015611a70573d6000803e3d6000fd5b505050506040513d6040811015611a8657600080fd5b5080516020909101519092509050868214611acd576040805162461bcd60e51b8152602060048201526002602482015261049560f41b604482015290519081900360640190fd5b348114611b06576040805162461bcd60e51b8152602060048201526002602482015261125160f21b604482015290519081900360640190fd5b6005546040805163e875a61360e01b8152600481018c905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015611b5257600080fd5b505afa158015611b66573d6000803e3d6000fd5b505050506040513d6020811015611b7c57600080fd5b50516040805163d505accf60e01b815233600482015230602482015260448101869052606481018a905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0383169163d505accf9160e48082019260009290919082900301818387803b158015611bf457600080fd5b505af1158015611c08573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8b8b336003806000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b158015611ccf57600080fd5b505af1158015611ce3573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018890525190851693506323b872dd925060648083019260209291908290030181600087803b158015611d4457600080fd5b505af1158015611d58573d6000803e3d6000fd5b505050506040513d6020811015611d6e57600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b03858116948201949094523360248201526044810187905290519290911691631429dae89160648082019260009290919082900301818387803b15801561191557600080fd5b60026001541415611e15576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155611e22611078565b15611e62576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b60055460408051633eb53ba560e21b8152600481018d9052815160009384936001600160a01b039091169263fad4ee949260248083019392829003018186803b158015611eae57600080fd5b505afa158015611ec2573d6000803e3d6000fd5b505050506040513d6040811015611ed857600080fd5b508051602090910151909250905081611ef18b83613658565b14611f28576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546040805163e875a61360e01b8152600481018f905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015611f7457600080fd5b505afa158015611f88573d6000803e3d6000fd5b505050506040513d6020811015611f9e57600080fd5b810190808051906020019092919050505090506000600560009054906101000a90046001600160a01b03166001600160a01b0316639a751bbd8f6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561200c57600080fd5b505afa158015612020573d6000803e3d6000fd5b505050506040513d602081101561203657600080fd5b50516040805163d505accf60e01b815233600482015230602482015260448101879052606481018e905260ff8d16608482015260a481018c905260c481018b905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156120ae57600080fd5b505af11580156120c2573d6000803e3d6000fd5b50506040805163d505accf60e01b815233600482015230602482015260448101879052606481018f905260ff8b16608482015260a481018a905260c4810189905290516001600160a01b038516935063d505accf925060e480830192600092919082900301818387803b15801561213857600080fd5b505af115801561214c573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b031663b0df130d8f8f33600460036000336001600160a01b03166001600160a01b031681526020019081526020016000206000815480929190600101919050556040518663ffffffff1660e01b815260040180868152602001856001600160a01b03168152602001846001600160a01b031681526020018360ff16815260200182815260200195505050505050600060405180830381600087803b15801561221457600080fd5b505af1158015612228573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018990525190861693506323b872dd925060648083019260209291908290030181600087803b15801561228957600080fd5b505af115801561229d573d6000803e3d6000fd5b505050506040513d60208110156122b357600080fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b0391821660248401526044830186905251908316916323b872dd9160648083019260209291908290030181600087803b15801561231257600080fd5b505af1158015612326573d6000803e3d6000fd5b505050506040513d602081101561233c57600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b03868116948201949094523360248201526044810188905290519290911691631429dae89160648082019260009290919082900301818387803b15801561239d57600080fd5b505af11580156123b1573d6000803e3d6000fd5b505060048054604080516302853b5d60e31b81526001600160a01b0387811694820194909452336024820152604481018990529051929091169350631429dae8925060648082019260009290919082900301818387803b15801561241457600080fd5b505af1158015612428573d6000803e3d6000fd5b50506001805550505050505050505050505050505050565b612448611078565b15612488576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b61249188613896565b6124d26124cd838360058181106124a457fe5b90506020020135848460028181106124b857fe5b905060200201356138d990919063ffffffff16565b613932565b6124ff886124fa848460058181106124e657fe5b90506020020135858560038181106124b857fe5b6139e5565b612527886124fa8484600581811061251357fe5b90506020020135858560048181106124b857fe5b8661254c8383600581811061253857fe5b90506020020135848460038181106124b857fe5b14612583576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6040805163d505accf60e01b8152336004820152306024820152604481018990526064810188905260ff8716608482015260a4810186905260c4810185905290516001600160a01b038a169163d505accf9160e480830192600092919082900301818387803b1580156125f557600080fd5b505af1158015612609573d6000803e3d6000fd5b5050600554600092506001600160a01b0316905063797f2a26338585858161262d57fe5b905060200201358686600181811061264157fe5b905060200201358787600281811061265557fe5b905060200201358888600381811061266957fe5b905060200201358989600481811061267d57fe5b905060200201358a8a600581811061269157fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b15801561270157600080fd5b505af1158015612715573d6000803e3d6000fd5b505050506040513d602081101561272b57600080fd5b5051600554604080516319eb920160e31b815260048101849052600260248201526000604482018190526001600160a01b038e811660648401529251949550919092169263cf5c900892608480820193929182900301818387803b15801561279257600080fd5b505af11580156127a6573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018d905251908d1693506323b872dd925060648083019260209291908290030181600087803b15801561280757600080fd5b505af115801561281b573d6000803e3d6000fd5b505050506040513d602081101561283157600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b038d811694820194909452336024820152604481018c905290519290911691631429dae89160648082019260009290919082900301818387803b15801561289257600080fd5b505af11580156128a6573d6000803e3d6000fd5b5050505080600080516020613ae283398151915233858560058181106128c857fe5b3360009081526003602090815260409182902080546001810190915582516001600160a01b03979097168752928102949094013593850193909352600284840152606084015250519081900360800190a2505050505050505050565b61292c611078565b1561296c576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b61297589613896565b61297e88613896565b6129a6896124fa8484600581811061299257fe5b90506020020135858560028181106124b857fe5b6129ba886124fa848460058181106124e657fe5b6129ce886124fa8484600581811061251357fe5b866129df8383600581811061253857fe5b14612a16576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6040805163d505accf60e01b8152336004820152306024820152604481018990526064810188905260ff8716608482015260a4810186905260c4810185905290516001600160a01b038a169163d505accf9160e480830192600092919082900301818387803b158015612a8857600080fd5b505af1158015612a9c573d6000803e3d6000fd5b5050600554600092506001600160a01b0316905063797f2a263385858581612ac057fe5b9050602002013586866001818110612ad457fe5b9050602002013587876002818110612ae857fe5b9050602002013588886003818110612afc57fe5b9050602002013589896004818110612b1057fe5b905060200201358a8a6005818110612b2457fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b158015612b9457600080fd5b505af1158015612ba8573d6000803e3d6000fd5b505050506040513d6020811015612bbe57600080fd5b5051600554604080516319eb920160e31b8152600481810185905260248201526001600160a01b038e811660448301528d81166064830152915193945091169163cf5c90089160848082019260009290919082900301818387803b158015612c2557600080fd5b505af1158015612c39573d6000803e3d6000fd5b505060048054604080516323b872dd60e01b815233938101939093526001600160a01b039182166024840152604483018d905251908d1693506323b872dd925060648083019260209291908290030181600087803b158015612c9a57600080fd5b505af1158015612cae573d6000803e3d6000fd5b505050506040513d6020811015612cc457600080fd5b505060048054604080516302853b5d60e31b81526001600160a01b038d811694820194909452336024820152604481018c905290519290911691631429dae89160648082019260009290919082900301818387803b158015612d2557600080fd5b505af1158015612d39573d6000803e3d6000fd5b5050505080600080516020613ae28339815191523385856005818110612d5b57fe5b3360009081526003602090815260409182902080546001810190915582516001600160a01b03979097168752928102949094013593850193909352600484840152606084015250519081900360800190a250505050505050505050565b60026001541415612dfe576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b6002600155612e0b611078565b15612e4b576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b612e5483613896565b612e68836124fa8484600581811061299257fe5b612e7b6124cd8383600581811061253857fe5b612ea26124cd83836005818110612e8e57fe5b90506020020135848460048181106124b857fe5b34612eb38383600581811061253857fe5b14612eea576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546000906001600160a01b031663797f2a263385858581612f0957fe5b9050602002013586866001818110612f1d57fe5b9050602002013587876002818110612f3157fe5b9050602002013588886003818110612f4557fe5b9050602002013589896004818110612f5957fe5b905060200201358a8a6005818110612f6d57fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b158015612fdd57600080fd5b505af1158015612ff1573d6000803e3d6000fd5b505050506040513d602081101561300757600080fd5b5051600554604080516319eb920160e31b815260048101849052600360248201526001600160a01b03888116604483015260006064830181905292519495509092169263cf5c900892608480820193929182900301818387803b15801561306d57600080fd5b505af1158015613081573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b1580156130d557600080fd5b505af11580156130e9573d6000803e3d6000fd5b505050505080600080516020613ae2833981519152338585600581811061310c57fe5b3360009081526003602081815260409283902080546001810190915583516001600160a01b0398909816885293810295909501359486019490945284810193909352606084015250519081900360800190a25050600180555050565b60055460408051633def417960e11b81526004810184905233602482015290516001600160a01b0390921691637bde82f29160448082019260009290919082900301818387803b158015610e9157600080fd5b60026001541415613201576040805162461bcd60e51b815260206004820152601f6024820152600080516020613a9c833981519152604482015290519081900360640190fd5b600260015561320e611078565b1561324e576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b6132616124cd838360058181106124a457fe5b6132746124cd8383600581811061253857fe5b6132876124cd83836005818110612e8e57fe5b346132988383600581811061253857fe5b146132cf576040805162461bcd60e51b815260206004820152600260248201526124a360f11b604482015290519081900360640190fd5b6005546000906001600160a01b031663797f2a2633858585816132ee57fe5b905060200201358686600181811061330257fe5b905060200201358787600281811061331657fe5b905060200201358888600381811061332a57fe5b905060200201358989600481811061333e57fe5b905060200201358a8a600581811061335257fe5b905060200201356040518863ffffffff1660e01b815260040180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001828152602001975050505050505050602060405180830381600087803b1580156133c257600080fd5b505af11580156133d6573d6000803e3d6000fd5b505050506040513d60208110156133ec57600080fd5b5051600554604080516319eb920160e31b815260048101849052600160248201526000604482018190526064820181905291519394506001600160a01b039092169263cf5c900892608480820193929182900301818387803b15801561345157600080fd5b505af1158015613465573d6000803e3d6000fd5b50506004805460408051631994684560e01b81523393810193909352516001600160a01b03909116935063199468459250349160248082019260009290919082900301818588803b1580156134b957600080fd5b505af11580156134cd573d6000803e3d6000fd5b505050505080600080516020613ae283398151915233858560058181106134f057fe5b336000908152600360209081526040918290208054600181810190925583516001600160a01b0398909816885293820295909501359086015284810193909352606084015250519081900360800190a250506001805550565b6005546001600160a01b031690565b613560613814565b6001600160a01b03166135716114b3565b6001600160a01b0316146135ba576040805162461bcd60e51b81526020600482018190526024820152600080516020613b23833981519152604482015290519081900360640190fd5b6001600160a01b0381166135ff5760405162461bcd60e51b8152600401808060200182810382526026815260200180613abc6026913960400191505060405180910390fd5b6002546040516001600160a01b03808416921690600080516020613b4383398151915290600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6000828211156136af576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6136c2613814565b6001600160a01b03166136d36114b3565b6001600160a01b031614613713576040805162461bcd60e51b81526020600482015260026024820152614e4f60f01b604482015290519081900360640190fd5b565b61371d611078565b613765576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613798613814565b604080516001600160a01b039092168252519081900360200190a1565b60008282018381101561380d576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b3390565b613820611078565b15613860576040805162461bcd60e51b81526020600482015260106024820152600080516020613b63833981519152604482015290519081900360640190fd5b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613798613814565b6001600160a01b0381166138d6576040805162461bcd60e51b8152602060048201526002602482015261304160f01b604482015290519081900360640190fd5b50565b6000826138e8575060006136b4565b828202828482816138f557fe5b041461380d5760405162461bcd60e51b8152600401808060200182810382526021815260200180613b026021913960400191505060405180910390fd5b600660009054906101000a90046001600160a01b03166001600160a01b0316630f878aed6040518163ffffffff1660e01b815260040160206040518083038186803b15801561398057600080fd5b505afa158015613994573d6000803e3d6000fd5b505050506040513d60208110156139aa57600080fd5b50518111156138d6576040805162461bcd60e51b8152602060048201526002602482015261105360f21b604482015290519081900360640190fd5b60065460408051635a860c8760e01b81526001600160a01b03858116600483015291519190921691635a860c87916024808301926020929190829003018186803b158015613a3257600080fd5b505afa158015613a46573d6000803e3d6000fd5b505050506040513d6020811015613a5c57600080fd5b5051811115613a97576040805162461bcd60e51b8152602060048201526002602482015261105360f21b604482015290519081900360640190fd5b505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373306fc6597e2ee1311ae9c98a7cb35eefa1fb5eccecc259e85185cb2aaf157146536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05061757361626c653a2070617573656400000000000000000000000000000000a26469706673582212200acff1259167916819b3e37b57351a59ce9d6d417bc58bdeef974e7d2613d81464736f6c63430007010033", + "sourceMap": "687:23712:0:-:0;;;3163:390;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3163:390:0;;;;;;;;;;;928:5:29;918:15;;-1:-1:-1;;918:15:29;;;;1743:22:30;;3163:390:0;;;887:12:22;:10;:12::i;:::-;909:6;:18;;-1:-1:-1;;;;;;909:18:22;-1:-1:-1;;;;;909:18:22;;;;;;;;942:43;;909:18;;-1:-1:-1;909:18:22;-1:-1:-1;;942:43:22;;-1:-1:-1;;942:43:22;-1:-1:-1;3296:30:0;3311:14;3296;:30::i;:::-;3337:33;3352:17;3337:14;:33::i;:::-;3381:31;3396:15;3381:14;:31::i;:::-;3425:13;:30;;-1:-1:-1;;;;;3425:30:0;;;-1:-1:-1;;;;;;3425:30:0;;;;;;;3466:16;:36;;;;;;;;;;;;;;;3513:14;:32;;;;;;;;;;;687:23712;;598:104:27;685:10;598:104;:::o;1493:134:0:-;-1:-1:-1;;;;;1571:26:0;;1563:41;;;;;-1:-1:-1;;;1563:41:0;;;;;;;;;;;;-1:-1:-1;;;1563:41:0;;;;;;;;;;;;;;;1493:134;:::o;687:23712::-;;;;;;;", + "deployedSourceMap": "687:23712:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23344:173;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23344:173:0;-1:-1:-1;;;;;23344:173:0;;:::i;:::-;;;;;;;;;;;;;;;;21165:530;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21165:530:0;;:::i;:::-;;24232:164;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;24232:164:0;;;;;;;;;;;;;;15549:1763;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15549:1763:0;;;-1:-1:-1;;;;;15549:1763:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;22079:143::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22079:143:0;;:::i;22346:147::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22346:147:0;;:::i;4242:275::-;;;;;;;;;;;;;:::i;1035:84:29:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;12394:859:0;;;;;;;;;;;;;;;;-1:-1:-1;12394:859:0;;;;;;-1:-1:-1;;;;;12394:859:0;;:::i;1700:145:22:-;;;;;;;;;;;;;:::i;22674:194:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22674:194:0;;:::i;23014:134::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;23014:134:0;-1:-1:-1;;;;;23014:134:0;;:::i;3868:181::-;;;;;;;;;;;;;:::i;1068:85:22:-;;;;;;;;;;;;;:::i;17320:1819:0:-;;;;;;;;;;;;;;;;-1:-1:-1;17320:1819:0;;;-1:-1:-1;;;;;17320:1819:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;19147:1719::-;;;;;;;;;;;;;;;;-1:-1:-1;19147:1719:0;;;-1:-1:-1;;;;;19147:1719:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;13261:2280::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13261:2280:0;;;-1:-1:-1;;;;;13261:2280:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;8716:2003::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8716:2003:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8716:2003:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8716:2003:0;;;;;;;;;;-1:-1:-1;8716:2003:0;;-1:-1:-1;8716:2003:0;-1:-1:-1;8716:2003:0;:::i;6593:2115::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6593:2115:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6593:2115:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6593:2115:0;;;;;;;;;;-1:-1:-1;6593:2115:0;;-1:-1:-1;6593:2115:0;-1:-1:-1;6593:2115:0;:::i;10727:1401::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10727:1401:0;;;;;;;;;;;;;;;-1:-1:-1;;;10727:1401:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10727:1401:0;;;;;;;;;;-1:-1:-1;10727:1401:0;;-1:-1:-1;10727:1401:0;-1:-1:-1;10727:1401:0;:::i;21823:143::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21823:143:0;;:::i;5262:1323::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5262:1323:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5262:1323:0;;;;;;;;;;-1:-1:-1;5262:1323:0;;-1:-1:-1;5262:1323:0;-1:-1:-1;5262:1323:0;:::i;23929:159::-;;;;;;;;;;;;;:::i;1994:240:22:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1994:240:22;-1:-1:-1;;;;;1994:240:22;;:::i;23638:154:0:-;;;;;;;;;;;;;:::i;23344:173::-;-1:-1:-1;;;;;23487:22:0;23455:7;23487:22;;;:14;:22;;;;;;;23344:173::o;21165:530::-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;21381:13:0::2;::::0;21366:130:::2;::::0;;-1:-1:-1;;;21366:130:0;;::::2;::::0;::::2;::::0;;;21471:10:::2;21366:130:::0;;;;;;21326:24:::2;::::0;-1:-1:-1;;;;;21381:13:0::2;::::0;21366:53:::2;::::0;:130;;;;;::::2;::::0;;;;;;;;21326:24;21381:13;21366:130;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;21366:130:0;21516:14:::2;::::0;;21507:139:::2;::::0;;-1:-1:-1;;;21507:139:0;;;;::::2;::::0;;;;;;;;;21625:10:::2;21507:139:::0;;;;;21366:130;;-1:-1:-1;;;;;;21516:14:0::2;::::0;21507:43:::2;::::0;:139;;;;;21516:14:::2;::::0;21507:139;;;;;;;;21516:14;;21507:139;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;21674:10:0::2;21659:26;::::0;;;:14:::2;:26;::::0;;;;:28;;::::2;::::0;;::::2;::::0;;;2563:22:30;;-1:-1:-1;;;;21165:530:0:o;24232:164::-;24372:16;;-1:-1:-1;;;;;24372:16:0;24232:164;:::o;15549:1763::-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;15895:13:0::2;::::0;15880:64:::2;::::0;;-1:-1:-1;;;15880:64:0;;::::2;::::0;::::2;::::0;;;;;15831:13:::2;::::0;;;-1:-1:-1;;;;;15895:13:0;;::::2;::::0;15880:48:::2;::::0;:64;;;;;;;;;;;15895:13;15880:64;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;15880:64:0;;::::2;::::0;;::::2;::::0;;;-1:-1:-1;15880:64:0;-1:-1:-1;15880:64:0;15963:26:::2;:11:::0;15880:64;15963:15:::2;:26::i;:::-;:35;15955:50;;;::::0;;-1:-1:-1;;;15955:50:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;15955:50:0;;;;;;;;;;;;;::::2;;16090:13;::::0;16075:66:::2;::::0;;-1:-1:-1;;;16075:66:0;;::::2;::::0;::::2;::::0;;;;;16034:25:::2;::::0;-1:-1:-1;;;;;16090:13:0::2;::::0;16075:50:::2;::::0;:66;;;;;::::2;::::0;;;;;;;;16090:13;16075:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;16075:66:0;16210:13:::2;::::0;16195:100:::2;::::0;;-1:-1:-1;;;16195:100:0;;::::2;::::0;::::2;::::0;;;;;16075:66;;-1:-1:-1;16152:27:0::2;::::0;-1:-1:-1;;;;;16210:13:0;;::::2;::::0;16195:52:::2;::::0;:100;;;;;16075:66:::2;::::0;16195:100;;;;;;;;16210:13;16195:100;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;16195:100:0;;-1:-1:-1;;;;;;16316:40:0;;::::2;::::0;;::::2;;16308:55;;;::::0;;-1:-1:-1;;;16308:55:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;16308:55:0;;;;;;;;;;;;;::::2;;16540:203;::::0;;-1:-1:-1;;;16540:203:0;;16597:10:::2;16540:203;::::0;::::2;::::0;16630:4:::2;16540:203:::0;;;;;;;;;;;;;;;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16540:42:0;::::2;::::0;::::2;::::0;:203;;;;;-1:-1:-1;;16540:203:0;;;;;;;-1:-1:-1;16540:42:0;:203;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;16771:13;;;;;;;;;-1:-1:-1::0;;;;;16771:13:0::2;-1:-1:-1::0;;;;;16756:39:0::2;;16810:14;16839:7;16861:10;1067:1:5;16907:14:0;:26;16922:10;-1:-1:-1::0;;;;;16907:26:0::2;-1:-1:-1::0;;;;;16907:26:0::2;;;;;;;;;;;;;:28;;;;;;;;;;;;16756:190;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;16756:190:0::2;;;;;;-1:-1:-1::0;;;;;16756:190:0::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;17055:14:0::2;::::0;;16959:148:::2;::::0;;-1:-1:-1;;;16959:148:0;;17022:10:::2;16959:148:::0;;::::2;::::0;;;;-1:-1:-1;;;;;17055:14:0;;::::2;16959:148:::0;;;;;;;;;;;:48;;::::2;::::0;-1:-1:-1;16959:48:0::2;::::0;-1:-1:-1;16959:148:0;;;;;::::2;::::0;;;;;;;;17055:14:::2;16959:48:::0;:148;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;;17173:14:0::2;::::0;;17164:140:::2;::::0;;-1:-1:-1;;;17164:140:0;;-1:-1:-1;;;;;17164:140:0;;::::2;::::0;;::::2;::::0;;;;17257:10:::2;17164:140:::0;;;;;;;;;;;;17173:14;;;::::2;::::0;17164:46:::2;::::0;:140;;;;;17173:14:::2;::::0;17164:140;;;;;;;;17173:14;;17164:140;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1637:1:30;2563:22;;-1:-1:-1;;;;;;;;;;;;;15549:1763:0:o;22079:143::-;22164:13;;22149:65;;;-1:-1:-1;;;22149:65:0;;;;;;;;22203:10;22149:65;;;;;;-1:-1:-1;;;;;22164:13:0;;;;22149:36;;:65;;;;;22164:13;;22149:65;;;;;;;;22164:13;;22149:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22079:143;:::o;22346:147::-;22433:13;;22418:67;;;-1:-1:-1;;;22418:67:0;;;;;;;;22474:10;22418:67;;;;;;-1:-1:-1;;;;;22433:13:0;;;;22418:38;;:67;;;;;22433:13;;22418:67;;;;;;;;22433:13;;22418:67;;;;;;;;;;4242:275;4290:17;:15;:17::i;:::-;4335:14;;;4326:37;;;-1:-1:-1;;;4326:37:0;;;;-1:-1:-1;;;;;4335:14:0;;;;4326:35;;:37;;;;;;;;;;;;4335:14;4326:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4326:37:0;4318:52;;;;;-1:-1:-1;;;4318:52:0;;;;;;;;;;;;-1:-1:-1;;;4318:52:0;;;;;;;;;;;;;;;4404:10;:8;:10::i;:::-;4440:13;;;;;;;;;-1:-1:-1;;;;;4440:13:0;-1:-1:-1;;;;;4425:37:0;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4484:14:0;;;4475:34;;;-1:-1:-1;;;4475:34:0;;;;-1:-1:-1;;;;;4484:14:0;;;;-1:-1:-1;4475:32:0;;-1:-1:-1;4475:34:0;;;;4484:14;;4475:34;;;;;;4484:14;;4475:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4242:275::o;1035:84:29:-;1082:4;1105:7;;;1035:84;:::o;12394:859:0:-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;12708:13:0::2;::::0;12693:59:::2;::::0;;-1:-1:-1;;;12693:59:0;;::::2;::::0;::::2;::::0;;;;;12601:9:::2;::::0;12579:19:::2;::::0;;;-1:-1:-1;;;;;12708:13:0;;::::2;::::0;12693:43:::2;::::0;:59;;;;;::::2;::::0;;;;;;;;;12708:13;12693:59;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;12693:59:0;;;;;;;;;-1:-1:-1;12693:59:0;-1:-1:-1;12795:11:0;12771:20:::2;12693:59:::0;;12771:9:::2;:20::i;:::-;:35;12763:50;;;::::0;;-1:-1:-1;;;12763:50:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;12763:50:0;;;;;;;;;;;;;::::2;;12949:13;::::0;13039:10:::2;12949:13;13085:26:::0;;;:14:::2;:26;::::0;;;;;:28;;12949:13;13085:28;;::::2;::::0;;;12934:190;;-1:-1:-1;;;12934:190:0;;::::2;::::0;::::2;::::0;;;-1:-1:-1;;;;;12934:190:0;;::::2;::::0;;;;;;;;;;;;;;;;;;;;;;;;12949:13;;;::::2;::::0;12934:39:::2;::::0;:190;;;;;12949:13;12934:190;;;;;12949:13;;12934:190;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;13184:14:0::2;::::0;;13175:70:::2;::::0;;-1:-1:-1;;;13175:70:0;;13234:10:::2;13175:70:::0;;::::2;::::0;;;;;-1:-1:-1;;;;;13184:14:0;;::::2;::::0;-1:-1:-1;13175:40:0::2;::::0;-1:-1:-1;13223:9:0::2;::::0;13175:70;;;;;13184:14:::2;::::0;13175:70;;;;;;;;13223:9;13184:14;13175:70;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1637:1:30;2563:22;;-1:-1:-1;;;;;;;;12394:859:0:o;1700:145:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1790:6:::1;::::0;1769:40:::1;::::0;1806:1:::1;::::0;-1:-1:-1;;;;;1790:6:22::1;::::0;-1:-1:-1;;;;;;;;;;;1769:40:22;1806:1;;1769:40:::1;1819:6;:19:::0;;-1:-1:-1;;;;;;1819:19:22::1;::::0;;1700:145::o;22674:194:0:-;22766:13;;22751:109;;;-1:-1:-1;;;22751:109:0;;;;;;;;22839:10;22751:109;;;;;;-1:-1:-1;;;;;22766:13:0;;;;22751:43;;:109;;;;;22766:13;;22751:109;;;;;;;;22766:13;;22751:109;;;;;;;;;;23014:134;-1:-1:-1;;;;;23116:22:0;;;;;:14;:22;;;;;:24;;;;;;23014:134::o;3868:181::-;3914:17;:15;:17::i;:::-;3942:8;:6;:8::i;:::-;3976:13;;;;;;;;;-1:-1:-1;;;;;3976:13:0;-1:-1:-1;;;;;3961:35:0;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4018:14:0;;;4009:32;;;-1:-1:-1;;;4009:32:0;;;;-1:-1:-1;;;;;4018:14:0;;;;-1:-1:-1;4009:30:0;;-1:-1:-1;4009:32:0;;;;4018:14;;4009:32;;;;;;4018:14;;4009:32;;;;;;;;;;1068:85:22;1140:6;;-1:-1:-1;;;;;1140:6:22;1068:85;:::o;17320:1819:0:-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;17673:13:0::2;::::0;17658:64:::2;::::0;;-1:-1:-1;;;17658:64:0;;::::2;::::0;::::2;::::0;;;;;17609:13:::2;::::0;;;-1:-1:-1;;;;;17673:13:0;;::::2;::::0;17658:48:::2;::::0;:64;;;;;;;;;;;17673:13;17658:64;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;17658:64:0;;::::2;::::0;;::::2;::::0;;;-1:-1:-1;17658:64:0;-1:-1:-1;17750:9:0::2;17741:18:::0;::::2;17733:33;;;::::0;;-1:-1:-1;;;17733:33:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;17733:33:0;;;;;;;;;;;;;::::2;;17906:14;17893:9;:27;17885:42;;;::::0;;-1:-1:-1;;;17885:42:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;17885:42:0;;;;;;;;;;;;;::::2;;18109:13;::::0;18094:100:::2;::::0;;-1:-1:-1;;;18094:100:0;;::::2;::::0;::::2;::::0;;;;;18051:27:::2;::::0;-1:-1:-1;;;;;18109:13:0::2;::::0;18094:52:::2;::::0;:100;;;;;::::2;::::0;;;;;;;;18109:13;18094:100;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;18094:100:0;18205:208:::2;::::0;;-1:-1:-1;;;18205:208:0;;18264:10:::2;18205:208;::::0;::::2;::::0;18297:4:::2;18205:208:::0;;;;;;;;;;;;;;;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;;;;;18094:100;;-1:-1:-1;;;;;;18205:44:0;::::2;::::0;::::2;::::0;:208;;;;;-1:-1:-1;;18205:208:0;;;;;;;;-1:-1:-1;18205:44:0;:208;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;18441:13;;;;;;;;;-1:-1:-1::0;;;;;18441:13:0::2;-1:-1:-1::0;;;;;18426:39:0::2;;18480:14;18509:7;18531:10;985:1:5;18577:14:0;:26;18592:10;-1:-1:-1::0;;;;;18577:26:0::2;-1:-1:-1::0;;;;;18577:26:0::2;;;;;;;;;;;;;:28;;;;;;;;;;;;18426:190;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;18426:190:0::2;;;;;;-1:-1:-1::0;;;;;18426:190:0::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;18727:14:0::2;::::0;;18629:153:::2;::::0;;-1:-1:-1;;;18629:153:0;;18694:10:::2;18629:153:::0;;::::2;::::0;;;;-1:-1:-1;;;;;18727:14:0;;::::2;18629:153:::0;;;;;;;;;;;:50;;::::2;::::0;-1:-1:-1;18629:50:0::2;::::0;-1:-1:-1;18629:153:0;;;;;::::2;::::0;;;;;;;;18727:14:::2;18629:50:::0;:153;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;;18848:14:0::2;::::0;;18839:145:::2;::::0;;-1:-1:-1;;;18839:145:0;;-1:-1:-1;;;;;18839:145:0;;::::2;::::0;;::::2;::::0;;;;18934:10:::2;18839:145:::0;;;;;;;;;;;;18848:14;;;::::2;::::0;18839:46:::2;::::0;:145;;;;;18848:14:::2;::::0;18839:145;;;;;;;;18848:14;;18839:145;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;19044:14:0::2;::::0;;19035:94:::2;::::0;;-1:-1:-1;;;19035:94:0;;19108:10:::2;19035:94:::0;;::::2;::::0;;;;;-1:-1:-1;;;;;19044:14:0;;::::2;::::0;-1:-1:-1;19035:40:0::2;::::0;-1:-1:-1;19083:9:0::2;::::0;19035:94;;;;;19044:14:::2;::::0;19035:94;;;;;;;;19083:9;19044:14;19035:94;::::2;;::::0;::::2;;;;::::0;::::2;19147:1719:::0;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;19498:13:0::2;::::0;19483:64:::2;::::0;;-1:-1:-1;;;19483:64:0;;::::2;::::0;::::2;::::0;;;;;19434:13:::2;::::0;;;-1:-1:-1;;;;;19498:13:0;;::::2;::::0;19483:48:::2;::::0;:64;;;;;;;;;;;19498:13;19483:64;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;19483:64:0;;::::2;::::0;;::::2;::::0;;;-1:-1:-1;19483:64:0;-1:-1:-1;19566:21:0;;::::2;19558:36;;;::::0;;-1:-1:-1;;;19558:36:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;19558:36:0;;;;;;;;;;;;;::::2;;19734:9;19721;:22;19713:37;;;::::0;;-1:-1:-1;;;19713:37:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;19713:37:0;;;;;;;;;;;;;::::2;;19930:13;::::0;19915:66:::2;::::0;;-1:-1:-1;;;19915:66:0;;::::2;::::0;::::2;::::0;;;;;19874:25:::2;::::0;-1:-1:-1;;;;;19930:13:0::2;::::0;19915:50:::2;::::0;:66;;;;;::::2;::::0;;;;;;;;19930:13;19915:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;19915:66:0;19992:197:::2;::::0;;-1:-1:-1;;;19992:197:0;;20049:10:::2;19992:197;::::0;::::2;::::0;20082:4:::2;19992:197:::0;;;;;;;;;;;;;;;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;;;;;19915:66;;-1:-1:-1;;;;;;19992:42:0;::::2;::::0;::::2;::::0;:197;;;;;-1:-1:-1;;19992:197:0;;;;;;;;-1:-1:-1;19992:42:0;:197;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;20217:13;;;;;;;;;-1:-1:-1::0;;;;;20217:13:0::2;-1:-1:-1::0;;;;;20202:39:0::2;;20256:14;20285:7;20307:10;1026:1:5;20353:14:0::0;:26:::2;20368:10;-1:-1:-1::0;;;;;20353:26:0::2;-1:-1:-1::0;;;;;20353:26:0::2;;;;;;;;;;;;;:28;;;;;;;;;;;;20202:190;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;20202:190:0::2;;;;;;-1:-1:-1::0;;;;;20202:190:0::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;20501:14:0::2;::::0;;20405:142:::2;::::0;;-1:-1:-1;;;20405:142:0;;20468:10:::2;20405:142:::0;;::::2;::::0;;;;-1:-1:-1;;;;;20501:14:0;;::::2;20405:142:::0;;;;;;;;;;;:48;;::::2;::::0;-1:-1:-1;20405:48:0::2;::::0;-1:-1:-1;20405:142:0;;;;;::::2;::::0;;;;;;;;20501:14:::2;20405:48:::0;:142;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;;20613:14:0::2;::::0;;20604:134:::2;::::0;;-1:-1:-1;;;20604:134:0;;-1:-1:-1;;;;;20604:134:0;;::::2;::::0;;::::2;::::0;;;;20697:10:::2;20604:134:::0;;;;;;;;;;;;20613:14;;;::::2;::::0;20604:46:::2;::::0;:134;;;;;20613:14:::2;::::0;20604:134;;;;;;;;20613:14;;20604:134;::::2;;::::0;::::2;;;;::::0;::::2;13261:2280:::0;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;13728:13:0::2;::::0;13713:64:::2;::::0;;-1:-1:-1;;;13713:64:0;;::::2;::::0;::::2;::::0;;;;;13664:13:::2;::::0;;;-1:-1:-1;;;;;13728:13:0;;::::2;::::0;13713:48:::2;::::0;:64;;;;;;;;;;;13728:13;13713:64;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;13713:64:0;;::::2;::::0;;::::2;::::0;;;-1:-1:-1;13713:64:0;-1:-1:-1;13713:64:0;13796:26:::2;:11:::0;13713:64;13796:15:::2;:26::i;:::-;:35;13788:50;;;::::0;;-1:-1:-1;;;13788:50:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;13788:50:0;;;;;;;;;;;;;::::2;;13923:13;::::0;13908:66:::2;::::0;;-1:-1:-1;;;13908:66:0;;::::2;::::0;::::2;::::0;;;;;13867:25:::2;::::0;-1:-1:-1;;;;;13923:13:0::2;::::0;13908:50:::2;::::0;:66;;;;;::::2;::::0;;;;;;;;13923:13;13908:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;13867:107;;13985:27;14043:13;;;;;;;;;-1:-1:-1::0;;;;;14043:13:0::2;-1:-1:-1::0;;;;;14028:52:0::2;;14099:14;14028:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;14028:100:0;14141:212:::2;::::0;;-1:-1:-1;;;14141:212:0;;14198:10:::2;14141:212;::::0;::::2;::::0;14231:4:::2;14141:212:::0;;;;;;;;;;;;;;;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;;;;;14028:100;;-1:-1:-1;;;;;;14141:42:0;::::2;::::0;::::2;::::0;:212;;;;;-1:-1:-1;;14141:212:0;;;;;;;;-1:-1:-1;14141:42:0;:212;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;14364:224:0::2;::::0;;-1:-1:-1;;;14364:224:0;;14423:10:::2;14364:224;::::0;::::2;::::0;14456:4:::2;14364:224:::0;;;;;;;;;;;;;;;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14364:44:0;::::2;::::0;-1:-1:-1;14364:44:0::2;::::0;-1:-1:-1;14364:224:0;;;;;-1:-1:-1;;14364:224:0;;;;;;;-1:-1:-1;14364:44:0;:224;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;14616:13;;;;;;;;;-1:-1:-1::0;;;;;14616:13:0::2;-1:-1:-1::0;;;;;14601:39:0::2;;14655:14;14684:7;14706:10;1067:1:5;14752:14:0;:26;14767:10;-1:-1:-1::0;;;;;14752:26:0::2;-1:-1:-1::0;;;;;14752:26:0::2;;;;;;;;;;;;;:28;;;;;;;;;;;;14601:190;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;14601:190:0::2;;;;;;-1:-1:-1::0;;;;;14601:190:0::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;14900:14:0::2;::::0;;14804:142:::2;::::0;;-1:-1:-1;;;14804:142:0;;14867:10:::2;14804:142:::0;;::::2;::::0;;;;-1:-1:-1;;;;;14900:14:0;;::::2;14804:142:::0;;;;;;;;;;;:48;;::::2;::::0;-1:-1:-1;14804:48:0::2;::::0;-1:-1:-1;14804:142:0;;;;;::::2;::::0;;;;;;;;14900:14:::2;14804:48:::0;:142;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;;15055:14:0::2;::::0;;14957:148:::2;::::0;;-1:-1:-1;;;14957:148:0;;15022:10:::2;14957:148:::0;;::::2;::::0;;;;-1:-1:-1;;;;;15055:14:0;;::::2;14957:148:::0;;;;;;;;;;;:50;;::::2;::::0;::::2;::::0;:148;;;;;14804:142:::2;::::0;14957:148;;;;;;;15055:14:::2;14957:50:::0;:148;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;;15190:14:0::2;::::0;;15181:134:::2;::::0;;-1:-1:-1;;;15181:134:0;;-1:-1:-1;;;;;15181:134:0;;::::2;::::0;;::::2;::::0;;;;15274:10:::2;15181:134:::0;;;;;;;;;;;;15190:14;;;::::2;::::0;15181:46:::2;::::0;:134;;;;;15190:14:::2;::::0;15181:134;;;;;;;;15190:14;;15181:134;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;15402:14:0::2;::::0;;15393:140:::2;::::0;;-1:-1:-1;;;15393:140:0;;-1:-1:-1;;;;;15393:140:0;;::::2;::::0;;::::2;::::0;;;;15488:10:::2;15393:140:::0;;;;;;;;;;;;15402:14;;;::::2;::::0;-1:-1:-1;15393:46:0::2;::::0;-1:-1:-1;15393:140:0;;;;;15402:14:::2;::::0;15393:140;;;;;;;;15402:14;;15393:140;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;1637:1:30;2563:22;;-1:-1:-1;;;;;;;;;;;;;;;;13261:2280:0:o;8716:2003::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;;;9002:36:0::1;9017:20;9002:14;:36::i;:::-;9049:46;9066:28;9082:8;;9091:1;9082:11;;;;;;;;;;;;;9066:8;;9075:1;9066:11;;;;;;;;;;;;;:15;;:28;;;;:::i;:::-;9049:16;:46::i;:::-;9106:70;9125:20;9147:28;9163:8;;9172:1;9163:11;;;;;;;;;;;;;9147:8;;9156:1;9147:11;;;;;;:28;9106:18;:70::i;:::-;9187;9206:20;9228:28;9244:8;;9253:1;9244:11;;;;;;;;;;;;;9228:8;;9237:1;9228:11;;;;;;9187:70;9310:11;9278:28;9294:8;;9303:1;9294:11;;;;;;;;;;;;;9278:8;;9287:1;9278:11;;;;;;:28;:43;9270:58;;;::::0;;-1:-1:-1;;;9270:58:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9270:58:0;;;;;;;;;;;;;::::1;;9449:206;::::0;;-1:-1:-1;;;9449:206:0;;9509:10:::1;9449:206;::::0;::::1;::::0;9542:4:::1;9449:206:::0;;;;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9449:45:0;::::1;::::0;::::1;::::0;:206;;;;;-1:-1:-1;;9449:206:0;;;;;;;-1:-1:-1;9449:45:0;:206;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;9720:13:0::1;::::0;9668:21:::1;::::0;-1:-1:-1;;;;;;9720:13:0::1;::::0;-1:-1:-1;9705:49:0::1;9773:10;9802:8:::0;;9668:21;9802:11;::::1;;;;;;;;;;9832:8;;9841:1;9832:11;;;;;;;;;;;;;9862:8;;9871:1;9862:11;;;;;;;;;;;;;9892:8;;9901:1;9892:11;;;;;;;;;;;;;9922:8;;9931:1;9922:11;;;;;;;;;;;;;9952:8;;9961:1;9952:11;;;;;;;;;;;;;9705:273;;;;;;;;;;;;;-1:-1:-1::0;;;;;9705:273:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;9705:273:0;10006:13:::1;::::0;9991:169:::1;::::0;;-1:-1:-1;;;9991:169:0;;::::1;::::0;::::1;::::0;;;985:1:5::1;9991:169:0::0;;;;10006:13:::1;9991:169:::0;;;;;;-1:-1:-1;;;;;9991:169:0;;::::1;::::0;;;;;;9705:273;;-1:-1:-1;10006:13:0;;;::::1;::::0;9991:49:::1;::::0;:169;;;;;10006:13;9991:169;;;;;;10006:13;;9991:169;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;10272:14:0::1;::::0;;10173:151:::1;::::0;;-1:-1:-1;;;10173:151:0;;10239:10:::1;10173:151:::0;;::::1;::::0;;;;-1:-1:-1;;;;;10272:14:0;;::::1;10173:151:::0;;;;;;;;;;;:51;;::::1;::::0;-1:-1:-1;10173:51:0::1;::::0;-1:-1:-1;10173:151:0;;;;;::::1;::::0;;;;;;;;10272:14:::1;10173:51:::0;:151;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;10390:14:0::1;::::0;;10381:143:::1;::::0;;-1:-1:-1;;;10381:143:0;;-1:-1:-1;;;;;10381:143:0;;::::1;::::0;;::::1;::::0;;;;10477:10:::1;10381:143:::0;;;;;;;;;;;;10390:14;;;::::1;::::0;10381:46:::1;::::0;:143;;;;;10390:14:::1;::::0;10381:143;;;;;;;;10390:14;;10381:143;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;10572:13;-1:-1:-1::0;;;;;;;;;;;10600:10:0::1;10625:8;;10634:1;10625:11;;;;;;;10687:10;10672:26;::::0;;;:14:::1;10625:11;10672:26:::0;;;;;;;;:28;;::::1;::::0;::::1;::::0;;;10542:169;;-1:-1:-1;;;;;10542:169:0;;;::::1;::::0;;10625:11;;::::1;::::0;;;::::1;;10542:169:::0;;::::1;::::0;;;;985:1:5::1;10542:169:0::0;;;;;;;;-1:-1:-1;10542:169:0;;;;;;;;::::1;1388:1:29;8716:2003:0::0;;;;;;;;:::o;6593:2115::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;;;6916:34:0::1;6931:18;6916:14;:34::i;:::-;6961:36;6976:20;6961:14;:36::i;:::-;7008:68;7027:18;7047:28;7063:8;;7072:1;7063:11;;;;;;;;;;;;;7047:8;;7056:1;7047:11;;;;;;7008:68;7087:70;7106:20;7128:28;7144:8;;7153:1;7144:11;;;;;;7087:70;7168;7187:20;7209:28;7225:8;;7234:1;7225:11;;;;;;7168:70;7291:11;7259:28;7275:8;;7284:1;7275:11;;;;;;7259:28;:43;7251:58;;;::::0;;-1:-1:-1;;;7251:58:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;7251:58:0;;;;;;;;;;;;;::::1;;7430:206;::::0;;-1:-1:-1;;;7430:206:0;;7490:10:::1;7430:206;::::0;::::1;::::0;7523:4:::1;7430:206:::0;;;;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7430:45:0;::::1;::::0;::::1;::::0;:206;;;;;-1:-1:-1;;7430:206:0;;;;;;;-1:-1:-1;7430:45:0;:206;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;7701:13:0::1;::::0;7649:21:::1;::::0;-1:-1:-1;;;;;;7701:13:0::1;::::0;-1:-1:-1;7686:49:0::1;7754:10;7783:8:::0;;7649:21;7783:11;::::1;;;;;;;;;;7813:8;;7822:1;7813:11;;;;;;;;;;;;;7843:8;;7852:1;7843:11;;;;;;;;;;;;;7873:8;;7882:1;7873:11;;;;;;;;;;;;;7903:8;;7912:1;7903:11;;;;;;;;;;;;;7933:8;;7942:1;7933:11;;;;;;;;;;;;;7686:273;;;;;;;;;;;;;-1:-1:-1::0;;;;;7686:273:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;7686:273:0;7987:13:::1;::::0;7972:177:::1;::::0;;-1:-1:-1;;;7972:177:0;;1067:1:5::1;7972:177:0::0;;::::1;::::0;;;;;;;-1:-1:-1;;;;;7972:177:0;;::::1;::::0;;;;;;::::1;::::0;;;;;;7686:273;;-1:-1:-1;7987:13:0;::::1;::::0;7972:49:::1;::::0;:177;;;;;7987:13:::1;::::0;7972:177;;;;;;;;7987:13;;7972:177;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;8261:14:0::1;::::0;;8162:151:::1;::::0;;-1:-1:-1;;;8162:151:0;;8228:10:::1;8162:151:::0;;::::1;::::0;;;;-1:-1:-1;;;;;8261:14:0;;::::1;8162:151:::0;;;;;;;;;;;:51;;::::1;::::0;-1:-1:-1;8162:51:0::1;::::0;-1:-1:-1;8162:151:0;;;;;::::1;::::0;;;;;;;;8261:14:::1;8162:51:::0;:151;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;8379:14:0::1;::::0;;8370:143:::1;::::0;;-1:-1:-1;;;8370:143:0;;-1:-1:-1;;;;;8370:143:0;;::::1;::::0;;::::1;::::0;;;;8466:10:::1;8370:143:::0;;;;;;;;;;;;8379:14;;;::::1;::::0;8370:46:::1;::::0;:143;;;;;8379:14:::1;::::0;8370:143;;;;;;;;8379:14;;8370:143;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;8561:13;-1:-1:-1::0;;;;;;;;;;;8589:10:0::1;8614:8;;8623:1;8614:11;;;;;;;8676:10;8661:26;::::0;;;:14:::1;8614:11;8661:26:::0;;;;;;;;:28;;::::1;::::0;::::1;::::0;;;8531:169;;-1:-1:-1;;;;;8531:169:0;;;::::1;::::0;;8614:11;;::::1;::::0;;;::::1;;8531:169:::0;;::::1;::::0;;;;1067:1:5::1;8531:169:0::0;;;;;;;;-1:-1:-1;8531:169:0;;;;;;;;::::1;1388:1:29;6593:2115:0::0;;;;;;;;;:::o;10727:1401::-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;10907:34:0::2;10922:18;10907:14;:34::i;:::-;10952:68;10971:18;10991:28;11007:8;;11016:1;11007:11;;;;;;10952:68;11031:46;11048:28;11064:8;;11073:1;11064:11;;;;;;11031:46;11088;11105:28;11121:8;;11130:1;11121:11;;;;;;;;;;;;;11105:8;;11114:1;11105:11;;;;;;11088:46;11187:9;11155:28;11171:8;;11180:1;11171:11;;;;;;11155:28;:41;11147:56;;;::::0;;-1:-1:-1;;;11147:56:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;11147:56:0;;;;;;;;;;;;;::::2;;11376:13;::::0;11324:21:::2;::::0;-1:-1:-1;;;;;11376:13:0::2;11361:49;11429:10;11458:8:::0;;11324:21;11458:11;::::2;;;;;;;;;;11488:8;;11497:1;11488:11;;;;;;;;;;;;;11518:8;;11527:1;11518:11;;;;;;;;;;;;;11548:8;;11557:1;11548:11;;;;;;;;;;;;;11578:8;;11587:1;11578:11;;;;;;;;;;;;;11608:8;;11617:1;11608:11;;;;;;;;;;;;;11361:273;;;;;;;;;;;;;-1:-1:-1::0;;;;;11361:273:0::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;11361:273:0;11660:13:::2;::::0;11645:167:::2;::::0;;-1:-1:-1;;;11645:167:0;;::::2;::::0;::::2;::::0;;;1026:1:5::2;11645:167:0::0;;;;-1:-1:-1;;;;;11645:167:0;;::::2;::::0;;;;11660:13:::2;11645:167:::0;;;;;;;;11361:273;;-1:-1:-1;11660:13:0;;::::2;::::0;11645:49:::2;::::0;:167;;;;;11660:13;11645:167;;;;;;11660:13;;11645:167;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;11872:14:0::2;::::0;;11863:70:::2;::::0;;-1:-1:-1;;;11863:70:0;;11922:10:::2;11863:70:::0;;::::2;::::0;;;;;-1:-1:-1;;;;;11872:14:0;;::::2;::::0;-1:-1:-1;11863:40:0::2;::::0;-1:-1:-1;11911:9:0::2;::::0;11863:70;;;;;11872:14:::2;::::0;11863:70;;;;;;;;11911:9;11872:14;11863:70;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;11981:13;-1:-1:-1::0;;;;;;;;;;;12009:10:0::2;12034:8;;12043:1;12034:11;;;;;;;12096:10;12081:26;::::0;;;1026:1:5::2;12034:11:0;12081:26:::0;;;;;;;;:28;;::::2;::::0;::::2;::::0;;;11951:169;;-1:-1:-1;;;;;11951:169:0;;;::::2;::::0;;12034:11;;::::2;::::0;;;::::2;;11951:169:::0;;::::2;::::0;;;;;;;;;;;;;;;-1:-1:-1;11951:169:0;;;;;;;;::::2;-1:-1:-1::0;;1637:1:30;2563:22;;-1:-1:-1;;10727:1401:0:o;21823:143::-;21908:13;;21893:65;;;-1:-1:-1;;;21893:65:0;;;;;;;;21947:10;21893:65;;;;;;-1:-1:-1;;;;;21908:13:0;;;;21893:36;;:65;;;;;21908:13;;21893:65;;;;;;;;21908:13;;21893:65;;;;;;;;;;5262:1323;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;::::1;;5439:46:0::2;5456:28;5472:8;;5481:1;5472:11;;;;;;5439:46;5496;5513:28;5529:8;;5538:1;5529:11;;;;;;5496:46;5553;5570:28;5586:8;;5595:1;5586:11;;;;;;5553:46;5650:9;5618:28;5634:8;;5643:1;5634:11;;;;;;5618:28;:41;5610:56;;;::::0;;-1:-1:-1;;;5610:56:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;5610:56:0;;;;;;;;;;;;;::::2;;5839:13;::::0;5787:21:::2;::::0;-1:-1:-1;;;;;5839:13:0::2;5824:49;5892:10;5921:8:::0;;5787:21;5921:11;::::2;;;;;;;;;;5951:8;;5960:1;5951:11;;;;;;;;;;;;;5981:8;;5990:1;5981:11;;;;;;;;;;;;;6011:8;;6020:1;6011:11;;;;;;;;;;;;;6041:8;;6050:1;6041:11;;;;;;;;;;;;;6071:8;;6080:1;6071:11;;;;;;;;;;;;;5824:273;;;;;;;;;;;;;-1:-1:-1::0;;;;;5824:273:0::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;5824:273:0;6125:13:::2;::::0;6110:159:::2;::::0;;-1:-1:-1;;;6110:159:0;;::::2;::::0;::::2;::::0;;;6125:13;6110:159;;;;6125:13:::2;6110:159:::0;;;;;;;;;;;;;;5824:273;;-1:-1:-1;;;;;;6125:13:0;;::::2;::::0;6110:49:::2;::::0;:159;;;;;6125:13;6110:159;;;;;;6125:13;;6110:159;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;6329:14:0::2;::::0;;6320:70:::2;::::0;;-1:-1:-1;;;6320:70:0;;6379:10:::2;6320:70:::0;;::::2;::::0;;;;;-1:-1:-1;;;;;6329:14:0;;::::2;::::0;-1:-1:-1;6320:40:0::2;::::0;-1:-1:-1;6368:9:0::2;::::0;6320:70;;;;;6329:14:::2;::::0;6320:70;;;;;;;;6368:9;6329:14;6320:70;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;6438:13;-1:-1:-1::0;;;;;;;;;;;6466:10:0::2;6491:8;;6500:1;6491:11;;;;;;;6553:10;6538:26;::::0;;;:14:::2;6491:11;6538:26:::0;;;;;;;;:28;;944:1:5::2;6538:28:0::0;;::::2;::::0;;;6408:169;;-1:-1:-1;;;;;6408:169:0;;;::::2;::::0;;6491:11;;::::2;::::0;;;::::2;;6408:169:::0;;::::2;::::0;;;;;;;;;;;;-1:-1:-1;6408:169:0;;;;;;;;::::2;-1:-1:-1::0;;1637:1:30;2563:22;;-1:-1:-1;5262:1323:0:o;23929:159::-;24067:13;;-1:-1:-1;;;;;24067:13:0;23929:159;:::o;1994:240:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;2082:22:22;::::1;2074:73;;;;-1:-1:-1::0;;;2074:73:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:6;::::0;2162:38:::1;::::0;-1:-1:-1;;;;;2162:38:22;;::::1;::::0;2183:6:::1;::::0;-1:-1:-1;;;;;;;;;;;2162:38:22;2183:6:::1;::::0;2162:38:::1;2210:6;:17:::0;;-1:-1:-1;;;;;;2210:17:22::1;-1:-1:-1::0;;;;;2210:17:22;;;::::1;::::0;;;::::1;::::0;;1994:240::o;23638:154:0:-;23770:14;;-1:-1:-1;;;;;23770:14:0;23638:154;:::o;3128:155:23:-;3186:7;3218:1;3213;:6;;3205:49;;;;;-1:-1:-1;;;3205:49:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3271:5:23;;;3128:155;;;;;:::o;1799:110:0:-;1870:12;:10;:12::i;:::-;-1:-1:-1;;;;;1859:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1859:23:0;;1851:38;;;;;-1:-1:-1;;;1851:38:0;;;;;;;;;;;;-1:-1:-1;;;1851:38:0;;;;;;;;;;;;;;;1799:110::o;2047:117:29:-;1614:8;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;2115:5:::1;2105:15:::0;;-1:-1:-1;;2105:15:29::1;::::0;;2135:22:::1;2144:12;:10;:12::i;:::-;2135:22;::::0;;-1:-1:-1;;;;;2135:22:29;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2047:117::o:0;2682:175:23:-;2740:7;2771:5;;;2794:6;;;;2786:46;;;;;-1:-1:-1;;;2786:46:23;;;;;;;;;;;;-1:-1:-1;;;2786:46:23;;;;;;;;;;;;;;;2849:1;2682:175;-1:-1:-1;;;2682:175:23:o;598:104:27:-;685:10;598:104;:::o;1800:115:29:-;1349:8;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1340:38:29;;;;;;;;;;;;;;;1859:7:::1;:14:::0;;-1:-1:-1;;1859:14:29::1;1869:4;1859:14;::::0;;1888:20:::1;1895:12;:10;:12::i;1493:134:0:-:0;-1:-1:-1;;;;;1571:26:0;;1563:41;;;;;-1:-1:-1;;;1563:41:0;;;;;;;;;;;;-1:-1:-1;;;1563:41:0;;;;;;;;;;;;;;;1493:134;:::o;3530:215:23:-;3588:7;3611:6;3607:20;;-1:-1:-1;3626:1:23;3619:8;;3607:20;3649:5;;;3653:1;3649;:5;:1;3672:5;;;;;:10;3664:56;;;;-1:-1:-1;;;3664:56:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2231:199:0;2346:16;;;;;;;;;-1:-1:-1;;;;;2346:16:0;-1:-1:-1;;;;;2328:47:0;;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2328:49:0;2319:58;;;2297:125;;;;;-1:-1:-1;;;2297:125:0;;;;;;;;;;;;-1:-1:-1;;;2297:125:0;;;;;;;;;;;;;;2837:318;3017:16;;2999:104;;;-1:-1:-1;;;2999:104:0;;-1:-1:-1;;;;;2999:104:0;;;;;;;;;3017:16;;;;;2999:49;;:104;;;;;;;;;;;;;;3017:16;2999:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2999:104:0;2973:130;;;2951:196;;;;;-1:-1:-1;;;2951:196:0;;;;;;;;;;;;-1:-1:-1;;;2951:196:0;;;;;;;;;;;;;;;2837:318;;:::o", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./interfaces/IERC20WithPermit.sol\";\r\nimport \"./interfaces/IFundLimitsOracle.sol\";\r\nimport \"./interfaces/IBosonRouter.sol\";\r\nimport \"./interfaces/ICashier.sol\";\r\nimport \"./UsingHelpers.sol\";\r\n\r\n/**\r\n * @title Contract for interacting with Boson Protocol from the user's perspective.\r\n */\r\ncontract BosonRouter is\r\n IBosonRouter,\r\n UsingHelpers,\r\n Pausable,\r\n ReentrancyGuard,\r\n Ownable\r\n{\r\n using Address for address payable;\r\n using SafeMath for uint256;\r\n\r\n mapping(address => uint256) private correlationIds; // whenever a seller or a buyer interacts with the smart contract, a personal txID is emitted from an event.\r\n\r\n address private cashierAddress;\r\n address private voucherKernel;\r\n address private fundLimitsOracle;\r\n\r\n event LogOrderCreated(\r\n uint256 indexed _tokenIdSupply,\r\n address _seller,\r\n uint256 _quantity,\r\n uint8 _paymentType,\r\n uint256 _correlationId\r\n );\r\n\r\n /**\r\n * @notice Acts as a modifier, but it's cheaper. Checking if a non-zero address is provided, otherwise reverts.\r\n */\r\n function notZeroAddress(address tokenAddress) private pure {\r\n require(tokenAddress != address(0), \"0A\"); //zero address\r\n }\r\n\r\n /**\r\n * @notice Acts as a modifier, but it's cheaper. Replacement of onlyOwner modifier. If the caller is not the owner of the contract, reverts.\r\n */\r\n function onlyRouterOwner() internal view {\r\n require(owner() == _msgSender(), \"NO\"); //not owner\r\n }\r\n\r\n /**\r\n * @notice Acts as a modifier, but it's cheaper. Checks whether provided value corresponds to the limits in the FundLimitsOracle.\r\n * @param value the specified value is per voucher set level. E.g. deposit * qty should not be greater or equal to the limit in the FundLimitsOracle (ETH).\r\n */\r\n function notAboveETHLimit(uint256 value) internal view {\r\n require(\r\n value <= IFundLimitsOracle(fundLimitsOracle).getETHLimit(),\r\n \"AL\" // above limit\r\n );\r\n }\r\n\r\n /**\r\n * @notice Acts as a modifier, but it's cheaper. Checks whether provided value corresponds to the limits in the FundLimitsOracle.\r\n * @param _tokenAddress the token address which, we are getting the limits for.\r\n * @param value the specified value is per voucher set level. E.g. deposit * qty should not be greater or equal to the limit in the FundLimitsOracle (ETH).\r\n */\r\n function notAboveTokenLimit(address _tokenAddress, uint256 value)\r\n internal\r\n view\r\n {\r\n require(\r\n value <=\r\n IFundLimitsOracle(fundLimitsOracle).getTokenLimit(\r\n _tokenAddress\r\n ),\r\n \"AL\" //above limit\r\n );\r\n }\r\n\r\n constructor(\r\n address _voucherKernel,\r\n address _fundLimitsOracle,\r\n address _cashierAddress\r\n ) {\r\n notZeroAddress(_voucherKernel);\r\n notZeroAddress(_fundLimitsOracle);\r\n notZeroAddress(_cashierAddress);\r\n\r\n voucherKernel = _voucherKernel;\r\n fundLimitsOracle = _fundLimitsOracle;\r\n cashierAddress = _cashierAddress;\r\n }\r\n\r\n /**\r\n * @notice Pause the Cashier && the Voucher Kernel contracts in case of emergency.\r\n * All functions related to creating new batch, requestVoucher or withdraw will be paused, hence cannot be executed.\r\n * There is special function for withdrawing funds if contract is paused.\r\n */\r\n function pause() external override {\r\n onlyRouterOwner();\r\n _pause();\r\n IVoucherKernel(voucherKernel).pause();\r\n ICashier(cashierAddress).pause();\r\n }\r\n\r\n /**\r\n * @notice Unpause the Cashier && the Voucher Kernel contracts.\r\n * All functions related to creating new batch, requestVoucher or withdraw will be unpaused.\r\n */\r\n function unpause() external override {\r\n onlyRouterOwner();\r\n require(ICashier(cashierAddress).canUnpause(), \"UF\"); //unpaused forbidden\r\n\r\n _unpause();\r\n IVoucherKernel(voucherKernel).unpause();\r\n ICashier(cashierAddress).unpause();\r\n }\r\n\r\n /**\r\n * @notice Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\r\n @param metadata metadata which is required for creation of a voucher\r\n Metadata array is used as in some scenarios we need several more params, as we need to recover \r\n owner address in order to permit the contract to transfer funds on his behalf. \r\n Since the params get too many, we end up in situation that the stack is too deep.\r\n \r\n uint256 _validFrom = metadata[0];\r\n uint256 _validTo = metadata[1];\r\n uint256 _price = metadata[2];\r\n uint256 _depositSe = metadata[3];\r\n uint256 _depositBu = metadata[4];\r\n uint256 _quantity = metadata[5];\r\n */\r\n function requestCreateOrderETHETH(uint256[] calldata metadata)\r\n external\r\n payable\r\n override\r\n nonReentrant\r\n whenNotPaused\r\n {\r\n notAboveETHLimit(metadata[2].mul(metadata[5]));\r\n notAboveETHLimit(metadata[3].mul(metadata[5]));\r\n notAboveETHLimit(metadata[4].mul(metadata[5]));\r\n require(metadata[3].mul(metadata[5]) == msg.value, \"IF\"); //invalid funds\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n uint256 tokenIdSupply =\r\n IVoucherKernel(voucherKernel).createTokenSupplyID(\r\n msg.sender,\r\n metadata[0],\r\n metadata[1],\r\n metadata[2],\r\n metadata[3],\r\n metadata[4],\r\n metadata[5]\r\n );\r\n\r\n IVoucherKernel(voucherKernel).createPaymentMethod(\r\n tokenIdSupply,\r\n ETHETH,\r\n address(0),\r\n address(0)\r\n );\r\n\r\n //record funds in escrow ...\r\n ICashier(cashierAddress).addEscrowAmount{value: msg.value}(msg.sender);\r\n\r\n emit LogOrderCreated(\r\n tokenIdSupply,\r\n msg.sender,\r\n metadata[5],\r\n ETHETH,\r\n correlationIds[msg.sender]++\r\n );\r\n }\r\n\r\n function requestCreateOrderTKNTKNWithPermit(\r\n address _tokenPriceAddress,\r\n address _tokenDepositAddress,\r\n uint256 _tokensSent,\r\n uint256 deadline,\r\n uint8 v,\r\n bytes32 r,\r\n bytes32 s,\r\n uint256[] calldata metadata\r\n ) external override whenNotPaused {\r\n notZeroAddress(_tokenPriceAddress);\r\n notZeroAddress(_tokenDepositAddress);\r\n notAboveTokenLimit(_tokenPriceAddress, metadata[2].mul(metadata[5]));\r\n notAboveTokenLimit(_tokenDepositAddress, metadata[3].mul(metadata[5]));\r\n notAboveTokenLimit(_tokenDepositAddress, metadata[4].mul(metadata[5]));\r\n\r\n require(metadata[3].mul(metadata[5]) == _tokensSent, \"IF\"); //invalid funds\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n IERC20WithPermit(_tokenDepositAddress).permit(\r\n msg.sender,\r\n address(this),\r\n _tokensSent,\r\n deadline,\r\n v,\r\n r,\r\n s\r\n );\r\n\r\n uint256 tokenIdSupply =\r\n IVoucherKernel(voucherKernel).createTokenSupplyID(\r\n msg.sender,\r\n metadata[0],\r\n metadata[1],\r\n metadata[2],\r\n metadata[3],\r\n metadata[4],\r\n metadata[5]\r\n );\r\n\r\n IVoucherKernel(voucherKernel).createPaymentMethod(\r\n tokenIdSupply,\r\n TKNTKN,\r\n _tokenPriceAddress,\r\n _tokenDepositAddress\r\n );\r\n\r\n IERC20WithPermit(_tokenDepositAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n _tokensSent\r\n );\r\n\r\n //record funds in escrowTokens ...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n _tokenDepositAddress,\r\n msg.sender,\r\n _tokensSent\r\n );\r\n\r\n emit LogOrderCreated(\r\n tokenIdSupply,\r\n msg.sender,\r\n metadata[5],\r\n TKNTKN,\r\n correlationIds[msg.sender]++\r\n );\r\n }\r\n\r\n function requestCreateOrderETHTKNWithPermit(\r\n address _tokenDepositAddress,\r\n uint256 _tokensSent,\r\n uint256 deadline,\r\n uint8 v,\r\n bytes32 r,\r\n bytes32 s,\r\n uint256[] calldata metadata\r\n ) external override whenNotPaused {\r\n notZeroAddress(_tokenDepositAddress);\r\n notAboveETHLimit(metadata[2].mul(metadata[5]));\r\n notAboveTokenLimit(_tokenDepositAddress, metadata[3].mul(metadata[5]));\r\n notAboveTokenLimit(_tokenDepositAddress, metadata[4].mul(metadata[5]));\r\n\r\n require(metadata[3].mul(metadata[5]) == _tokensSent, \"IF\"); //invalid funds\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n IERC20WithPermit(_tokenDepositAddress).permit(\r\n msg.sender,\r\n address(this),\r\n _tokensSent,\r\n deadline,\r\n v,\r\n r,\r\n s\r\n );\r\n\r\n uint256 tokenIdSupply =\r\n IVoucherKernel(voucherKernel).createTokenSupplyID(\r\n msg.sender,\r\n metadata[0],\r\n metadata[1],\r\n metadata[2],\r\n metadata[3],\r\n metadata[4],\r\n metadata[5]\r\n );\r\n\r\n IVoucherKernel(voucherKernel).createPaymentMethod(\r\n tokenIdSupply,\r\n ETHTKN,\r\n address(0),\r\n _tokenDepositAddress\r\n );\r\n\r\n IERC20WithPermit(_tokenDepositAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n _tokensSent\r\n );\r\n\r\n //record funds in escrowTokens ...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n _tokenDepositAddress,\r\n msg.sender,\r\n _tokensSent\r\n );\r\n\r\n emit LogOrderCreated(\r\n tokenIdSupply,\r\n msg.sender,\r\n metadata[5],\r\n ETHTKN,\r\n correlationIds[msg.sender]++\r\n );\r\n }\r\n\r\n function requestCreateOrderTKNETH(\r\n address _tokenPriceAddress,\r\n uint256[] calldata metadata\r\n ) external payable override nonReentrant whenNotPaused {\r\n notZeroAddress(_tokenPriceAddress);\r\n notAboveTokenLimit(_tokenPriceAddress, metadata[2].mul(metadata[5]));\r\n notAboveETHLimit(metadata[3].mul(metadata[5]));\r\n notAboveETHLimit(metadata[4].mul(metadata[5]));\r\n\r\n require(metadata[3].mul(metadata[5]) == msg.value, \"IF\"); //invalid funds\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n uint256 tokenIdSupply =\r\n IVoucherKernel(voucherKernel).createTokenSupplyID(\r\n msg.sender,\r\n metadata[0],\r\n metadata[1],\r\n metadata[2],\r\n metadata[3],\r\n metadata[4],\r\n metadata[5]\r\n );\r\n IVoucherKernel(voucherKernel).createPaymentMethod(\r\n tokenIdSupply,\r\n TKNETH,\r\n _tokenPriceAddress,\r\n address(0)\r\n );\r\n\r\n //record funds in escrow ...\r\n ICashier(cashierAddress).addEscrowAmount{value: msg.value}(msg.sender);\r\n\r\n emit LogOrderCreated(\r\n tokenIdSupply,\r\n msg.sender,\r\n metadata[5],\r\n TKNETH,\r\n correlationIds[msg.sender]++\r\n );\r\n }\r\n\r\n /**\r\n * @notice Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\r\n * @param _tokenIdSupply ID of the supply token\r\n * @param _issuer Address of the issuer of the supply token\r\n */\r\n function requestVoucherETHETH(uint256 _tokenIdSupply, address _issuer)\r\n external\r\n payable\r\n override\r\n nonReentrant\r\n whenNotPaused\r\n {\r\n uint256 weiReceived = msg.value;\r\n\r\n //checks\r\n (uint256 price, , uint256 depositBu) =\r\n IVoucherKernel(voucherKernel).getOrderCosts(_tokenIdSupply);\r\n require(price.add(depositBu) == weiReceived, \"IF\"); //invalid funds\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n IVoucherKernel(voucherKernel).fillOrder(\r\n _tokenIdSupply,\r\n _issuer,\r\n msg.sender,\r\n ETHETH,\r\n correlationIds[msg.sender]++\r\n );\r\n\r\n //record funds in escrow ...\r\n ICashier(cashierAddress).addEscrowAmount{value: msg.value}(msg.sender);\r\n }\r\n\r\n function requestVoucherTKNTKNWithPermit(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n uint256 _tokensSent,\r\n uint256 deadline,\r\n uint8 vPrice,\r\n bytes32 rPrice,\r\n bytes32 sPrice, // tokenPrice\r\n uint8 vDeposit,\r\n bytes32 rDeposit,\r\n bytes32 sDeposit // tokenDeposits\r\n ) external override nonReentrant whenNotPaused {\r\n (uint256 price, uint256 depositBu) =\r\n IVoucherKernel(voucherKernel).getBuyerOrderCosts(_tokenIdSupply);\r\n require(_tokensSent.sub(depositBu) == price, \"IF\"); //invalid funds\r\n\r\n address tokenPriceAddress =\r\n IVoucherKernel(voucherKernel).getVoucherPriceToken(_tokenIdSupply);\r\n address tokenDepositAddress =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n _tokenIdSupply\r\n );\r\n\r\n IERC20WithPermit(tokenPriceAddress).permit(\r\n msg.sender,\r\n address(this),\r\n price,\r\n deadline,\r\n vPrice,\r\n rPrice,\r\n sPrice\r\n );\r\n IERC20WithPermit(tokenDepositAddress).permit(\r\n msg.sender,\r\n address(this),\r\n depositBu,\r\n deadline,\r\n vDeposit,\r\n rDeposit,\r\n sDeposit\r\n );\r\n\r\n IVoucherKernel(voucherKernel).fillOrder(\r\n _tokenIdSupply,\r\n _issuer,\r\n msg.sender,\r\n TKNTKN,\r\n correlationIds[msg.sender]++\r\n );\r\n\r\n IERC20WithPermit(tokenPriceAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n price\r\n );\r\n IERC20WithPermit(tokenDepositAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n depositBu\r\n );\r\n\r\n //record funds in escrowTokens for the Price token...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n tokenPriceAddress,\r\n msg.sender,\r\n price\r\n );\r\n\r\n //record funds in escrowTokens for the Deposit token...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n tokenDepositAddress,\r\n msg.sender,\r\n depositBu\r\n );\r\n }\r\n\r\n function requestVoucherTKNTKNSameWithPermit(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n uint256 _tokensSent,\r\n uint256 deadline,\r\n uint8 v,\r\n bytes32 r,\r\n bytes32 s\r\n ) external override nonReentrant whenNotPaused {\r\n (uint256 price, uint256 depositBu) =\r\n IVoucherKernel(voucherKernel).getBuyerOrderCosts(_tokenIdSupply);\r\n require(_tokensSent.sub(depositBu) == price, \"IF\"); //invalid funds\r\n\r\n address tokenPriceAddress =\r\n IVoucherKernel(voucherKernel).getVoucherPriceToken(_tokenIdSupply);\r\n address tokenDepositAddress =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n _tokenIdSupply\r\n );\r\n\r\n require(tokenPriceAddress == tokenDepositAddress, \"IC\"); //invalid caller\r\n\r\n // If tokenPriceAddress && tokenPriceAddress are the same\r\n // practically it's not of importance to each we are sending the funds\r\n IERC20WithPermit(tokenPriceAddress).permit(\r\n msg.sender,\r\n address(this),\r\n _tokensSent,\r\n deadline,\r\n v,\r\n r,\r\n s\r\n );\r\n\r\n IVoucherKernel(voucherKernel).fillOrder(\r\n _tokenIdSupply,\r\n _issuer,\r\n msg.sender,\r\n TKNTKN,\r\n correlationIds[msg.sender]++\r\n );\r\n\r\n IERC20WithPermit(tokenPriceAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n _tokensSent\r\n );\r\n\r\n //record funds in escrowTokens ...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n tokenPriceAddress,\r\n msg.sender,\r\n _tokensSent\r\n );\r\n }\r\n\r\n function requestVoucherETHTKNWithPermit(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n uint256 _tokensDeposit,\r\n uint256 deadline,\r\n uint8 v,\r\n bytes32 r,\r\n bytes32 s\r\n ) external payable override nonReentrant whenNotPaused {\r\n (uint256 price, uint256 depositBu) =\r\n IVoucherKernel(voucherKernel).getBuyerOrderCosts(_tokenIdSupply);\r\n require(price == msg.value, \"IP\"); //invalid price\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n require(depositBu == _tokensDeposit, \"ID\"); // invalid deposit\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n address tokenDepositAddress =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n _tokenIdSupply\r\n );\r\n IERC20WithPermit(tokenDepositAddress).permit(\r\n msg.sender,\r\n address(this),\r\n _tokensDeposit,\r\n deadline,\r\n v,\r\n r,\r\n s\r\n );\r\n\r\n IVoucherKernel(voucherKernel).fillOrder(\r\n _tokenIdSupply,\r\n _issuer,\r\n msg.sender,\r\n ETHTKN,\r\n correlationIds[msg.sender]++\r\n );\r\n\r\n IERC20WithPermit(tokenDepositAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n _tokensDeposit\r\n );\r\n\r\n //record funds in escrowTokens ...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n tokenDepositAddress,\r\n msg.sender,\r\n _tokensDeposit\r\n );\r\n\r\n //record funds in escrow ...\r\n ICashier(cashierAddress).addEscrowAmount{value: msg.value}(\r\n msg.sender\r\n );\r\n\r\n }\r\n\r\n function requestVoucherTKNETHWithPermit(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n uint256 _tokensPrice,\r\n uint256 deadline,\r\n uint8 v,\r\n bytes32 r,\r\n bytes32 s\r\n ) external payable override nonReentrant whenNotPaused {\r\n (uint256 price, uint256 depositBu) =\r\n IVoucherKernel(voucherKernel).getBuyerOrderCosts(_tokenIdSupply);\r\n require(price == _tokensPrice, \"IP\"); //invalid price\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n require(depositBu == msg.value, \"ID\"); // invalid deposit\r\n //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\r\n\r\n address tokenPriceAddress =\r\n IVoucherKernel(voucherKernel).getVoucherPriceToken(_tokenIdSupply);\r\n IERC20WithPermit(tokenPriceAddress).permit(\r\n msg.sender,\r\n address(this),\r\n price,\r\n deadline,\r\n v,\r\n r,\r\n s\r\n );\r\n\r\n IVoucherKernel(voucherKernel).fillOrder(\r\n _tokenIdSupply,\r\n _issuer,\r\n msg.sender,\r\n TKNETH,\r\n correlationIds[msg.sender]++\r\n );\r\n\r\n IERC20WithPermit(tokenPriceAddress).transferFrom(\r\n msg.sender,\r\n address(cashierAddress),\r\n price\r\n );\r\n\r\n //record funds in escrowTokens ...\r\n ICashier(cashierAddress).addEscrowTokensAmount(\r\n tokenPriceAddress,\r\n msg.sender,\r\n price\r\n );\r\n\r\n //record funds in escrow ...\r\n ICashier(cashierAddress).addEscrowAmount{value:msg.value}(msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Seller burns the remaining supply in case it's no longer in exchange and withdrawal of the locked deposits for them are being sent back.\r\n * @param _tokenIdSupply an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for\r\n */\r\n function requestCancelOrFaultVoucherSet(uint256 _tokenIdSupply)\r\n external\r\n override\r\n nonReentrant\r\n whenNotPaused\r\n {\r\n uint256 _burnedSupplyQty =\r\n IVoucherKernel(voucherKernel).cancelOrFaultVoucherSet(\r\n _tokenIdSupply,\r\n msg.sender\r\n );\r\n ICashier(cashierAddress).withdrawDepositsSe(\r\n _tokenIdSupply,\r\n _burnedSupplyQty,\r\n msg.sender\r\n );\r\n\r\n correlationIds[msg.sender]++;\r\n }\r\n\r\n /**\r\n * @notice Redemption of the vouchers promise\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function redeem(uint256 _tokenIdVoucher) external override {\r\n IVoucherKernel(voucherKernel).redeem(_tokenIdVoucher, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Refunding a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function refund(uint256 _tokenIdVoucher) external override {\r\n IVoucherKernel(voucherKernel).refund(_tokenIdVoucher, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Issue a complain for a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function complain(uint256 _tokenIdVoucher) external override {\r\n IVoucherKernel(voucherKernel).complain(_tokenIdVoucher, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function cancelOrFault(uint256 _tokenIdVoucher) external override {\r\n IVoucherKernel(voucherKernel).cancelOrFault(\r\n _tokenIdVoucher,\r\n msg.sender\r\n );\r\n }\r\n\r\n /**\r\n * @notice Increment a seller or buyer's correlation Id\r\n * @param _party The address of the seller or buyer\r\n */\r\n function incrementCorrelationId(address _party) \r\n external\r\n override\r\n {\r\n correlationIds[_party]++;\r\n }\r\n\r\n /**\r\n * @notice Return a seller or buyer's correlation Id\r\n * @param _party The address of the seller or buyer\r\n * @return the specified party's correlation Id\r\n */\r\n function getCorrelationId(address _party) \r\n external\r\n override\r\n view\r\n returns (uint256)\r\n {\r\n return correlationIds[_party];\r\n }\r\n\r\n /**\r\n * @notice Get the address of Cashier contract\r\n * @return Address of Cashier address\r\n */\r\n function getCashierAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return cashierAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the address of Voucher Kernel contract\r\n * @return Address of Voucher Kernel contract\r\n */\r\n function getVoucherKernelAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return voucherKernel;\r\n }\r\n\r\n /**\r\n * @notice Get the address of Fund Limits Oracle contract\r\n * @return Address of Fund Limits Oracle contract\r\n */\r\n function getFundLimitOracleAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return fundLimitsOracle;\r\n }\r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/BosonRouter.sol", + "ast": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/BosonRouter.sol", + "exportedSymbols": { + "BosonRouter": [ + 1594 + ] + }, + "id": 1595, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [{ + "id": 1, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "47:22:0" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 13734, + "src": "73:59:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 12500, + "src": "134:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 12145, + "src": "187:52:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 13694, + "src": "241:52:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 13087, + "src": "295:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 9644, + "src": "348:41:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC20WithPermit.sol", + "file": "./interfaces/IERC20WithPermit.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 9125, + "src": "391:43:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IFundLimitsOracle.sol", + "file": "./interfaces/IFundLimitsOracle.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 9281, + "src": "436:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IBosonRouter.sol", + "file": "./interfaces/IBosonRouter.sol", + "id": 10, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 8661, + "src": "482:39:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol", + "file": "./interfaces/ICashier.sol", + "id": 11, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 8785, + "src": "523:35:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 12, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 6141, + "src": "560:28:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [{ + "baseName": { + "id": 14, + "name": "IBosonRouter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8660, + "src": "716:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBosonRouter_$8660", + "typeString": "contract IBosonRouter" + } + }, + "id": 15, + "nodeType": "InheritanceSpecifier", + "src": "716:12:0" + }, + { + "baseName": { + "id": 16, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "735:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 17, + "nodeType": "InheritanceSpecifier", + "src": "735:12:0" + }, + { + "baseName": { + "id": 18, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "754:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 19, + "nodeType": "InheritanceSpecifier", + "src": "754:8:0" + }, + { + "baseName": { + "id": 20, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13733, + "src": "769:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$13733", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 21, + "nodeType": "InheritanceSpecifier", + "src": "769:15:0" + }, + { + "baseName": { + "id": 22, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "791:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 23, + "nodeType": "InheritanceSpecifier", + "src": "791:7:0" + } + ], + "contractDependencies": [ + 6140, + 8660, + 12144, + 13109, + 13693, + 13733 + ], + "contractKind": "contract", + "documentation": { + "id": 13, + "nodeType": "StructuredDocumentation", + "src": "592:93:0", + "text": " @title Contract for interacting with Boson Protocol from the user's perspective." + }, + "fullyImplemented": true, + "id": 1594, + "linearizedBaseContracts": [ + 1594, + 12144, + 13733, + 13693, + 13109, + 6140, + 8660 + ], + "name": "BosonRouter", + "nodeType": "ContractDefinition", + "nodes": [{ + "id": 26, + "libraryName": { + "id": 24, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "813:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "807:34:0", + "typeName": { + "id": 25, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "825:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + }, + { + "id": 29, + "libraryName": { + "id": 27, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "853:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "847:27:0", + "typeName": { + "id": 28, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "866:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 33, + "mutability": "mutable", + "name": "correlationIds", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "882:50:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 32, + "keyType": { + "id": 30, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "890:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "882:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 31, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "901:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "1050:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 34, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1050:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "1087:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1087:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 39, + "mutability": "mutable", + "name": "fundLimitsOracle", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "1123:32:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 38, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1123:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 51, + "name": "LogOrderCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 41, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1196:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 40, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1196:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 43, + "indexed": false, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1237:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 42, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1237:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 45, + "indexed": false, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1263:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 44, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1263:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 47, + "indexed": false, + "mutability": "mutable", + "name": "_paymentType", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1291:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 46, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1291:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 49, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1320:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 48, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1320:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1185:164:0" + }, + "src": "1164:186:0" + }, + { + "body": { + "id": 67, + "nodeType": "Block", + "src": "1552:75:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 58, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "1571:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [{ + "hexValue": "30", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1595:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1587:7:0", + "typeDescriptions": {} + } + }, + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1587:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1571:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "3041", + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1599:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_852678f6380794dbd774de8ca6f2b142a620be7686cd37c8bcc42e97c45cc9d4", + "typeString": "literal_string \"0A\"" + }, + "value": "0A" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_852678f6380794dbd774de8ca6f2b142a620be7686cd37c8bcc42e97c45cc9d4", + "typeString": "literal_string \"0A\"" + } + ], + "id": 57, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "1563:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 66, + "nodeType": "ExpressionStatement", + "src": "1563:41:0" + }] + }, + "documentation": { + "id": 52, + "nodeType": "StructuredDocumentation", + "src": "1358:129:0", + "text": " @notice Acts as a modifier, but it's cheaper. Checking if a non-zero address is provided, otherwise reverts." + }, + "id": 68, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "notZeroAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 54, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "1517:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 53, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1517:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "1516:22:0" + }, + "returnParameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [], + "src": "1552:0:0" + }, + "scope": 1594, + "src": "1493:134:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 81, + "nodeType": "Block", + "src": "1840:69:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 73, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "1859:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1859:7:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 75, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13097, + "src": "1870:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 76, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1870:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1859:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1884:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1544e7eb480cc28803f7ff893bd999e62fb759c7d172fc27414594c5d9c925f2", + "typeString": "literal_string \"NO\"" + }, + "value": "NO" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1544e7eb480cc28803f7ff893bd999e62fb759c7d172fc27414594c5d9c925f2", + "typeString": "literal_string \"NO\"" + } + ], + "id": 72, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "1851:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1851:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 80, + "nodeType": "ExpressionStatement", + "src": "1851:38:0" + }] + }, + "documentation": { + "id": 69, + "nodeType": "StructuredDocumentation", + "src": "1635:158:0", + "text": " @notice Acts as a modifier, but it's cheaper. Replacement of onlyOwner modifier. If the caller is not the owner of the contract, reverts." + }, + "id": 82, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "onlyRouterOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 70, + "nodeType": "ParameterList", + "parameters": [], + "src": "1823:2:0" + }, + "returnParameters": { + "id": 71, + "nodeType": "ParameterList", + "parameters": [], + "src": "1840:0:0" + }, + "scope": 1594, + "src": "1799:110:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 99, + "nodeType": "Block", + "src": "2286:144:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 89, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "2319:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 91, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "2346:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 90, + "name": "IFundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9280, + "src": "2328:17:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IFundLimitsOracle_$9280_$", + "typeString": "type(contract IFundLimitsOracle)" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2328:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFundLimitsOracle_$9280", + "typeString": "contract IFundLimitsOracle" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getETHLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9279, + "src": "2328:47:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2328:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2319:58:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c", + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2392:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + }, + "value": "AL" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + } + ], + "id": 88, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "2297:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2297:125:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 98, + "nodeType": "ExpressionStatement", + "src": "2297:125:0" + }] + }, + "documentation": { + "id": 83, + "nodeType": "StructuredDocumentation", + "src": "1917:308:0", + "text": " @notice Acts as a modifier, but it's cheaper. Checks whether provided value corresponds to the limits in the FundLimitsOracle.\n @param value the specified value is per voucher set level. E.g. deposit * qty should not be greater or equal to the limit in the FundLimitsOracle (ETH)." + }, + "id": 100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "notAboveETHLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 100, + "src": "2257:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2257:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "2256:15:0" + }, + "returnParameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [], + "src": "2286:0:0" + }, + "scope": 1594, + "src": "2231:199:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 120, + "nodeType": "Block", + "src": "2940:215:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 109, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "2973:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "arguments": [{ + "id": 114, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 103, + "src": "3071:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "expression": { + "arguments": [{ + "id": 111, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3017:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 110, + "name": "IFundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9280, + "src": "2999:17:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IFundLimitsOracle_$9280_$", + "typeString": "type(contract IFundLimitsOracle)" + } + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2999:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFundLimitsOracle_$9280", + "typeString": "contract IFundLimitsOracle" + } + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9267, + "src": "2999:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2999:104:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2973:130:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3118:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + }, + "value": "AL" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + } + ], + "id": 108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "2951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2951:196:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 119, + "nodeType": "ExpressionStatement", + "src": "2951:196:0" + }] + }, + "documentation": { + "id": 101, + "nodeType": "StructuredDocumentation", + "src": "2438:393:0", + "text": " @notice Acts as a modifier, but it's cheaper. Checks whether provided value corresponds to the limits in the FundLimitsOracle.\n @param _tokenAddress the token address which, we are getting the limits for.\n @param value the specified value is per voucher set level. E.g. deposit * qty should not be greater or equal to the limit in the FundLimitsOracle (ETH)." + }, + "id": 121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "notAboveTokenLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 103, + "mutability": "mutable", + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 121, + "src": "2865:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 102, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2865:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 105, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 121, + "src": "2888:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2888:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2864:38:0" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "2940:0:0" + }, + "scope": 1594, + "src": "2837:318:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 154, + "nodeType": "Block", + "src": "3285:268:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 131, + "name": "_voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3311:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 130, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "3296:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3296:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 133, + "nodeType": "ExpressionStatement", + "src": "3296:30:0" + }, + { + "expression": { + "arguments": [{ + "id": 135, + "name": "_fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3352:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 134, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "3337:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3337:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 137, + "nodeType": "ExpressionStatement", + "src": "3337:33:0" + }, + { + "expression": { + "arguments": [{ + "id": 139, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "3396:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 138, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "3381:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3381:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "3381:31:0" + }, + { + "expression": { + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 142, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "3425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 143, + "name": "_voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3441:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3425:30:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 145, + "nodeType": "ExpressionStatement", + "src": "3425:30:0" + }, + { + "expression": { + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 146, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3466:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 147, + "name": "_fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3485:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3466:36:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "3466:36:0" + }, + { + "expression": { + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 150, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "3513:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 151, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "3530:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3513:32:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "3513:32:0" + } + ] + }, + "id": 155, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "_voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 155, + "src": "3185:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3185:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "mutability": "mutable", + "name": "_fundLimitsOracle", + "nodeType": "VariableDeclaration", + "scope": 155, + "src": "3218:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3218:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 127, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 155, + "src": "3254:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 126, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3254:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3174:110:0" + }, + "returnParameters": { + "id": 129, + "nodeType": "ParameterList", + "parameters": [], + "src": "3285:0:0" + }, + "scope": 1594, + "src": "3163:390:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8459 + ], + "body": { + "id": 178, + "nodeType": "Block", + "src": "3903:146:0", + "statements": [{ + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 160, + "name": "onlyRouterOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 82, + "src": "3914:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3914:17:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "3914:17:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 163, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "3942:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3942:8:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 165, + "nodeType": "ExpressionStatement", + "src": "3942:8:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 167, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "3976:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 166, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "3961:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3961:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pause", + "nodeType": "MemberAccess", + "referencedDeclaration": 9286, + "src": "3961:35:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3961:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 171, + "nodeType": "ExpressionStatement", + "src": "3961:37:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 173, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "4018:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 172, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4009:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pause", + "nodeType": "MemberAccess", + "referencedDeclaration": 8666, + "src": "4009:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 177, + "nodeType": "ExpressionStatement", + "src": "4009:32:0" + } + ] + }, + "documentation": { + "id": 156, + "nodeType": "StructuredDocumentation", + "src": "3561:301:0", + "text": " @notice Pause the Cashier && the Voucher Kernel contracts in case of emergency.\n All functions related to creating new batch, requestVoucher or withdraw will be paused, hence cannot be executed.\n There is special function for withdrawing funds if contract is paused." + }, + "functionSelector": "8456cb59", + "id": 179, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 158, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3894:8:0" + }, + "parameters": { + "id": 157, + "nodeType": "ParameterList", + "parameters": [], + "src": "3882:2:0" + }, + "returnParameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [], + "src": "3903:0:0" + }, + "scope": 1594, + "src": "3868:181:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8462 + ], + "body": { + "id": 211, + "nodeType": "Block", + "src": "4279:238:0", + "statements": [{ + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 184, + "name": "onlyRouterOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 82, + "src": "4290:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4290:17:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 186, + "nodeType": "ExpressionStatement", + "src": "4290:17:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 189, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "4335:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 188, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4326:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4326:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "canUnpause", + "nodeType": "MemberAccess", + "referencedDeclaration": 8675, + "src": "4326:35:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4326:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5546", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4365:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_655f0188be990c572391e43fb465b9260923020b853a700724fe3cc9a5892dcc", + "typeString": "literal_string \"UF\"" + }, + "value": "UF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_655f0188be990c572391e43fb465b9260923020b853a700724fe3cc9a5892dcc", + "typeString": "literal_string \"UF\"" + } + ], + "id": 187, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "4318:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 195, + "nodeType": "ExpressionStatement", + "src": "4318:52:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 196, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "4404:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4404:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 198, + "nodeType": "ExpressionStatement", + "src": "4404:10:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 200, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "4440:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 199, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "4425:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4425:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unpause", + "nodeType": "MemberAccess", + "referencedDeclaration": 9290, + "src": "4425:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4425:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 204, + "nodeType": "ExpressionStatement", + "src": "4425:39:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 206, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "4484:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 205, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4475:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unpause", + "nodeType": "MemberAccess", + "referencedDeclaration": 8670, + "src": "4475:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 210, + "nodeType": "ExpressionStatement", + "src": "4475:34:0" + } + ] + }, + "documentation": { + "id": 180, + "nodeType": "StructuredDocumentation", + "src": "4057:179:0", + "text": " @notice Unpause the Cashier && the Voucher Kernel contracts.\n All functions related to creating new batch, requestVoucher or withdraw will be unpaused." + }, + "functionSelector": "3f4ba83a", + "id": 212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 182, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4270:8:0" + }, + "parameters": { + "id": 181, + "nodeType": "ParameterList", + "parameters": [], + "src": "4258:2:0" + }, + "returnParameters": { + "id": 183, + "nodeType": "ParameterList", + "parameters": [], + "src": "4279:0:0" + }, + "scope": 1594, + "src": "4242:275:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8469 + ], + "body": { + "id": 342, + "nodeType": "Block", + "src": "5428:1157:0", + "statements": [{ + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 229, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5472:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 231, + "indexExpression": { + "hexValue": "35", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5481:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5472:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 225, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5456:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 227, + "indexExpression": { + "hexValue": "32", + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5465:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5456:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5456:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5456:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 224, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "5439:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5439:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 234, + "nodeType": "ExpressionStatement", + "src": "5439:46:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 240, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5529:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 242, + "indexExpression": { + "hexValue": "35", + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5538:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5529:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 236, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 238, + "indexExpression": { + "hexValue": "33", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5522:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5513:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5513:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5513:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 235, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "5496:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5496:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 245, + "nodeType": "ExpressionStatement", + "src": "5496:46:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 251, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5586:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 253, + "indexExpression": { + "hexValue": "35", + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5595:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5586:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 247, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5570:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 249, + "indexExpression": { + "hexValue": "34", + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5579:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5570:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5570:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 246, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "5553:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5553:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "5553:46:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 262, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5634:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 264, + "indexExpression": { + "hexValue": "35", + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5643:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5634:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 258, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 260, + "indexExpression": { + "hexValue": "33", + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5627:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5618:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5618:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5618:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 266, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5650:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "5650:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5618:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5661:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 257, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "5610:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5610:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 271, + "nodeType": "ExpressionStatement", + "src": "5610:56:0" + }, + { + "assignments": [ + 273 + ], + "declarations": [{ + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 342, + "src": "5787:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5787:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 299, + "initialValue": { + "arguments": [{ + "expression": { + "id": 278, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5892:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5892:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 280, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5921:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 282, + "indexExpression": { + "hexValue": "30", + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5930:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5921:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 283, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5951:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 285, + "indexExpression": { + "hexValue": "31", + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5960:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5951:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 286, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5981:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 288, + "indexExpression": { + "hexValue": "32", + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5990:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 289, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6011:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 291, + "indexExpression": { + "hexValue": "33", + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6020:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6011:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 292, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6041:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 294, + "indexExpression": { + "hexValue": "34", + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6050:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6041:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 295, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 297, + "indexExpression": { + "hexValue": "35", + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6080:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6071:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 275, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "5839:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 274, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "5824:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5824:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "5824:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5824:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5787:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 304, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "6174:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 305, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "6202:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6231:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6223:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 306, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6223:7:0", + "typeDescriptions": {} + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6223:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6256:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6248:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 310, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6248:7:0", + "typeDescriptions": {} + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6248:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 301, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "6125:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 300, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "6110:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6110:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "6110:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6110:159:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "6110:159:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 323, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6379:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6379:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 317, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "6329:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 316, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "6320:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6320:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "6320:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 320, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6368:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "6368:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "6320:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6320:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 326, + "nodeType": "ExpressionStatement", + "src": "6320:70:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 328, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "6438:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 329, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6466:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6466:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 331, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6491:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 333, + "indexExpression": { + "hexValue": "35", + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6500:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6491:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 334, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "6517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6538:28:0", + "subExpression": { + "baseExpression": { + "id": 335, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "6538:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 338, + "indexExpression": { + "expression": { + "id": 336, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6553:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6553:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6538:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 327, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "6408:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6408:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 341, + "nodeType": "EmitStatement", + "src": "6403:174:0" + } + ] + }, + "documentation": { + "id": 213, + "nodeType": "StructuredDocumentation", + "src": "4525:731:0", + "text": " @notice Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\n@param metadata metadata which is required for creation of a voucher\nMetadata array is used as in some scenarios we need several more params, as we need to recover \nowner address in order to permit the contract to transfer funds on his behalf. \nSince the params get too many, we end up in situation that the stack is too deep.\nuint256 _validFrom = metadata[0];\nuint256 _validTo = metadata[1];\nuint256 _price = metadata[2];\nuint256 _depositSe = metadata[3];\nuint256 _depositBu = metadata[4];\nuint256 _quantity = metadata[5];" + }, + "functionSelector": "dea7f423", + "id": 343, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 220, + "modifierName": { + "id": 219, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "5387:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5387:12:0" + }, + { + "id": 222, + "modifierName": { + "id": 221, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "5409:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5409:13:0" + } + ], + "name": "requestCreateOrderETHETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 218, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5369:8:0" + }, + "parameters": { + "id": 217, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 216, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 343, + "src": "5296:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 214, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5296:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 215, + "nodeType": "ArrayTypeName", + "src": "5296:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }], + "src": "5295:29:0" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "5428:0:0" + }, + "scope": 1594, + "src": "5262:1323:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8489 + ], + "body": { + "id": 517, + "nodeType": "Block", + "src": "6905:1803:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 367, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "6931:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 366, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "6916:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6916:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 369, + "nodeType": "ExpressionStatement", + "src": "6916:34:0" + }, + { + "expression": { + "arguments": [{ + "id": 371, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "6976:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 370, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "6961:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6961:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 373, + "nodeType": "ExpressionStatement", + "src": "6961:36:0" + }, + { + "expression": { + "arguments": [{ + "id": 375, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "7027:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 380, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7063:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 382, + "indexExpression": { + "hexValue": "35", + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7072:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7063:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 376, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7047:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 378, + "indexExpression": { + "hexValue": "32", + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7056:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7047:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7047:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7047:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 374, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "7008:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7008:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 385, + "nodeType": "ExpressionStatement", + "src": "7008:68:0" + }, + { + "expression": { + "arguments": [{ + "id": 387, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7106:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 392, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7144:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 394, + "indexExpression": { + "hexValue": "35", + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7153:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7144:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 388, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7128:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 390, + "indexExpression": { + "hexValue": "33", + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7137:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7128:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7128:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7128:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 386, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "7087:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7087:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 397, + "nodeType": "ExpressionStatement", + "src": "7087:70:0" + }, + { + "expression": { + "arguments": [{ + "id": 399, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7187:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 404, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7225:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 406, + "indexExpression": { + "hexValue": "35", + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7234:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7225:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 400, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7209:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 402, + "indexExpression": { + "hexValue": "34", + "id": 401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7218:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7209:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7209:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7209:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 398, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "7168:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7168:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 409, + "nodeType": "ExpressionStatement", + "src": "7168:70:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 415, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7275:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 417, + "indexExpression": { + "hexValue": "35", + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7284:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7275:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 411, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7259:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 413, + "indexExpression": { + "hexValue": "33", + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7268:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7259:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7259:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7259:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 419, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "7291:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7259:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7304:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 410, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "7251:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7251:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 423, + "nodeType": "ExpressionStatement", + "src": "7251:58:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 428, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7490:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7490:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 432, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7523:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7515:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7515:7:0", + "typeDescriptions": {} + } + }, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7515:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 434, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "7543:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 435, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 351, + "src": "7569:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 436, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "7592:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 437, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "7608:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 438, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "7624:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 425, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7447:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 424, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "7430:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7430:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "7430:45:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7430:206:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "7430:206:0" + }, + { + "assignments": [ + 442 + ], + "declarations": [{ + "constant": false, + "id": 442, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 517, + "src": "7649:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7649:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 468, + "initialValue": { + "arguments": [{ + "expression": { + "id": 447, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7754:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7754:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 449, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7783:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 451, + "indexExpression": { + "hexValue": "30", + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7792:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7783:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 452, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7813:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 454, + "indexExpression": { + "hexValue": "31", + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7822:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7813:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 455, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7843:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 457, + "indexExpression": { + "hexValue": "32", + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7852:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7843:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 458, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7873:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 460, + "indexExpression": { + "hexValue": "33", + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7882:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7873:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 461, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7903:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 463, + "indexExpression": { + "hexValue": "34", + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7912:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7903:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 464, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7933:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 466, + "indexExpression": { + "hexValue": "35", + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7942:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7933:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 444, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "7701:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 443, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7686:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7686:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "7686:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7686:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7649:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 473, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "8036:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 474, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "8064:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 475, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "8085:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 476, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "8118:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [{ + "id": 470, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "7987:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 469, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7972:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7972:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "7972:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7972:177:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 478, + "nodeType": "ExpressionStatement", + "src": "7972:177:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 483, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8228:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8228:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 487, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "8261:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 485, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8253:7:0", + "typeDescriptions": {} + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8253:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 489, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8291:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 480, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "8179:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 479, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "8162:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8162:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "8162:51:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8162:151:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "8162:151:0" + }, + { + "expression": { + "arguments": [{ + "id": 496, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "8431:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 497, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8466:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8466:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 499, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8491:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 493, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "8379:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 492, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "8370:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8370:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "8370:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8370:143:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "8370:143:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 503, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "8561:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 504, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8589:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8589:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 506, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "8614:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 508, + "indexExpression": { + "hexValue": "35", + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8623:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8614:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 509, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "8640:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8661:28:0", + "subExpression": { + "baseExpression": { + "id": 510, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "8661:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 513, + "indexExpression": { + "expression": { + "id": 511, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8676:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8676:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 502, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "8531:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8531:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 516, + "nodeType": "EmitStatement", + "src": "8526:174:0" + } + ] + }, + "functionSelector": "c241649a", + "id": 518, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 364, + "modifierName": { + "id": 363, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "6891:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6891:13:0" + }], + "name": "requestCreateOrderTKNTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 362, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6882:8:0" + }, + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 345, + "mutability": "mutable", + "name": "_tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6647:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6647:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 347, + "mutability": "mutable", + "name": "_tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6684:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6684:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6723:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6723:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 351, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6753:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 350, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6753:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 353, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6780:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 352, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6780:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 355, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6798:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 354, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6798:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 357, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6818:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 356, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6818:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 360, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6838:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6838:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 359, + "nodeType": "ArrayTypeName", + "src": "6838:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "6636:236:0" + }, + "returnParameters": { + "id": 365, + "nodeType": "ParameterList", + "parameters": [], + "src": "6905:0:0" + }, + "scope": 1594, + "src": "6593:2115:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8507 + ], + "body": { + "id": 688, + "nodeType": "Block", + "src": "8991:1728:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 540, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9017:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 539, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "9002:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9002:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 542, + "nodeType": "ExpressionStatement", + "src": "9002:36:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 548, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9082:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 550, + "indexExpression": { + "hexValue": "35", + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9091:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9082:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 544, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 546, + "indexExpression": { + "hexValue": "32", + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9075:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9066:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9066:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9066:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 543, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "9049:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9049:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 553, + "nodeType": "ExpressionStatement", + "src": "9049:46:0" + }, + { + "expression": { + "arguments": [{ + "id": 555, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9125:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 560, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9163:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 562, + "indexExpression": { + "hexValue": "35", + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9172:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9163:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 556, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9147:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 558, + "indexExpression": { + "hexValue": "33", + "id": 557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9156:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9147:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9147:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9147:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 554, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "9106:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9106:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 565, + "nodeType": "ExpressionStatement", + "src": "9106:70:0" + }, + { + "expression": { + "arguments": [{ + "id": 567, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9206:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 572, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9244:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 574, + "indexExpression": { + "hexValue": "35", + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9253:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9244:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 568, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9228:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 570, + "indexExpression": { + "hexValue": "34", + "id": 569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9237:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9228:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9228:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9228:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 566, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "9187:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9187:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 577, + "nodeType": "ExpressionStatement", + "src": "9187:70:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 583, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9294:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 585, + "indexExpression": { + "hexValue": "35", + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9303:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9294:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 579, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9278:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 581, + "indexExpression": { + "hexValue": "33", + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9287:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9278:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9278:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9278:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 587, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "9310:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9278:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9323:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 578, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "9270:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9270:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "ExpressionStatement", + "src": "9270:58:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9509:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9509:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 600, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9542:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9534:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9534:7:0", + "typeDescriptions": {} + } + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9534:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 602, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "9562:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 603, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "9588:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 604, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "9611:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 605, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "9627:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 606, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "9643:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 593, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9466:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 592, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "9449:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9449:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "9449:45:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9449:206:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 608, + "nodeType": "ExpressionStatement", + "src": "9449:206:0" + }, + { + "assignments": [ + 610 + ], + "declarations": [{ + "constant": false, + "id": 610, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 688, + "src": "9668:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 609, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9668:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 636, + "initialValue": { + "arguments": [{ + "expression": { + "id": 615, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9773:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9773:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 617, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9802:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 619, + "indexExpression": { + "hexValue": "30", + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9811:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9802:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 620, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9832:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 622, + "indexExpression": { + "hexValue": "31", + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9841:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9832:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 623, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9862:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 625, + "indexExpression": { + "hexValue": "32", + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9862:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 626, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9892:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 628, + "indexExpression": { + "hexValue": "33", + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9901:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9892:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 629, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9922:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 631, + "indexExpression": { + "hexValue": "34", + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9931:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9922:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 632, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9952:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 634, + "indexExpression": { + "hexValue": "35", + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9961:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9952:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 612, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "9720:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 611, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "9705:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9705:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "9705:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9705:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9668:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 641, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "10055:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 642, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "10083:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10112:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10104:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 643, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10104:7:0", + "typeDescriptions": {} + } + }, + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10104:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 647, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "10129:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [{ + "id": 638, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "10006:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 637, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "9991:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9991:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "9991:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9991:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 649, + "nodeType": "ExpressionStatement", + "src": "9991:169:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 654, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10239:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10239:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 658, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "10272:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10264:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10264:7:0", + "typeDescriptions": {} + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10264:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 660, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "10302:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 651, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "10190:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 650, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "10173:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10173:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "10173:51:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10173:151:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 662, + "nodeType": "ExpressionStatement", + "src": "10173:151:0" + }, + { + "expression": { + "arguments": [{ + "id": 667, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "10442:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 668, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10477:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10477:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 670, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "10502:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 664, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "10390:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 663, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "10381:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10381:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "10381:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10381:143:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 672, + "nodeType": "ExpressionStatement", + "src": "10381:143:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 674, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "10572:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 675, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10600:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10600:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 677, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "10625:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 679, + "indexExpression": { + "hexValue": "35", + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10634:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10625:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 680, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "10651:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "10672:28:0", + "subExpression": { + "baseExpression": { + "id": 681, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "10672:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 684, + "indexExpression": { + "expression": { + "id": 682, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10687:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10672:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 673, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "10542:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10542:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 687, + "nodeType": "EmitStatement", + "src": "10537:174:0" + } + ] + }, + "functionSelector": "bc16ba47", + "id": 689, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 537, + "modifierName": { + "id": 536, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "8977:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8977:13:0" + }], + "name": "requestCreateOrderETHTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 535, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8968:8:0" + }, + "parameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 520, + "mutability": "mutable", + "name": "_tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8770:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8770:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 522, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8809:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 521, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8809:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 524, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8839:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8866:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 525, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "8866:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8884:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 527, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8884:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8904:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 529, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8904:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 533, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8924:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 531, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 532, + "nodeType": "ArrayTypeName", + "src": "8924:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "8759:199:0" + }, + "returnParameters": { + "id": 538, + "nodeType": "ParameterList", + "parameters": [], + "src": "8991:0:0" + }, + "scope": 1594, + "src": "8716:2003:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8515 + ], + "body": { + "id": 822, + "nodeType": "Block", + "src": "10896:1232:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 703, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 691, + "src": "10922:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 702, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "10907:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10907:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 705, + "nodeType": "ExpressionStatement", + "src": "10907:34:0" + }, + { + "expression": { + "arguments": [{ + "id": 707, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 691, + "src": "10971:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 712, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11007:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 714, + "indexExpression": { + "hexValue": "35", + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11016:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 708, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "10991:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 710, + "indexExpression": { + "hexValue": "32", + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11000:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10991:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "10991:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10991:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 706, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "10952:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10952:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "10952:68:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 723, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11064:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 725, + "indexExpression": { + "hexValue": "35", + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11073:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11064:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 719, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11048:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 721, + "indexExpression": { + "hexValue": "33", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11057:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11048:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "11048:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11048:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 718, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "11031:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11031:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 728, + "nodeType": "ExpressionStatement", + "src": "11031:46:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 734, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11121:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 736, + "indexExpression": { + "hexValue": "35", + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11130:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11121:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 730, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11105:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 732, + "indexExpression": { + "hexValue": "34", + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11114:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11105:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "11105:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11105:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 729, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "11088:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11088:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "11088:46:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 745, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11171:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 747, + "indexExpression": { + "hexValue": "35", + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11180:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11171:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 741, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11155:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 743, + "indexExpression": { + "hexValue": "33", + "id": 742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11164:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11155:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "11155:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11155:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 749, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11187:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "11187:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11155:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 740, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "11147:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11147:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 754, + "nodeType": "ExpressionStatement", + "src": "11147:56:0" + }, + { + "assignments": [ + 756 + ], + "declarations": [{ + "constant": false, + "id": 756, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 822, + "src": "11324:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 755, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 782, + "initialValue": { + "arguments": [{ + "expression": { + "id": 761, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11429:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11429:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 763, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11458:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 765, + "indexExpression": { + "hexValue": "30", + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11467:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11458:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 766, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11488:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 768, + "indexExpression": { + "hexValue": "31", + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11497:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11488:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 769, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11518:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 771, + "indexExpression": { + "hexValue": "32", + "id": 770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11527:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11518:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 772, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11548:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 774, + "indexExpression": { + "hexValue": "33", + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11557:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11548:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 775, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 777, + "indexExpression": { + "hexValue": "34", + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11587:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11578:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 778, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11608:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 780, + "indexExpression": { + "hexValue": "35", + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11617:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11608:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 758, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "11376:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 757, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "11361:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "11361:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11324:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 787, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "11709:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 788, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "11737:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 789, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 691, + "src": "11758:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11799:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11791:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11791:7:0", + "typeDescriptions": {} + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11791:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 784, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "11660:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 783, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "11645:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11645:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "11645:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11645:167:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 795, + "nodeType": "ExpressionStatement", + "src": "11645:167:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 803, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11922:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11922:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 797, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "11872:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 796, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "11863:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11863:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "11863:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 800, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11911:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "11911:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "11863:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11863:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 806, + "nodeType": "ExpressionStatement", + "src": "11863:70:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 808, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "11981:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 809, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12009:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12009:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 811, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "12034:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 813, + "indexExpression": { + "hexValue": "35", + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12043:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12034:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 814, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "12060:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "12081:28:0", + "subExpression": { + "baseExpression": { + "id": 815, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "12081:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 818, + "indexExpression": { + "expression": { + "id": 816, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12096:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12096:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12081:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 807, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "11951:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11951:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 821, + "nodeType": "EmitStatement", + "src": "11946:174:0" + } + ] + }, + "functionSelector": "d7e308bd", + "id": 823, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 698, + "modifierName": { + "id": 697, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "10869:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10869:12:0" + }, + { + "id": 700, + "modifierName": { + "id": 699, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "10882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10882:13:0" + } + ], + "name": "requestCreateOrderTKNETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 696, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10860:8:0" + }, + "parameters": { + "id": 695, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 691, + "mutability": "mutable", + "name": "_tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 823, + "src": "10771:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10771:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 694, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 823, + "src": "10808:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 693, + "nodeType": "ArrayTypeName", + "src": "10808:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "10760:82:0" + }, + "returnParameters": { + "id": 701, + "nodeType": "ParameterList", + "parameters": [], + "src": "10896:0:0" + }, + "scope": 1594, + "src": "10727:1401:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8523 + ], + "body": { + "id": 889, + "nodeType": "Block", + "src": "12568:685:0", + "statements": [{ + "assignments": [ + 837 + ], + "declarations": [{ + "constant": false, + "id": 837, + "mutability": "mutable", + "name": "weiReceived", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "12579:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 836, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12579:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 840, + "initialValue": { + "expression": { + "id": 838, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12601:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "12601:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12579:31:0" + }, + { + "assignments": [ + 842, + null, + 844 + ], + "declarations": [{ + "constant": false, + "id": 842, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "12642:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 841, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12642:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + null, + { + "constant": false, + "id": 844, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "12659:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12659:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 851, + "initialValue": { + "arguments": [{ + "id": 849, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "12737:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 846, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "12708:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 845, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "12693:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12693:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9508, + "src": "12693:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12693:59:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12641:111:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "id": 855, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "12781:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "id": 853, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 842, + "src": "12771:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "12771:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12771:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 857, + "name": "weiReceived", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 837, + "src": "12795:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12771:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 852, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "12763:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12763:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 861, + "nodeType": "ExpressionStatement", + "src": "12763:50:0" + }, + { + "expression": { + "arguments": [{ + "id": 866, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "12988:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 867, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "13017:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13039:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "13039:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 870, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "13064:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "13085:28:0", + "subExpression": { + "baseExpression": { + "id": 871, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "13085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 874, + "indexExpression": { + "expression": { + "id": 872, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13100:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "13100:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13085:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 863, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "12949:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 862, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "12934:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12934:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "12934:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12934:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 877, + "nodeType": "ExpressionStatement", + "src": "12934:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 885, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13234:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "13234:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 879, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "13184:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 878, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "13175:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13175:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "13175:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 882, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13223:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "13223:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "13175:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13175:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 888, + "nodeType": "ExpressionStatement", + "src": "13175:70:0" + } + ] + }, + "documentation": { + "id": 824, + "nodeType": "StructuredDocumentation", + "src": "12136:252:0", + "text": " @notice Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the issuer of the supply token" + }, + "functionSelector": "6ad0cfe1", + "id": 890, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 832, + "modifierName": { + "id": 831, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "12527:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12527:12:0" + }, + { + "id": 834, + "modifierName": { + "id": 833, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "12549:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12549:13:0" + } + ], + "name": "requestVoucherETHETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 830, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12509:8:0" + }, + "parameters": { + "id": 829, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 826, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 890, + "src": "12424:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 828, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 890, + "src": "12448:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12448:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12423:41:0" + }, + "returnParameters": { + "id": 835, + "nodeType": "ParameterList", + "parameters": [], + "src": "12568:0:0" + }, + "scope": 1594, + "src": "12394:859:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8546 + ], + "body": { + "id": 1053, + "nodeType": "Block", + "src": "13652:1889:0", + "statements": [{ + "assignments": [ + 919, + 921 + ], + "declarations": [{ + "constant": false, + "id": 919, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13664:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13664:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 921, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13679:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 920, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 928, + "initialValue": { + "arguments": [{ + "id": 926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "13762:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 923, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "13728:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 922, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13713:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13713:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "13713:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13713:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13663:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "id": 932, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "13812:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "id": 930, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 896, + "src": "13796:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "13796:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13796:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 934, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "13826:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13796:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13833:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 929, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "13788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13788:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "13788:50:0" + }, + { + "assignments": [ + 940 + ], + "declarations": [{ + "constant": false, + "id": 940, + "mutability": "mutable", + "name": "tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13867:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 939, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13867:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 947, + "initialValue": { + "arguments": [{ + "id": 945, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "13959:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 942, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "13923:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 941, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13908:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13908:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "13908:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13908:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13867:107:0" + }, + { + "assignments": [ + 949 + ], + "declarations": [{ + "constant": false, + "id": 949, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13985:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13985:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 956, + "initialValue": { + "arguments": [{ + "id": 954, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "14099:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 951, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "14043:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 950, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "14028:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14028:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "14028:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14028:100:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13985:143:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14198:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14198:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 965, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14231:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14223:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 963, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14223:7:0", + "typeDescriptions": {} + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14223:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 967, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "14251:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 968, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "14271:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 969, + "name": "vPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 900, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 970, + "name": "rPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 902, + "src": "14315:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 971, + "name": "sPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 904, + "src": "14336:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 958, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "14158:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 957, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14141:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14141:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "14141:42:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14141:212:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 973, + "nodeType": "ExpressionStatement", + "src": "14141:212:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 978, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14423:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14423:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 982, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14456:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14448:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14448:7:0", + "typeDescriptions": {} + } + }, + "id": 983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14448:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 984, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "14476:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 985, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "14500:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 986, + "name": "vDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "14523:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 987, + "name": "rDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 908, + "src": "14546:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 988, + "name": "sDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 910, + "src": "14569:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 975, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "14381:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 974, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14364:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "14364:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:224:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "14364:224:0" + }, + { + "expression": { + "arguments": [{ + "id": 995, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "14655:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 996, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 894, + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 997, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14706:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14706:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 999, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "14731:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14752:28:0", + "subExpression": { + "baseExpression": { + "id": 1000, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "14752:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1003, + "indexExpression": { + "expression": { + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14767:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14767:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14752:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 992, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "14616:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 991, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "14601:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14601:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "14601:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14601:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1006, + "nodeType": "ExpressionStatement", + "src": "14601:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1011, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14867:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14867:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1015, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "14900:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14892:7:0", + "typeDescriptions": {} + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14892:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1017, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "14930:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1008, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "14821:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1007, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14804:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14804:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "14804:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14804:142:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1019, + "nodeType": "ExpressionStatement", + "src": "14804:142:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1024, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15022:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15022:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1028, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "15055:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15047:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1026, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15047:7:0", + "typeDescriptions": {} + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15047:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1030, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "15085:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1021, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "14974:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1020, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14957:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14957:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "14957:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14957:148:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1032, + "nodeType": "ExpressionStatement", + "src": "14957:148:0" + }, + { + "expression": { + "arguments": [{ + "id": 1037, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "15242:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1038, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15274:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1040, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "15299:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1034, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "15190:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1033, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "15181:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15181:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "15181:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15181:134:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1042, + "nodeType": "ExpressionStatement", + "src": "15181:134:0" + }, + { + "expression": { + "arguments": [{ + "id": 1047, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "15454:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15488:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15488:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1050, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "15513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1044, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "15402:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1043, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "15393:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15393:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "15393:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15393:140:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1052, + "nodeType": "ExpressionStatement", + "src": "15393:140:0" + } + ] + }, + "functionSelector": "b2c076c8", + "id": 1054, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 914, + "modifierName": { + "id": 913, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "13625:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13625:12:0" + }, + { + "id": 916, + "modifierName": { + "id": 915, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "13638:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13638:13:0" + } + ], + "name": "requestVoucherTKNTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 912, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13616:8:0" + }, + "parameters": { + "id": 911, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 892, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13311:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 891, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13311:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 894, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13344:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 893, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13344:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 896, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13370:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 898, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13400:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 897, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13400:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 900, + "mutability": "mutable", + "name": "vPrice", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13427:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 899, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13427:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 902, + "mutability": "mutable", + "name": "rPrice", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13450:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 901, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 904, + "mutability": "mutable", + "name": "sPrice", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13475:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 903, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13475:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 906, + "mutability": "mutable", + "name": "vDeposit", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13514:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 905, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13514:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 908, + "mutability": "mutable", + "name": "rDeposit", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13539:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 907, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 910, + "mutability": "mutable", + "name": "sDeposit", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13566:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 909, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13566:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13300:306:0" + }, + "returnParameters": { + "id": 917, + "nodeType": "ParameterList", + "parameters": [], + "src": "13652:0:0" + }, + "scope": 1594, + "src": "13261:2280:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8563 + ], + "body": { + "id": 1178, + "nodeType": "Block", + "src": "15819:1493:0", + "statements": [{ + "assignments": [ + 1077, + 1079 + ], + "declarations": [{ + "constant": false, + "id": 1077, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "15831:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15831:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1079, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "15846:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15846:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1086, + "initialValue": { + "arguments": [{ + "id": 1084, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "15929:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1081, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "15895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1080, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "15880:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15880:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "15880:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15880:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15830:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "id": 1090, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1079, + "src": "15979:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "id": 1088, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "15963:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "15963:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15963:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1092, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "15993:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15963:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16000:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 1087, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "15955:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15955:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1096, + "nodeType": "ExpressionStatement", + "src": "15955:50:0" + }, + { + "assignments": [ + 1098 + ], + "declarations": [{ + "constant": false, + "id": 1098, + "mutability": "mutable", + "name": "tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "16034:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1097, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16034:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1105, + "initialValue": { + "arguments": [{ + "id": 1103, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "16126:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1100, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "16090:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1099, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16075:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16075:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "16075:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16075:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16034:107:0" + }, + { + "assignments": [ + 1107 + ], + "declarations": [{ + "constant": false, + "id": 1107, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "16152:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16152:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1114, + "initialValue": { + "arguments": [{ + "id": 1112, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "16266:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1109, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "16210:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1108, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16195:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16195:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "16195:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16195:100:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16152:143:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1116, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "16316:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1117, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "16337:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16316:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4943", + "id": 1119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16358:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_13794d5f98c0d01d86d683aa2c769457896afe87cf2603c8b50ce547494877e5", + "typeString": "literal_string \"IC\"" + }, + "value": "IC" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_13794d5f98c0d01d86d683aa2c769457896afe87cf2603c8b50ce547494877e5", + "typeString": "literal_string \"IC\"" + } + ], + "id": 1115, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "16308:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16308:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1121, + "nodeType": "ExpressionStatement", + "src": "16308:55:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1126, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16597:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1130, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "16630:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16622:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16622:7:0", + "typeDescriptions": {} + } + }, + "id": 1131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16622:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1132, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "16650:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1133, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "16676:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1134, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1064, + "src": "16699:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1135, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "16715:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1136, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "16731:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 1123, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "16557:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1122, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "16540:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16540:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "16540:42:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16540:203:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1138, + "nodeType": "ExpressionStatement", + "src": "16540:203:0" + }, + { + "expression": { + "arguments": [{ + "id": 1143, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "16810:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1144, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "16839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1145, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16861:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16861:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1147, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "16886:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "16907:28:0", + "subExpression": { + "baseExpression": { + "id": 1148, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "16907:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1151, + "indexExpression": { + "expression": { + "id": 1149, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16922:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16922:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16907:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1140, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "16771:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1139, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16756:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16756:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "16756:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16756:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1154, + "nodeType": "ExpressionStatement", + "src": "16756:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1159, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17022:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "17022:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1163, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "17055:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17047:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17047:7:0", + "typeDescriptions": {} + } + }, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17047:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1165, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "17085:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1156, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "16976:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1155, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "16959:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16959:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "16959:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16959:148:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1167, + "nodeType": "ExpressionStatement", + "src": "16959:148:0" + }, + { + "expression": { + "arguments": [{ + "id": 1172, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "17225:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1173, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17257:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "17257:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1175, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "17282:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1169, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "17173:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1168, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "17164:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17164:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "17164:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17164:140:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1177, + "nodeType": "ExpressionStatement", + "src": "17164:140:0" + } + ] + }, + "functionSelector": "1a245b8e", + "id": 1179, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1072, + "modifierName": { + "id": 1071, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "15792:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15792:12:0" + }, + { + "id": 1074, + "modifierName": { + "id": 1073, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "15805:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15805:13:0" + } + ], + "name": "requestVoucherTKNTKNSameWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1070, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15783:8:0" + }, + "parameters": { + "id": 1069, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1056, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15603:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15603:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1058, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15636:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1057, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15636:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1060, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15662:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1059, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15662:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1062, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15692:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1064, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15719:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1063, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "15719:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1066, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15737:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1065, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15737:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1068, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15757:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1067, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15757:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "15592:181:0" + }, + "returnParameters": { + "id": 1075, + "nodeType": "ParameterList", + "parameters": [], + "src": "15819:0:0" + }, + "scope": 1594, + "src": "15549:1763:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8580 + ], + "body": { + "id": 1303, + "nodeType": "Block", + "src": "17597:1542:0", + "statements": [{ + "assignments": [ + 1202, + 1204 + ], + "declarations": [{ + "constant": false, + "id": 1202, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "17609:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1201, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1204, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "17624:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17624:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1211, + "initialValue": { + "arguments": [{ + "id": 1209, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "17707:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1206, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "17673:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1205, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "17658:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17658:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "17658:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17658:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17608:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1213, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "17741:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1214, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17750:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "17750:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17741:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4950", + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + }, + "value": "IP" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + } + ], + "id": 1212, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "17733:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17733:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1219, + "nodeType": "ExpressionStatement", + "src": "17733:33:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1221, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "17893:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1222, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "17906:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17893:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4944", + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17922:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + }, + "value": "ID" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + } + ], + "id": 1220, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "17885:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17885:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1226, + "nodeType": "ExpressionStatement", + "src": "17885:42:0" + }, + { + "assignments": [ + 1228 + ], + "declarations": [{ + "constant": false, + "id": 1228, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "18051:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18051:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1235, + "initialValue": { + "arguments": [{ + "id": 1233, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "18165:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1230, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "18109:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1229, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "18094:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18094:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "18094:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18094:100:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18051:143:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1240, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18264:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18264:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1244, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "18297:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 1243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1242, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18289:7:0", + "typeDescriptions": {} + } + }, + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18289:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1246, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "18317:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1247, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1187, + "src": "18346:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1248, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1189, + "src": "18369:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1249, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "18385:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1250, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1193, + "src": "18401:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 1237, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "18222:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1236, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "18205:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18205:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "18205:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18205:208:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1252, + "nodeType": "ExpressionStatement", + "src": "18205:208:0" + }, + { + "expression": { + "arguments": [{ + "id": 1257, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "18480:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1258, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1183, + "src": "18509:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1259, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18531:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1261, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "18556:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18577:28:0", + "subExpression": { + "baseExpression": { + "id": 1262, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "18577:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1265, + "indexExpression": { + "expression": { + "id": 1263, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18592:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18592:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18577:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1254, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "18441:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1253, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "18426:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18426:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "18426:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18426:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1268, + "nodeType": "ExpressionStatement", + "src": "18426:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1273, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18694:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18694:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1277, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "18727:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18719:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1275, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18719:7:0", + "typeDescriptions": {} + } + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18719:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1279, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "18757:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1270, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "18646:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1269, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "18629:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18629:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "18629:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18629:153:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1281, + "nodeType": "ExpressionStatement", + "src": "18629:153:0" + }, + { + "expression": { + "arguments": [{ + "id": 1286, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "18900:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1287, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18934:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18934:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1289, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "18959:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1283, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "18848:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1282, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "18839:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18839:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "18839:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18839:145:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1291, + "nodeType": "ExpressionStatement", + "src": "18839:145:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1299, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19108:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "19108:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 1293, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "19044:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1292, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "19035:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19035:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "19035:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 1296, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19083:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "19083:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "19035:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19035:94:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1302, + "nodeType": "ExpressionStatement", + "src": "19035:94:0" + } + ] + }, + "functionSelector": "92fcbdc1", + "id": 1304, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1197, + "modifierName": { + "id": 1196, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "17570:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17570:12:0" + }, + { + "id": 1199, + "modifierName": { + "id": 1198, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "17583:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17583:13:0" + } + ], + "name": "requestVoucherETHTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1195, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17561:8:0" + }, + "parameters": { + "id": 1194, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1181, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17370:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1183, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17403:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17403:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1185, + "mutability": "mutable", + "name": "_tokensDeposit", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17429:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1184, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1187, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17462:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17462:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1189, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17489:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1188, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "17489:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1191, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17507:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1190, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17507:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1193, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17527:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1192, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17527:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "17359:184:0" + }, + "returnParameters": { + "id": 1200, + "nodeType": "ParameterList", + "parameters": [], + "src": "17597:0:0" + }, + "scope": 1594, + "src": "17320:1819:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8597 + ], + "body": { + "id": 1428, + "nodeType": "Block", + "src": "19422:1444:0", + "statements": [{ + "assignments": [ + 1327, + 1329 + ], + "declarations": [{ + "constant": false, + "id": 1327, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1428, + "src": "19434:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1326, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1428, + "src": "19449:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19449:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1336, + "initialValue": { + "arguments": [{ + "id": 1334, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "19532:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1331, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "19498:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1330, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "19483:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19483:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "19483:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19483:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19433:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1338, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "19566:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1339, + "name": "_tokensPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "19575:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19566:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4950", + "id": 1341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + }, + "value": "IP" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + } + ], + "id": 1337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "19558:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19558:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "19558:36:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1345, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "19721:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1346, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "19734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19721:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4944", + "id": 1349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19745:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + }, + "value": "ID" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + } + ], + "id": 1344, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "19713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19713:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1351, + "nodeType": "ExpressionStatement", + "src": "19713:37:0" + }, + { + "assignments": [ + 1353 + ], + "declarations": [{ + "constant": false, + "id": 1353, + "mutability": "mutable", + "name": "tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 1428, + "src": "19874:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1352, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19874:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1360, + "initialValue": { + "arguments": [{ + "id": 1358, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "19966:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1355, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "19930:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1354, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "19915:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19915:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "19915:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19915:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19874:107:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1365, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20049:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20049:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1369, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20082:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1367, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20074:7:0", + "typeDescriptions": {} + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20074:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1371, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "20102:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1372, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1312, + "src": "20122:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1373, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1314, + "src": "20145:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1374, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1316, + "src": "20161:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1375, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1318, + "src": "20177:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 1362, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "20009:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1361, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "19992:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19992:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "19992:42:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19992:197:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1377, + "nodeType": "ExpressionStatement", + "src": "19992:197:0" + }, + { + "expression": { + "arguments": [{ + "id": 1382, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "20256:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1383, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "20285:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1384, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20307:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20307:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1386, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "20332:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20353:28:0", + "subExpression": { + "baseExpression": { + "id": 1387, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "20353:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1390, + "indexExpression": { + "expression": { + "id": 1388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20368:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20368:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20353:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1379, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "20217:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1378, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "20202:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20202:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "20202:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20202:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1393, + "nodeType": "ExpressionStatement", + "src": "20202:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1398, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20468:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20468:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1402, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "20501:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20493:7:0", + "typeDescriptions": {} + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20493:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1404, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "20531:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1395, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "20422:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1394, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "20405:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20405:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "20405:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20405:142:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1406, + "nodeType": "ExpressionStatement", + "src": "20405:142:0" + }, + { + "expression": { + "arguments": [{ + "id": 1411, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "20665:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1412, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20697:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20697:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1414, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "20722:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1408, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "20613:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1407, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "20604:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20604:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "20604:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20604:134:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1416, + "nodeType": "ExpressionStatement", + "src": "20604:134:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1424, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20847:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 1418, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "20798:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1417, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "20789:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20789:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "20789:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 1421, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20836:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "20836:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "20789:57:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20789:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1427, + "nodeType": "ExpressionStatement", + "src": "20789:69:0" + } + ] + }, + "functionSelector": "ad7f0493", + "id": 1429, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1322, + "modifierName": { + "id": 1321, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "19395:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19395:12:0" + }, + { + "id": 1324, + "modifierName": { + "id": 1323, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19408:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19408:13:0" + } + ], + "name": "requestVoucherTKNETHWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1320, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19386:8:0" + }, + "parameters": { + "id": 1319, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19197:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1305, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19197:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1308, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19230:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1307, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19230:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1310, + "mutability": "mutable", + "name": "_tokensPrice", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19256:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19256:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1312, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19287:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1311, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19287:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1314, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19314:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1313, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "19314:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1316, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19332:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1315, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19332:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1318, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19352:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1317, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "19186:182:0" + }, + "returnParameters": { + "id": 1325, + "nodeType": "ParameterList", + "parameters": [], + "src": "19422:0:0" + }, + "scope": 1594, + "src": "19147:1719:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8603 + ], + "body": { + "id": 1467, + "nodeType": "Block", + "src": "21315:380:0", + "statements": [{ + "assignments": [ + 1441 + ], + "declarations": [{ + "constant": false, + "id": 1441, + "mutability": "mutable", + "name": "_burnedSupplyQty", + "nodeType": "VariableDeclaration", + "scope": 1467, + "src": "21326:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1440, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21326:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 1450, + "initialValue": { + "arguments": [{ + "id": 1446, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1432, + "src": "21438:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1447, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21471:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21471:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1443, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "21381:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1442, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "21366:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21366:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelOrFaultVoucherSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9386, + "src": "21366:53:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21366:130:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21326:170:0" + }, + { + "expression": { + "arguments": [{ + "id": 1455, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1432, + "src": "21565:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1456, + "name": "_burnedSupplyQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "21594:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1457, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21625:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21625:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1452, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "21516:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1451, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "21507:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21507:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawDepositsSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 8691, + "src": "21507:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (uint256,uint256,address payable) external" + } + }, + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21507:139:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1460, + "nodeType": "ExpressionStatement", + "src": "21507:139:0" + }, + { + "expression": { + "id": 1465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21659:28:0", + "subExpression": { + "baseExpression": { + "id": 1461, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "21659:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1464, + "indexExpression": { + "expression": { + "id": 1462, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21674:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21674:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "21659:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1466, + "nodeType": "ExpressionStatement", + "src": "21659:28:0" + } + ] + }, + "documentation": { + "id": 1430, + "nodeType": "StructuredDocumentation", + "src": "20874:285:0", + "text": " @notice Seller burns the remaining supply in case it's no longer in exchange and withdrawal of the locked deposits for them are being sent back.\n @param _tokenIdSupply an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for" + }, + "functionSelector": "0bd74705", + "id": 1468, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1436, + "modifierName": { + "id": 1435, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "21274:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21274:12:0" + }, + { + "id": 1438, + "modifierName": { + "id": 1437, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21296:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21296:13:0" + } + ], + "name": "requestCancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21256:8:0" + }, + "parameters": { + "id": 1433, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1468, + "src": "21205:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "21204:24:0" + }, + "returnParameters": { + "id": 1439, + "nodeType": "ParameterList", + "parameters": [], + "src": "21315:0:0" + }, + "scope": 1594, + "src": "21165:530:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8609 + ], + "body": { + "id": 1484, + "nodeType": "Block", + "src": "21882:84:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1479, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "21930:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1480, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21947:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21947:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1476, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "21908:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1475, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "21893:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21893:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "redeem", + "nodeType": "MemberAccess", + "referencedDeclaration": 9352, + "src": "21893:36:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21893:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1483, + "nodeType": "ExpressionStatement", + "src": "21893:65:0" + }] + }, + "documentation": { + "id": 1469, + "nodeType": "StructuredDocumentation", + "src": "21703:114:0", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "db006a75", + "id": 1485, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1473, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21873:8:0" + }, + "parameters": { + "id": 1472, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "21839:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1470, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "21838:25:0" + }, + "returnParameters": { + "id": 1474, + "nodeType": "ParameterList", + "parameters": [], + "src": "21882:0:0" + }, + "scope": 1594, + "src": "21823:143:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8615 + ], + "body": { + "id": 1501, + "nodeType": "Block", + "src": "22138:84:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1496, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "22186:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1497, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22203:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22203:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1493, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "22164:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1492, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22149:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22149:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "refund", + "nodeType": "MemberAccess", + "referencedDeclaration": 9360, + "src": "22149:36:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22149:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "22149:65:0" + }] + }, + "documentation": { + "id": 1486, + "nodeType": "StructuredDocumentation", + "src": "21974:99:0", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "278ecde1", + "id": 1502, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1490, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22129:8:0" + }, + "parameters": { + "id": 1489, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1488, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1502, + "src": "22095:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1487, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22095:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "22094:25:0" + }, + "returnParameters": { + "id": 1491, + "nodeType": "ParameterList", + "parameters": [], + "src": "22138:0:0" + }, + "scope": 1594, + "src": "22079:143:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8621 + ], + "body": { + "id": 1518, + "nodeType": "Block", + "src": "22407:86:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1513, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1505, + "src": "22457:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1514, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22474:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22474:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1510, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "22433:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1509, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22418:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22418:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "complain", + "nodeType": "MemberAccess", + "referencedDeclaration": 9368, + "src": "22418:38:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22418:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1517, + "nodeType": "ExpressionStatement", + "src": "22418:67:0" + }] + }, + "documentation": { + "id": 1503, + "nodeType": "StructuredDocumentation", + "src": "22230:110:0", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "284f0923", + "id": 1519, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1507, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22398:8:0" + }, + "parameters": { + "id": 1506, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1505, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1519, + "src": "22364:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22364:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "22363:25:0" + }, + "returnParameters": { + "id": 1508, + "nodeType": "ParameterList", + "parameters": [], + "src": "22407:0:0" + }, + "scope": 1594, + "src": "22346:147:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8627 + ], + "body": { + "id": 1535, + "nodeType": "Block", + "src": "22740:128:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1530, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "22809:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1531, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22839:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22839:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1527, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "22766:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1526, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22751:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22751:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelOrFault", + "nodeType": "MemberAccess", + "referencedDeclaration": 9376, + "src": "22751:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22751:109:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1534, + "nodeType": "ExpressionStatement", + "src": "22751:109:0" + }] + }, + "documentation": { + "id": 1520, + "nodeType": "StructuredDocumentation", + "src": "22501:167:0", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "765e0fb8", + "id": 1536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1524, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22731:8:0" + }, + "parameters": { + "id": 1523, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1522, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1536, + "src": "22697:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1521, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "22696:25:0" + }, + "returnParameters": { + "id": 1525, + "nodeType": "ParameterList", + "parameters": [], + "src": "22740:0:0" + }, + "scope": 1594, + "src": "22674:194:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8633 + ], + "body": { + "id": 1548, + "nodeType": "Block", + "src": "23104:44:0", + "statements": [{ + "expression": { + "id": 1546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "23116:24:0", + "subExpression": { + "baseExpression": { + "id": 1543, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "23116:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1545, + "indexExpression": { + "id": 1544, + "name": "_party", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1539, + "src": "23131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "23116:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1547, + "nodeType": "ExpressionStatement", + "src": "23116:24:0" + }] + }, + "documentation": { + "id": 1537, + "nodeType": "StructuredDocumentation", + "src": "22876:132:0", + "text": " @notice Increment a seller or buyer's correlation Id\n @param _party The address of the seller or buyer" + }, + "functionSelector": "7ff97ac1", + "id": 1549, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "incrementCorrelationId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1541, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23090:8:0" + }, + "parameters": { + "id": 1540, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1539, + "mutability": "mutable", + "name": "_party", + "nodeType": "VariableDeclaration", + "scope": 1549, + "src": "23046:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1538, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23046:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "23045:16:0" + }, + "returnParameters": { + "id": 1542, + "nodeType": "ParameterList", + "parameters": [], + "src": "23104:0:0" + }, + "scope": 1594, + "src": "23014:134:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8641 + ], + "body": { + "id": 1562, + "nodeType": "Block", + "src": "23469:48:0", + "statements": [{ + "expression": { + "baseExpression": { + "id": 1558, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "23487:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1560, + "indexExpression": { + "id": 1559, + "name": "_party", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "23502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23487:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1557, + "id": 1561, + "nodeType": "Return", + "src": "23480:29:0" + }] + }, + "documentation": { + "id": 1550, + "nodeType": "StructuredDocumentation", + "src": "23156:182:0", + "text": " @notice Return a seller or buyer's correlation Id\n @param _party The address of the seller or buyer\n @return the specified party's correlation Id" + }, + "functionSelector": "0353b31e", + "id": 1563, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCorrelationId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1554, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23414:8:0" + }, + "parameters": { + "id": 1553, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1552, + "mutability": "mutable", + "name": "_party", + "nodeType": "VariableDeclaration", + "scope": 1563, + "src": "23370:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23370:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "23369:16:0" + }, + "returnParameters": { + "id": 1557, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1556, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1563, + "src": "23455:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1555, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23455:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "23454:9:0" + }, + "scope": 1594, + "src": "23344:173:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8647 + ], + "body": { + "id": 1572, + "nodeType": "Block", + "src": "23752:40:0", + "statements": [{ + "expression": { + "id": 1570, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "23770:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1569, + "id": 1571, + "nodeType": "Return", + "src": "23763:21:0" + }] + }, + "documentation": { + "id": 1564, + "nodeType": "StructuredDocumentation", + "src": "23525:107:0", + "text": " @notice Get the address of Cashier contract\n @return Address of Cashier address" + }, + "functionSelector": "f9d93099", + "id": 1573, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1566, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23711:8:0" + }, + "parameters": { + "id": 1565, + "nodeType": "ParameterList", + "parameters": [], + "src": "23664:2:0" + }, + "returnParameters": { + "id": 1569, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1568, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1573, + "src": "23738:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23738:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "23737:9:0" + }, + "scope": 1594, + "src": "23638:154:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8653 + ], + "body": { + "id": 1582, + "nodeType": "Block", + "src": "24049:39:0", + "statements": [{ + "expression": { + "id": 1580, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "24067:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1579, + "id": 1581, + "nodeType": "Return", + "src": "24060:20:0" + }] + }, + "documentation": { + "id": 1574, + "nodeType": "StructuredDocumentation", + "src": "23801:122:0", + "text": " @notice Get the address of Voucher Kernel contract\n @return Address of Voucher Kernel contract" + }, + "functionSelector": "e3f5d2d5", + "id": 1583, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1576, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "24008:8:0" + }, + "parameters": { + "id": 1575, + "nodeType": "ParameterList", + "parameters": [], + "src": "23961:2:0" + }, + "returnParameters": { + "id": 1579, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1578, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1583, + "src": "24035:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24035:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "24034:9:0" + }, + "scope": 1594, + "src": "23929:159:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8659 + ], + "body": { + "id": 1592, + "nodeType": "Block", + "src": "24354:42:0", + "statements": [{ + "expression": { + "id": 1590, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "24372:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1589, + "id": 1591, + "nodeType": "Return", + "src": "24365:23:0" + }] + }, + "documentation": { + "id": 1584, + "nodeType": "StructuredDocumentation", + "src": "24096:130:0", + "text": " @notice Get the address of Fund Limits Oracle contract\n @return Address of Fund Limits Oracle contract" + }, + "functionSelector": "17d001b0", + "id": 1593, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getFundLimitOracleAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1586, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "24313:8:0" + }, + "parameters": { + "id": 1585, + "nodeType": "ParameterList", + "parameters": [], + "src": "24266:2:0" + }, + "returnParameters": { + "id": 1589, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1588, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1593, + "src": "24340:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1587, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24340:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "24339:9:0" + }, + "scope": 1594, + "src": "24232:164:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1595, + "src": "687:23712:0" + } + ], + "src": "47:24354:0" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/BosonRouter.sol", + "exportedSymbols": { + "BosonRouter": [ + 1594 + ] + }, + "id": 1595, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [{ + "id": 1, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "47:22:0" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 13734, + "src": "73:59:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 12500, + "src": "134:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 12145, + "src": "187:52:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 13694, + "src": "241:52:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 13087, + "src": "295:51:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 9644, + "src": "348:41:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC20WithPermit.sol", + "file": "./interfaces/IERC20WithPermit.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 9125, + "src": "391:43:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IFundLimitsOracle.sol", + "file": "./interfaces/IFundLimitsOracle.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 9281, + "src": "436:44:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IBosonRouter.sol", + "file": "./interfaces/IBosonRouter.sol", + "id": 10, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 8661, + "src": "482:39:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol", + "file": "./interfaces/ICashier.sol", + "id": 11, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 8785, + "src": "523:35:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 12, + "nodeType": "ImportDirective", + "scope": 1595, + "sourceUnit": 6141, + "src": "560:28:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [{ + "baseName": { + "id": 14, + "name": "IBosonRouter", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8660, + "src": "716:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBosonRouter_$8660", + "typeString": "contract IBosonRouter" + } + }, + "id": 15, + "nodeType": "InheritanceSpecifier", + "src": "716:12:0" + }, + { + "baseName": { + "id": 16, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "735:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 17, + "nodeType": "InheritanceSpecifier", + "src": "735:12:0" + }, + { + "baseName": { + "id": 18, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "754:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 19, + "nodeType": "InheritanceSpecifier", + "src": "754:8:0" + }, + { + "baseName": { + "id": 20, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13733, + "src": "769:15:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$13733", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 21, + "nodeType": "InheritanceSpecifier", + "src": "769:15:0" + }, + { + "baseName": { + "id": 22, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "791:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 23, + "nodeType": "InheritanceSpecifier", + "src": "791:7:0" + } + ], + "contractDependencies": [ + 6140, + 8660, + 12144, + 13109, + 13693, + 13733 + ], + "contractKind": "contract", + "documentation": { + "id": 13, + "nodeType": "StructuredDocumentation", + "src": "592:93:0", + "text": " @title Contract for interacting with Boson Protocol from the user's perspective." + }, + "fullyImplemented": true, + "id": 1594, + "linearizedBaseContracts": [ + 1594, + 12144, + 13733, + 13693, + 13109, + 6140, + 8660 + ], + "name": "BosonRouter", + "nodeType": "ContractDefinition", + "nodes": [{ + "id": 26, + "libraryName": { + "id": 24, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "813:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "807:34:0", + "typeName": { + "id": 25, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "825:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + }, + { + "id": 29, + "libraryName": { + "id": 27, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "853:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "847:27:0", + "typeName": { + "id": 28, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "866:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 33, + "mutability": "mutable", + "name": "correlationIds", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "882:50:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 32, + "keyType": { + "id": 30, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "890:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "882:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 31, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "901:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "1050:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 34, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1050:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "1087:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 36, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1087:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 39, + "mutability": "mutable", + "name": "fundLimitsOracle", + "nodeType": "VariableDeclaration", + "scope": 1594, + "src": "1123:32:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 38, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1123:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 51, + "name": "LogOrderCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 41, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1196:30:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 40, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1196:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 43, + "indexed": false, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1237:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 42, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1237:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 45, + "indexed": false, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1263:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 44, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1263:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 47, + "indexed": false, + "mutability": "mutable", + "name": "_paymentType", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1291:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 46, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1291:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 49, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 51, + "src": "1320:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 48, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1320:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1185:164:0" + }, + "src": "1164:186:0" + }, + { + "body": { + "id": 67, + "nodeType": "Block", + "src": "1552:75:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 58, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "1571:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [{ + "hexValue": "30", + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1595:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 59, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1587:7:0", + "typeDescriptions": {} + } + }, + "id": 62, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1587:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1571:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "3041", + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1599:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_852678f6380794dbd774de8ca6f2b142a620be7686cd37c8bcc42e97c45cc9d4", + "typeString": "literal_string \"0A\"" + }, + "value": "0A" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_852678f6380794dbd774de8ca6f2b142a620be7686cd37c8bcc42e97c45cc9d4", + "typeString": "literal_string \"0A\"" + } + ], + "id": 57, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "1563:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:41:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 66, + "nodeType": "ExpressionStatement", + "src": "1563:41:0" + }] + }, + "documentation": { + "id": 52, + "nodeType": "StructuredDocumentation", + "src": "1358:129:0", + "text": " @notice Acts as a modifier, but it's cheaper. Checking if a non-zero address is provided, otherwise reverts." + }, + "id": 68, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "notZeroAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 55, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 54, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 68, + "src": "1517:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 53, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1517:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "1516:22:0" + }, + "returnParameters": { + "id": 56, + "nodeType": "ParameterList", + "parameters": [], + "src": "1552:0:0" + }, + "scope": 1594, + "src": "1493:134:0", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 81, + "nodeType": "Block", + "src": "1840:69:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 77, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 73, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "1859:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 74, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1859:7:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 75, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13097, + "src": "1870:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 76, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1870:12:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1859:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1884:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1544e7eb480cc28803f7ff893bd999e62fb759c7d172fc27414594c5d9c925f2", + "typeString": "literal_string \"NO\"" + }, + "value": "NO" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1544e7eb480cc28803f7ff893bd999e62fb759c7d172fc27414594c5d9c925f2", + "typeString": "literal_string \"NO\"" + } + ], + "id": 72, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "1851:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1851:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 80, + "nodeType": "ExpressionStatement", + "src": "1851:38:0" + }] + }, + "documentation": { + "id": 69, + "nodeType": "StructuredDocumentation", + "src": "1635:158:0", + "text": " @notice Acts as a modifier, but it's cheaper. Replacement of onlyOwner modifier. If the caller is not the owner of the contract, reverts." + }, + "id": 82, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "onlyRouterOwner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 70, + "nodeType": "ParameterList", + "parameters": [], + "src": "1823:2:0" + }, + "returnParameters": { + "id": 71, + "nodeType": "ParameterList", + "parameters": [], + "src": "1840:0:0" + }, + "scope": 1594, + "src": "1799:110:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 99, + "nodeType": "Block", + "src": "2286:144:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 89, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "2319:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 91, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "2346:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 90, + "name": "IFundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9280, + "src": "2328:17:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IFundLimitsOracle_$9280_$", + "typeString": "type(contract IFundLimitsOracle)" + } + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2328:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFundLimitsOracle_$9280", + "typeString": "contract IFundLimitsOracle" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getETHLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9279, + "src": "2328:47:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 94, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2328:49:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2319:58:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c", + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2392:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + }, + "value": "AL" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + } + ], + "id": 88, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "2297:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2297:125:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 98, + "nodeType": "ExpressionStatement", + "src": "2297:125:0" + }] + }, + "documentation": { + "id": 83, + "nodeType": "StructuredDocumentation", + "src": "1917:308:0", + "text": " @notice Acts as a modifier, but it's cheaper. Checks whether provided value corresponds to the limits in the FundLimitsOracle.\n @param value the specified value is per voucher set level. E.g. deposit * qty should not be greater or equal to the limit in the FundLimitsOracle (ETH)." + }, + "id": 100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "notAboveETHLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 100, + "src": "2257:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2257:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "2256:15:0" + }, + "returnParameters": { + "id": 87, + "nodeType": "ParameterList", + "parameters": [], + "src": "2286:0:0" + }, + "scope": 1594, + "src": "2231:199:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 120, + "nodeType": "Block", + "src": "2940:215:0", + "statements": [{ + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 109, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "2973:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "arguments": [{ + "id": 114, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 103, + "src": "3071:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "expression": { + "arguments": [{ + "id": 111, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3017:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 110, + "name": "IFundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9280, + "src": "2999:17:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IFundLimitsOracle_$9280_$", + "typeString": "type(contract IFundLimitsOracle)" + } + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2999:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFundLimitsOracle_$9280", + "typeString": "contract IFundLimitsOracle" + } + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getTokenLimit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9267, + "src": "2999:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2999:104:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2973:130:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3118:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + }, + "value": "AL" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39a8150bbb4f6f51680c0e42b5c231c2a0c3c1535750b430e937cfeeb2dddbcb", + "typeString": "literal_string \"AL\"" + } + ], + "id": 108, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "2951:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2951:196:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 119, + "nodeType": "ExpressionStatement", + "src": "2951:196:0" + }] + }, + "documentation": { + "id": 101, + "nodeType": "StructuredDocumentation", + "src": "2438:393:0", + "text": " @notice Acts as a modifier, but it's cheaper. Checks whether provided value corresponds to the limits in the FundLimitsOracle.\n @param _tokenAddress the token address which, we are getting the limits for.\n @param value the specified value is per voucher set level. E.g. deposit * qty should not be greater or equal to the limit in the FundLimitsOracle (ETH)." + }, + "id": 121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "notAboveTokenLimit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 103, + "mutability": "mutable", + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 121, + "src": "2865:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 102, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2865:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 105, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 121, + "src": "2888:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2888:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2864:38:0" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "2940:0:0" + }, + "scope": 1594, + "src": "2837:318:0", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 154, + "nodeType": "Block", + "src": "3285:268:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 131, + "name": "_voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3311:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 130, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "3296:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3296:30:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 133, + "nodeType": "ExpressionStatement", + "src": "3296:30:0" + }, + { + "expression": { + "arguments": [{ + "id": 135, + "name": "_fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3352:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 134, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "3337:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3337:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 137, + "nodeType": "ExpressionStatement", + "src": "3337:33:0" + }, + { + "expression": { + "arguments": [{ + "id": 139, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "3396:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 138, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "3381:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3381:31:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 141, + "nodeType": "ExpressionStatement", + "src": "3381:31:0" + }, + { + "expression": { + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 142, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "3425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 143, + "name": "_voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3441:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3425:30:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 145, + "nodeType": "ExpressionStatement", + "src": "3425:30:0" + }, + { + "expression": { + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 146, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "3466:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 147, + "name": "_fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3485:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3466:36:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "3466:36:0" + }, + { + "expression": { + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 150, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "3513:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 151, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "3530:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3513:32:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 153, + "nodeType": "ExpressionStatement", + "src": "3513:32:0" + } + ] + }, + "id": 155, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "_voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 155, + "src": "3185:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3185:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 125, + "mutability": "mutable", + "name": "_fundLimitsOracle", + "nodeType": "VariableDeclaration", + "scope": 155, + "src": "3218:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3218:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 127, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 155, + "src": "3254:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 126, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3254:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3174:110:0" + }, + "returnParameters": { + "id": 129, + "nodeType": "ParameterList", + "parameters": [], + "src": "3285:0:0" + }, + "scope": 1594, + "src": "3163:390:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8459 + ], + "body": { + "id": 178, + "nodeType": "Block", + "src": "3903:146:0", + "statements": [{ + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 160, + "name": "onlyRouterOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 82, + "src": "3914:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3914:17:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 162, + "nodeType": "ExpressionStatement", + "src": "3914:17:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 163, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "3942:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3942:8:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 165, + "nodeType": "ExpressionStatement", + "src": "3942:8:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 167, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "3976:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 166, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "3961:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3961:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pause", + "nodeType": "MemberAccess", + "referencedDeclaration": 9286, + "src": "3961:35:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3961:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 171, + "nodeType": "ExpressionStatement", + "src": "3961:37:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 173, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "4018:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 172, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4009:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pause", + "nodeType": "MemberAccess", + "referencedDeclaration": 8666, + "src": "4009:30:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4009:32:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 177, + "nodeType": "ExpressionStatement", + "src": "4009:32:0" + } + ] + }, + "documentation": { + "id": 156, + "nodeType": "StructuredDocumentation", + "src": "3561:301:0", + "text": " @notice Pause the Cashier && the Voucher Kernel contracts in case of emergency.\n All functions related to creating new batch, requestVoucher or withdraw will be paused, hence cannot be executed.\n There is special function for withdrawing funds if contract is paused." + }, + "functionSelector": "8456cb59", + "id": 179, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 158, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3894:8:0" + }, + "parameters": { + "id": 157, + "nodeType": "ParameterList", + "parameters": [], + "src": "3882:2:0" + }, + "returnParameters": { + "id": 159, + "nodeType": "ParameterList", + "parameters": [], + "src": "3903:0:0" + }, + "scope": 1594, + "src": "3868:181:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8462 + ], + "body": { + "id": 211, + "nodeType": "Block", + "src": "4279:238:0", + "statements": [{ + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 184, + "name": "onlyRouterOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 82, + "src": "4290:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4290:17:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 186, + "nodeType": "ExpressionStatement", + "src": "4290:17:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 189, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "4335:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 188, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4326:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4326:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "canUnpause", + "nodeType": "MemberAccess", + "referencedDeclaration": 8675, + "src": "4326:35:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4326:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5546", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4365:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_655f0188be990c572391e43fb465b9260923020b853a700724fe3cc9a5892dcc", + "typeString": "literal_string \"UF\"" + }, + "value": "UF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_655f0188be990c572391e43fb465b9260923020b853a700724fe3cc9a5892dcc", + "typeString": "literal_string \"UF\"" + } + ], + "id": 187, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "4318:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4318:52:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 195, + "nodeType": "ExpressionStatement", + "src": "4318:52:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 196, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "4404:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4404:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 198, + "nodeType": "ExpressionStatement", + "src": "4404:10:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 200, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "4440:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 199, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "4425:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4425:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unpause", + "nodeType": "MemberAccess", + "referencedDeclaration": 9290, + "src": "4425:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4425:39:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 204, + "nodeType": "ExpressionStatement", + "src": "4425:39:0" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [{ + "id": 206, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "4484:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 205, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4475:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "unpause", + "nodeType": "MemberAccess", + "referencedDeclaration": 8670, + "src": "4475:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 210, + "nodeType": "ExpressionStatement", + "src": "4475:34:0" + } + ] + }, + "documentation": { + "id": 180, + "nodeType": "StructuredDocumentation", + "src": "4057:179:0", + "text": " @notice Unpause the Cashier && the Voucher Kernel contracts.\n All functions related to creating new batch, requestVoucher or withdraw will be unpaused." + }, + "functionSelector": "3f4ba83a", + "id": 212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 182, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4270:8:0" + }, + "parameters": { + "id": 181, + "nodeType": "ParameterList", + "parameters": [], + "src": "4258:2:0" + }, + "returnParameters": { + "id": 183, + "nodeType": "ParameterList", + "parameters": [], + "src": "4279:0:0" + }, + "scope": 1594, + "src": "4242:275:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8469 + ], + "body": { + "id": 342, + "nodeType": "Block", + "src": "5428:1157:0", + "statements": [{ + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 229, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5472:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 231, + "indexExpression": { + "hexValue": "35", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5481:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5472:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 225, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5456:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 227, + "indexExpression": { + "hexValue": "32", + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5465:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5456:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5456:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5456:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 224, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "5439:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5439:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 234, + "nodeType": "ExpressionStatement", + "src": "5439:46:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 240, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5529:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 242, + "indexExpression": { + "hexValue": "35", + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5538:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5529:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 236, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5513:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 238, + "indexExpression": { + "hexValue": "33", + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5522:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5513:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5513:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5513:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 235, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "5496:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 244, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5496:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 245, + "nodeType": "ExpressionStatement", + "src": "5496:46:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 251, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5586:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 253, + "indexExpression": { + "hexValue": "35", + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5595:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5586:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 247, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5570:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 249, + "indexExpression": { + "hexValue": "34", + "id": 248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5579:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5570:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5570:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5570:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 246, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "5553:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5553:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 256, + "nodeType": "ExpressionStatement", + "src": "5553:46:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 262, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5634:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 264, + "indexExpression": { + "hexValue": "35", + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5643:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5634:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 258, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 260, + "indexExpression": { + "hexValue": "33", + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5627:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5618:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "5618:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5618:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 266, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5650:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "5650:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5618:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5661:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 257, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "5610:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5610:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 271, + "nodeType": "ExpressionStatement", + "src": "5610:56:0" + }, + { + "assignments": [ + 273 + ], + "declarations": [{ + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 342, + "src": "5787:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5787:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 299, + "initialValue": { + "arguments": [{ + "expression": { + "id": 278, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5892:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5892:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 280, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5921:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 282, + "indexExpression": { + "hexValue": "30", + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5930:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5921:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 283, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5951:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 285, + "indexExpression": { + "hexValue": "31", + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5960:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5951:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 286, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "5981:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 288, + "indexExpression": { + "hexValue": "32", + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5990:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 289, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6011:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 291, + "indexExpression": { + "hexValue": "33", + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6020:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6011:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 292, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6041:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 294, + "indexExpression": { + "hexValue": "34", + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6050:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6041:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 295, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 297, + "indexExpression": { + "hexValue": "35", + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6080:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6071:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 275, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "5839:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 274, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "5824:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5824:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "5824:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5824:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5787:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 304, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "6174:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 305, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "6202:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6231:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6223:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 306, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6223:7:0", + "typeDescriptions": {} + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6223:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6256:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6248:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 310, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6248:7:0", + "typeDescriptions": {} + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6248:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 301, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "6125:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 300, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "6110:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6110:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "6110:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6110:159:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 315, + "nodeType": "ExpressionStatement", + "src": "6110:159:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 323, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6379:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6379:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 317, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "6329:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 316, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "6320:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6320:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "6320:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 320, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6368:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "6368:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "6320:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6320:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 326, + "nodeType": "ExpressionStatement", + "src": "6320:70:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 328, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "6438:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 329, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6466:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6466:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 331, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 216, + "src": "6491:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 333, + "indexExpression": { + "hexValue": "35", + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6500:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6491:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 334, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "6517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6538:28:0", + "subExpression": { + "baseExpression": { + "id": 335, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "6538:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 338, + "indexExpression": { + "expression": { + "id": 336, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6553:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6553:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6538:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 327, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "6408:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6408:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 341, + "nodeType": "EmitStatement", + "src": "6403:174:0" + } + ] + }, + "documentation": { + "id": 213, + "nodeType": "StructuredDocumentation", + "src": "4525:731:0", + "text": " @notice Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\n@param metadata metadata which is required for creation of a voucher\nMetadata array is used as in some scenarios we need several more params, as we need to recover \nowner address in order to permit the contract to transfer funds on his behalf. \nSince the params get too many, we end up in situation that the stack is too deep.\nuint256 _validFrom = metadata[0];\nuint256 _validTo = metadata[1];\nuint256 _price = metadata[2];\nuint256 _depositSe = metadata[3];\nuint256 _depositBu = metadata[4];\nuint256 _quantity = metadata[5];" + }, + "functionSelector": "dea7f423", + "id": 343, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 220, + "modifierName": { + "id": 219, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "5387:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5387:12:0" + }, + { + "id": 222, + "modifierName": { + "id": 221, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "5409:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5409:13:0" + } + ], + "name": "requestCreateOrderETHETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 218, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5369:8:0" + }, + "parameters": { + "id": 217, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 216, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 343, + "src": "5296:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 214, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5296:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 215, + "nodeType": "ArrayTypeName", + "src": "5296:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }], + "src": "5295:29:0" + }, + "returnParameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "5428:0:0" + }, + "scope": 1594, + "src": "5262:1323:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8489 + ], + "body": { + "id": 517, + "nodeType": "Block", + "src": "6905:1803:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 367, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "6931:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 366, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "6916:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6916:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 369, + "nodeType": "ExpressionStatement", + "src": "6916:34:0" + }, + { + "expression": { + "arguments": [{ + "id": 371, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "6976:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 370, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "6961:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6961:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 373, + "nodeType": "ExpressionStatement", + "src": "6961:36:0" + }, + { + "expression": { + "arguments": [{ + "id": 375, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "7027:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 380, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7063:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 382, + "indexExpression": { + "hexValue": "35", + "id": 381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7072:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7063:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 376, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7047:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 378, + "indexExpression": { + "hexValue": "32", + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7056:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7047:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7047:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7047:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 374, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "7008:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7008:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 385, + "nodeType": "ExpressionStatement", + "src": "7008:68:0" + }, + { + "expression": { + "arguments": [{ + "id": 387, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7106:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 392, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7144:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 394, + "indexExpression": { + "hexValue": "35", + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7153:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7144:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 388, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7128:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 390, + "indexExpression": { + "hexValue": "33", + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7137:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7128:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7128:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7128:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 386, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "7087:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7087:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 397, + "nodeType": "ExpressionStatement", + "src": "7087:70:0" + }, + { + "expression": { + "arguments": [{ + "id": 399, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7187:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 404, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7225:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 406, + "indexExpression": { + "hexValue": "35", + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7234:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7225:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 400, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7209:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 402, + "indexExpression": { + "hexValue": "34", + "id": 401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7218:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7209:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7209:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7209:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 398, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "7168:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7168:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 409, + "nodeType": "ExpressionStatement", + "src": "7168:70:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 415, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7275:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 417, + "indexExpression": { + "hexValue": "35", + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7284:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7275:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 411, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7259:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 413, + "indexExpression": { + "hexValue": "33", + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7268:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7259:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "7259:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7259:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 419, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "7291:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7259:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7304:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 410, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "7251:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7251:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 423, + "nodeType": "ExpressionStatement", + "src": "7251:58:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 428, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7490:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7490:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 432, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7523:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7515:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 430, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7515:7:0", + "typeDescriptions": {} + } + }, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7515:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 434, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "7543:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 435, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 351, + "src": "7569:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 436, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "7592:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 437, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "7608:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 438, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "7624:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 425, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "7447:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 424, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "7430:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7430:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "7430:45:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7430:206:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "7430:206:0" + }, + { + "assignments": [ + 442 + ], + "declarations": [{ + "constant": false, + "id": 442, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 517, + "src": "7649:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7649:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 468, + "initialValue": { + "arguments": [{ + "expression": { + "id": 447, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7754:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7754:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 449, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7783:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 451, + "indexExpression": { + "hexValue": "30", + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7792:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7783:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 452, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7813:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 454, + "indexExpression": { + "hexValue": "31", + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7822:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7813:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 455, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7843:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 457, + "indexExpression": { + "hexValue": "32", + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7852:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7843:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 458, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7873:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 460, + "indexExpression": { + "hexValue": "33", + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7882:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7873:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 461, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7903:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 463, + "indexExpression": { + "hexValue": "34", + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7912:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7903:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 464, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "7933:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 466, + "indexExpression": { + "hexValue": "35", + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7942:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7933:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 444, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "7701:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 443, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7686:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7686:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "7686:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7686:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7649:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 473, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "8036:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 474, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "8064:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 475, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "8085:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 476, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "8118:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [{ + "id": 470, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "7987:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 469, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7972:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7972:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "7972:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7972:177:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 478, + "nodeType": "ExpressionStatement", + "src": "7972:177:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 483, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8228:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8228:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 487, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "8261:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8253:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 485, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8253:7:0", + "typeDescriptions": {} + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8253:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 489, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8291:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 480, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "8179:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 479, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "8162:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8162:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "8162:51:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8162:151:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "8162:151:0" + }, + { + "expression": { + "arguments": [{ + "id": 496, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "8431:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 497, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8466:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8466:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 499, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8491:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 493, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "8379:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 492, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "8370:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8370:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "8370:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8370:143:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "8370:143:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 503, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "8561:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 504, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8589:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8589:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 506, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "8614:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 508, + "indexExpression": { + "hexValue": "35", + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8623:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8614:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 509, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "8640:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8661:28:0", + "subExpression": { + "baseExpression": { + "id": 510, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "8661:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 513, + "indexExpression": { + "expression": { + "id": 511, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8676:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8676:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 502, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "8531:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8531:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 516, + "nodeType": "EmitStatement", + "src": "8526:174:0" + } + ] + }, + "functionSelector": "c241649a", + "id": 518, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 364, + "modifierName": { + "id": 363, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "6891:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6891:13:0" + }], + "name": "requestCreateOrderTKNTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 362, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6882:8:0" + }, + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 345, + "mutability": "mutable", + "name": "_tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6647:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6647:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 347, + "mutability": "mutable", + "name": "_tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6684:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 346, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6684:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6723:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6723:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 351, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6753:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 350, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6753:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 353, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6780:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 352, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6780:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 355, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6798:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 354, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6798:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 357, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6818:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 356, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6818:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 360, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 518, + "src": "6838:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6838:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 359, + "nodeType": "ArrayTypeName", + "src": "6838:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "6636:236:0" + }, + "returnParameters": { + "id": 365, + "nodeType": "ParameterList", + "parameters": [], + "src": "6905:0:0" + }, + "scope": 1594, + "src": "6593:2115:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8507 + ], + "body": { + "id": 688, + "nodeType": "Block", + "src": "8991:1728:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 540, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9017:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 539, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "9002:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9002:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 542, + "nodeType": "ExpressionStatement", + "src": "9002:36:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 548, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9082:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 550, + "indexExpression": { + "hexValue": "35", + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9091:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9082:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 544, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 546, + "indexExpression": { + "hexValue": "32", + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9075:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9066:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9066:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9066:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 543, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "9049:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9049:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 553, + "nodeType": "ExpressionStatement", + "src": "9049:46:0" + }, + { + "expression": { + "arguments": [{ + "id": 555, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9125:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 560, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9163:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 562, + "indexExpression": { + "hexValue": "35", + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9172:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9163:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 556, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9147:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 558, + "indexExpression": { + "hexValue": "33", + "id": 557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9156:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9147:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9147:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9147:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 554, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "9106:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9106:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 565, + "nodeType": "ExpressionStatement", + "src": "9106:70:0" + }, + { + "expression": { + "arguments": [{ + "id": 567, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9206:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 572, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9244:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 574, + "indexExpression": { + "hexValue": "35", + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9253:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9244:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 568, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9228:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 570, + "indexExpression": { + "hexValue": "34", + "id": 569, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9237:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9228:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9228:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9228:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 566, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "9187:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9187:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 577, + "nodeType": "ExpressionStatement", + "src": "9187:70:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 583, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9294:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 585, + "indexExpression": { + "hexValue": "35", + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9303:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9294:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 579, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9278:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 581, + "indexExpression": { + "hexValue": "33", + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9287:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9278:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "9278:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9278:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 587, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "9310:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9278:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9323:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 578, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "9270:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9270:58:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "ExpressionStatement", + "src": "9270:58:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9509:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9509:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 600, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "9542:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9534:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9534:7:0", + "typeDescriptions": {} + } + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9534:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 602, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "9562:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 603, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "9588:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 604, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "9611:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 605, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "9627:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 606, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "9643:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 593, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "9466:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 592, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "9449:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9449:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "9449:45:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9449:206:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 608, + "nodeType": "ExpressionStatement", + "src": "9449:206:0" + }, + { + "assignments": [ + 610 + ], + "declarations": [{ + "constant": false, + "id": 610, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 688, + "src": "9668:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 609, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9668:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 636, + "initialValue": { + "arguments": [{ + "expression": { + "id": 615, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9773:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9773:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 617, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9802:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 619, + "indexExpression": { + "hexValue": "30", + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9811:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9802:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 620, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9832:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 622, + "indexExpression": { + "hexValue": "31", + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9841:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9832:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 623, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9862:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 625, + "indexExpression": { + "hexValue": "32", + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9862:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 626, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9892:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 628, + "indexExpression": { + "hexValue": "33", + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9901:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9892:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 629, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9922:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 631, + "indexExpression": { + "hexValue": "34", + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9931:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9922:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 632, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "9952:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 634, + "indexExpression": { + "hexValue": "35", + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9961:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9952:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 612, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "9720:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 611, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "9705:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9705:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "9705:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9705:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9668:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 641, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "10055:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 642, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "10083:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 645, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10112:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10104:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 643, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10104:7:0", + "typeDescriptions": {} + } + }, + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10104:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 647, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "10129:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [{ + "id": 638, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "10006:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 637, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "9991:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9991:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "9991:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9991:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 649, + "nodeType": "ExpressionStatement", + "src": "9991:169:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 654, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10239:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10239:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 658, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "10272:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10264:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10264:7:0", + "typeDescriptions": {} + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10264:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 660, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "10302:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 651, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "10190:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 650, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "10173:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10173:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "10173:51:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10173:151:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 662, + "nodeType": "ExpressionStatement", + "src": "10173:151:0" + }, + { + "expression": { + "arguments": [{ + "id": 667, + "name": "_tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "10442:20:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 668, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10477:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10477:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 670, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 522, + "src": "10502:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 664, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "10390:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 663, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "10381:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10381:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "10381:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10381:143:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 672, + "nodeType": "ExpressionStatement", + "src": "10381:143:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 674, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "10572:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 675, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10600:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10600:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 677, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 533, + "src": "10625:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 679, + "indexExpression": { + "hexValue": "35", + "id": 678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10634:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10625:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 680, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "10651:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "10672:28:0", + "subExpression": { + "baseExpression": { + "id": 681, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "10672:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 684, + "indexExpression": { + "expression": { + "id": 682, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10687:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "10687:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10672:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 673, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "10542:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10542:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 687, + "nodeType": "EmitStatement", + "src": "10537:174:0" + } + ] + }, + "functionSelector": "bc16ba47", + "id": 689, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 537, + "modifierName": { + "id": 536, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "8977:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8977:13:0" + }], + "name": "requestCreateOrderETHTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 535, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8968:8:0" + }, + "parameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 520, + "mutability": "mutable", + "name": "_tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8770:28:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8770:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 522, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8809:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 521, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8809:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 524, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8839:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 523, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8866:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 525, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "8866:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8884:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 527, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8884:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8904:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 529, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8904:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 533, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 689, + "src": "8924:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 531, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 532, + "nodeType": "ArrayTypeName", + "src": "8924:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "8759:199:0" + }, + "returnParameters": { + "id": 538, + "nodeType": "ParameterList", + "parameters": [], + "src": "8991:0:0" + }, + "scope": 1594, + "src": "8716:2003:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8515 + ], + "body": { + "id": 822, + "nodeType": "Block", + "src": "10896:1232:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 703, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 691, + "src": "10922:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 702, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "10907:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 704, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10907:34:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 705, + "nodeType": "ExpressionStatement", + "src": "10907:34:0" + }, + { + "expression": { + "arguments": [{ + "id": 707, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 691, + "src": "10971:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "baseExpression": { + "id": 712, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11007:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 714, + "indexExpression": { + "hexValue": "35", + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11016:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 708, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "10991:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 710, + "indexExpression": { + "hexValue": "32", + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11000:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10991:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "10991:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10991:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 706, + "name": "notAboveTokenLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "10952:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) view" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10952:68:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "10952:68:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 723, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11064:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 725, + "indexExpression": { + "hexValue": "35", + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11073:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11064:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 719, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11048:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 721, + "indexExpression": { + "hexValue": "33", + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11057:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11048:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "11048:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11048:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 718, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "11031:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11031:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 728, + "nodeType": "ExpressionStatement", + "src": "11031:46:0" + }, + { + "expression": { + "arguments": [{ + "arguments": [{ + "baseExpression": { + "id": 734, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11121:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 736, + "indexExpression": { + "hexValue": "35", + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11130:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11121:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 730, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11105:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 732, + "indexExpression": { + "hexValue": "34", + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11114:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11105:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "11105:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11105:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "id": 729, + "name": "notAboveETHLimit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "11088:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$__$", + "typeString": "function (uint256) view" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11088:46:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "11088:46:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "baseExpression": { + "id": 745, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11171:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 747, + "indexExpression": { + "hexValue": "35", + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11180:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11171:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "baseExpression": { + "id": 741, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11155:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 743, + "indexExpression": { + "hexValue": "33", + "id": 742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11164:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11155:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "11155:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11155:28:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 749, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11187:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "11187:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11155:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 740, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "11147:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11147:56:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 754, + "nodeType": "ExpressionStatement", + "src": "11147:56:0" + }, + { + "assignments": [ + 756 + ], + "declarations": [{ + "constant": false, + "id": 756, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 822, + "src": "11324:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 755, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11324:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 782, + "initialValue": { + "arguments": [{ + "expression": { + "id": 761, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11429:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11429:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 763, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11458:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 765, + "indexExpression": { + "hexValue": "30", + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11467:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11458:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 766, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11488:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 768, + "indexExpression": { + "hexValue": "31", + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11497:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11488:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 769, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11518:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 771, + "indexExpression": { + "hexValue": "32", + "id": 770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11527:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11518:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 772, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11548:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 774, + "indexExpression": { + "hexValue": "33", + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11557:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11548:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 775, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11578:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 777, + "indexExpression": { + "hexValue": "34", + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11587:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11578:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "baseExpression": { + "id": 778, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "11608:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 780, + "indexExpression": { + "hexValue": "35", + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11617:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11608:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 758, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "11376:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 757, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "11361:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createTokenSupplyID", + "nodeType": "MemberAccess", + "referencedDeclaration": 9310, + "src": "11361:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256,uint256,uint256,uint256,uint256,uint256) external returns (uint256)" + } + }, + "id": 781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:273:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11324:310:0" + }, + { + "expression": { + "arguments": [{ + "id": 787, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "11709:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 788, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "11737:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 789, + "name": "_tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 691, + "src": "11758:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [{ + "hexValue": "30", + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11799:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }], + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11791:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 790, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11791:7:0", + "typeDescriptions": {} + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11791:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 784, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "11660:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 783, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "11645:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11645:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "createPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9322, + "src": "11645:49:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint8_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,uint8,address,address) external" + } + }, + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11645:167:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 795, + "nodeType": "ExpressionStatement", + "src": "11645:167:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 803, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11922:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11922:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 797, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "11872:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 796, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "11863:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11863:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "11863:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 800, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11911:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "11911:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "11863:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11863:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 806, + "nodeType": "ExpressionStatement", + "src": "11863:70:0" + }, + { + "eventCall": { + "arguments": [{ + "id": 808, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "11981:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 809, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12009:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12009:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "baseExpression": { + "id": 811, + "name": "metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "12034:8:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 813, + "indexExpression": { + "hexValue": "35", + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12043:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12034:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 814, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "12060:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "12081:28:0", + "subExpression": { + "baseExpression": { + "id": 815, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "12081:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 818, + "indexExpression": { + "expression": { + "id": 816, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12096:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12096:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12081:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 807, + "name": "LogOrderCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "11951:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,uint256,uint8,uint256)" + } + }, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11951:169:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 821, + "nodeType": "EmitStatement", + "src": "11946:174:0" + } + ] + }, + "functionSelector": "d7e308bd", + "id": 823, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 698, + "modifierName": { + "id": 697, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "10869:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10869:12:0" + }, + { + "id": 700, + "modifierName": { + "id": 699, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "10882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10882:13:0" + } + ], + "name": "requestCreateOrderTKNETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 696, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10860:8:0" + }, + "parameters": { + "id": 695, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 691, + "mutability": "mutable", + "name": "_tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 823, + "src": "10771:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10771:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 694, + "mutability": "mutable", + "name": "metadata", + "nodeType": "VariableDeclaration", + "scope": 823, + "src": "10808:27:0", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 692, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 693, + "nodeType": "ArrayTypeName", + "src": "10808:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "10760:82:0" + }, + "returnParameters": { + "id": 701, + "nodeType": "ParameterList", + "parameters": [], + "src": "10896:0:0" + }, + "scope": 1594, + "src": "10727:1401:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8523 + ], + "body": { + "id": 889, + "nodeType": "Block", + "src": "12568:685:0", + "statements": [{ + "assignments": [ + 837 + ], + "declarations": [{ + "constant": false, + "id": 837, + "mutability": "mutable", + "name": "weiReceived", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "12579:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 836, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12579:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 840, + "initialValue": { + "expression": { + "id": 838, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12601:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "12601:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12579:31:0" + }, + { + "assignments": [ + 842, + null, + 844 + ], + "declarations": [{ + "constant": false, + "id": 842, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "12642:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 841, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12642:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + null, + { + "constant": false, + "id": 844, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "12659:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 843, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12659:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 851, + "initialValue": { + "arguments": [{ + "id": 849, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "12737:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 846, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "12708:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 845, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "12693:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12693:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9508, + "src": "12693:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" + } + }, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12693:59:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12641:111:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "id": 855, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "12781:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "id": 853, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 842, + "src": "12771:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "12771:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12771:20:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 857, + "name": "weiReceived", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 837, + "src": "12795:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12771:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12808:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 852, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "12763:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12763:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 861, + "nodeType": "ExpressionStatement", + "src": "12763:50:0" + }, + { + "expression": { + "arguments": [{ + "id": 866, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 826, + "src": "12988:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 867, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 828, + "src": "13017:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13039:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "13039:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 870, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "13064:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "13085:28:0", + "subExpression": { + "baseExpression": { + "id": 871, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "13085:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 874, + "indexExpression": { + "expression": { + "id": 872, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13100:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "13100:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13085:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 863, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "12949:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 862, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "12934:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12934:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "12934:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12934:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 877, + "nodeType": "ExpressionStatement", + "src": "12934:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 885, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13234:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "13234:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 879, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "13184:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 878, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "13175:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13175:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "13175:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 882, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "13223:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "13223:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "13175:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13175:70:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 888, + "nodeType": "ExpressionStatement", + "src": "13175:70:0" + } + ] + }, + "documentation": { + "id": 824, + "nodeType": "StructuredDocumentation", + "src": "12136:252:0", + "text": " @notice Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the issuer of the supply token" + }, + "functionSelector": "6ad0cfe1", + "id": 890, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 832, + "modifierName": { + "id": 831, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "12527:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12527:12:0" + }, + { + "id": 834, + "modifierName": { + "id": 833, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "12549:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "12549:13:0" + } + ], + "name": "requestVoucherETHETH", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 830, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12509:8:0" + }, + "parameters": { + "id": 829, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 826, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 890, + "src": "12424:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 828, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 890, + "src": "12448:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12448:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12423:41:0" + }, + "returnParameters": { + "id": 835, + "nodeType": "ParameterList", + "parameters": [], + "src": "12568:0:0" + }, + "scope": 1594, + "src": "12394:859:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8546 + ], + "body": { + "id": 1053, + "nodeType": "Block", + "src": "13652:1889:0", + "statements": [{ + "assignments": [ + 919, + 921 + ], + "declarations": [{ + "constant": false, + "id": 919, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13664:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13664:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 921, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13679:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 920, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 928, + "initialValue": { + "arguments": [{ + "id": 926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "13762:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 923, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "13728:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 922, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13713:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13713:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "13713:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13713:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13663:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "id": 932, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "13812:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "id": 930, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 896, + "src": "13796:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "13796:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13796:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 934, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "13826:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13796:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13833:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 929, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "13788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13788:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "13788:50:0" + }, + { + "assignments": [ + 940 + ], + "declarations": [{ + "constant": false, + "id": 940, + "mutability": "mutable", + "name": "tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13867:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 939, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13867:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 947, + "initialValue": { + "arguments": [{ + "id": 945, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "13959:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 942, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "13923:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 941, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13908:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13908:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "13908:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13908:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13867:107:0" + }, + { + "assignments": [ + 949 + ], + "declarations": [{ + "constant": false, + "id": 949, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 1053, + "src": "13985:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 948, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13985:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 956, + "initialValue": { + "arguments": [{ + "id": 954, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "14099:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 951, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "14043:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 950, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "14028:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14028:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "14028:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14028:100:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13985:143:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 961, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14198:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14198:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 965, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14231:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14223:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 963, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14223:7:0", + "typeDescriptions": {} + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14223:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 967, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "14251:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 968, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "14271:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 969, + "name": "vPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 900, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 970, + "name": "rPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 902, + "src": "14315:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 971, + "name": "sPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 904, + "src": "14336:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 958, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "14158:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 957, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14141:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14141:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "14141:42:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14141:212:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 973, + "nodeType": "ExpressionStatement", + "src": "14141:212:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 978, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14423:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14423:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 982, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "14456:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14448:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 980, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14448:7:0", + "typeDescriptions": {} + } + }, + "id": 983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14448:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 984, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "14476:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 985, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "14500:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 986, + "name": "vDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "14523:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 987, + "name": "rDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 908, + "src": "14546:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 988, + "name": "sDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 910, + "src": "14569:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 975, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "14381:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 974, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14364:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "14364:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14364:224:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "14364:224:0" + }, + { + "expression": { + "arguments": [{ + "id": 995, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "14655:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 996, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 894, + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 997, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14706:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14706:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 999, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "14731:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "14752:28:0", + "subExpression": { + "baseExpression": { + "id": 1000, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "14752:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1003, + "indexExpression": { + "expression": { + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14767:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14767:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "14752:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 992, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "14616:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 991, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "14601:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14601:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "14601:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14601:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1006, + "nodeType": "ExpressionStatement", + "src": "14601:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1011, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "14867:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "14867:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1015, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "14900:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "14892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14892:7:0", + "typeDescriptions": {} + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14892:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1017, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "14930:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1008, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "14821:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1007, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14804:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14804:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "14804:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14804:142:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1019, + "nodeType": "ExpressionStatement", + "src": "14804:142:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1024, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15022:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15022:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1028, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "15055:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15047:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1026, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15047:7:0", + "typeDescriptions": {} + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15047:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1030, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "15085:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1021, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "14974:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1020, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "14957:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14957:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "14957:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14957:148:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1032, + "nodeType": "ExpressionStatement", + "src": "14957:148:0" + }, + { + "expression": { + "arguments": [{ + "id": 1037, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "15242:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1038, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15274:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1040, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "15299:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1034, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "15190:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1033, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "15181:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15181:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "15181:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1041, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15181:134:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1042, + "nodeType": "ExpressionStatement", + "src": "15181:134:0" + }, + { + "expression": { + "arguments": [{ + "id": 1047, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 949, + "src": "15454:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1048, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15488:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "15488:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1050, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "15513:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1044, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "15402:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1043, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "15393:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15393:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1046, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "15393:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15393:140:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1052, + "nodeType": "ExpressionStatement", + "src": "15393:140:0" + } + ] + }, + "functionSelector": "b2c076c8", + "id": 1054, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 914, + "modifierName": { + "id": 913, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "13625:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13625:12:0" + }, + { + "id": 916, + "modifierName": { + "id": 915, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "13638:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13638:13:0" + } + ], + "name": "requestVoucherTKNTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 912, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13616:8:0" + }, + "parameters": { + "id": 911, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 892, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13311:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 891, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13311:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 894, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13344:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 893, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13344:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 896, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13370:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 898, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13400:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 897, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13400:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 900, + "mutability": "mutable", + "name": "vPrice", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13427:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 899, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13427:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 902, + "mutability": "mutable", + "name": "rPrice", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13450:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 901, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13450:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 904, + "mutability": "mutable", + "name": "sPrice", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13475:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 903, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13475:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 906, + "mutability": "mutable", + "name": "vDeposit", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13514:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 905, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13514:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 908, + "mutability": "mutable", + "name": "rDeposit", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13539:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 907, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 910, + "mutability": "mutable", + "name": "sDeposit", + "nodeType": "VariableDeclaration", + "scope": 1054, + "src": "13566:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 909, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13566:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13300:306:0" + }, + "returnParameters": { + "id": 917, + "nodeType": "ParameterList", + "parameters": [], + "src": "13652:0:0" + }, + "scope": 1594, + "src": "13261:2280:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8563 + ], + "body": { + "id": 1178, + "nodeType": "Block", + "src": "15819:1493:0", + "statements": [{ + "assignments": [ + 1077, + 1079 + ], + "declarations": [{ + "constant": false, + "id": 1077, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "15831:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15831:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1079, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "15846:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15846:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1086, + "initialValue": { + "arguments": [{ + "id": 1084, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "15929:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1081, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "15895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1080, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "15880:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15880:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "15880:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15880:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15830:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [{ + "id": 1090, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1079, + "src": "15979:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "id": 1088, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "15963:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "15963:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15963:26:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1092, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1077, + "src": "15993:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15963:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4946", + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16000:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + }, + "value": "IF" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6cc1542ed8f42ab7cceb0f267192e09e9334fc1d3b63f32c20f5f6a824e74e8d", + "typeString": "literal_string \"IF\"" + } + ], + "id": 1087, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "15955:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15955:50:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1096, + "nodeType": "ExpressionStatement", + "src": "15955:50:0" + }, + { + "assignments": [ + 1098 + ], + "declarations": [{ + "constant": false, + "id": 1098, + "mutability": "mutable", + "name": "tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "16034:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1097, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16034:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1105, + "initialValue": { + "arguments": [{ + "id": 1103, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "16126:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1100, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "16090:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1099, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16075:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16075:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "16075:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16075:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16034:107:0" + }, + { + "assignments": [ + 1107 + ], + "declarations": [{ + "constant": false, + "id": 1107, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "16152:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16152:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1114, + "initialValue": { + "arguments": [{ + "id": 1112, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "16266:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1109, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "16210:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1108, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16195:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16195:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "16195:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16195:100:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16152:143:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1116, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "16316:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1117, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "16337:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "16316:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4943", + "id": 1119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16358:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_13794d5f98c0d01d86d683aa2c769457896afe87cf2603c8b50ce547494877e5", + "typeString": "literal_string \"IC\"" + }, + "value": "IC" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_13794d5f98c0d01d86d683aa2c769457896afe87cf2603c8b50ce547494877e5", + "typeString": "literal_string \"IC\"" + } + ], + "id": 1115, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "16308:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16308:55:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1121, + "nodeType": "ExpressionStatement", + "src": "16308:55:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1126, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16597:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1130, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "16630:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16622:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16622:7:0", + "typeDescriptions": {} + } + }, + "id": 1131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16622:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1132, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "16650:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1133, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "16676:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1134, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1064, + "src": "16699:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1135, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "16715:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1136, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1068, + "src": "16731:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 1123, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "16557:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1122, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "16540:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16540:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "16540:42:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16540:203:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1138, + "nodeType": "ExpressionStatement", + "src": "16540:203:0" + }, + { + "expression": { + "arguments": [{ + "id": 1143, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "16810:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1144, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1058, + "src": "16839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1145, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16861:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16861:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1147, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "16886:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "16907:28:0", + "subExpression": { + "baseExpression": { + "id": 1148, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "16907:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1151, + "indexExpression": { + "expression": { + "id": 1149, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16922:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16922:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16907:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1140, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "16771:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1139, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16756:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16756:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "16756:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16756:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1154, + "nodeType": "ExpressionStatement", + "src": "16756:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1159, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17022:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "17022:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1163, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "17055:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "17047:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1161, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17047:7:0", + "typeDescriptions": {} + } + }, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17047:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1165, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "17085:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1156, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "16976:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1155, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "16959:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16959:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "16959:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16959:148:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1167, + "nodeType": "ExpressionStatement", + "src": "16959:148:0" + }, + { + "expression": { + "arguments": [{ + "id": 1172, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1098, + "src": "17225:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1173, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17257:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "17257:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1175, + "name": "_tokensSent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1060, + "src": "17282:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1169, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "17173:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1168, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "17164:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17164:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "17164:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1176, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17164:140:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1177, + "nodeType": "ExpressionStatement", + "src": "17164:140:0" + } + ] + }, + "functionSelector": "1a245b8e", + "id": 1179, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1072, + "modifierName": { + "id": 1071, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "15792:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15792:12:0" + }, + { + "id": 1074, + "modifierName": { + "id": 1073, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "15805:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "15805:13:0" + } + ], + "name": "requestVoucherTKNTKNSameWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1070, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15783:8:0" + }, + "parameters": { + "id": 1069, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1056, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15603:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15603:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1058, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15636:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1057, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15636:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1060, + "mutability": "mutable", + "name": "_tokensSent", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15662:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1059, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15662:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1062, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15692:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1064, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15719:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1063, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "15719:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1066, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15737:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1065, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15737:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1068, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1179, + "src": "15757:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1067, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15757:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "15592:181:0" + }, + "returnParameters": { + "id": 1075, + "nodeType": "ParameterList", + "parameters": [], + "src": "15819:0:0" + }, + "scope": 1594, + "src": "15549:1763:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8580 + ], + "body": { + "id": 1303, + "nodeType": "Block", + "src": "17597:1542:0", + "statements": [{ + "assignments": [ + 1202, + 1204 + ], + "declarations": [{ + "constant": false, + "id": 1202, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "17609:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1201, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1204, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "17624:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17624:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1211, + "initialValue": { + "arguments": [{ + "id": 1209, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "17707:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1206, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "17673:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1205, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "17658:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17658:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "17658:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17658:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17608:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1213, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1202, + "src": "17741:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1214, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "17750:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "17750:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17741:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4950", + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + }, + "value": "IP" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + } + ], + "id": 1212, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "17733:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17733:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1219, + "nodeType": "ExpressionStatement", + "src": "17733:33:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1221, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "17893:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1222, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "17906:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17893:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4944", + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17922:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + }, + "value": "ID" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + } + ], + "id": 1220, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "17885:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17885:42:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1226, + "nodeType": "ExpressionStatement", + "src": "17885:42:0" + }, + { + "assignments": [ + 1228 + ], + "declarations": [{ + "constant": false, + "id": 1228, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 1303, + "src": "18051:27:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18051:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1235, + "initialValue": { + "arguments": [{ + "id": 1233, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "18165:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1230, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "18109:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1229, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "18094:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18094:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "18094:52:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18094:100:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "18051:143:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1240, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18264:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18264:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1244, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "18297:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 1243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18289:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1242, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18289:7:0", + "typeDescriptions": {} + } + }, + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18289:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1246, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "18317:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1247, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1187, + "src": "18346:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1248, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1189, + "src": "18369:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1249, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1191, + "src": "18385:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1250, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1193, + "src": "18401:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 1237, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "18222:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1236, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "18205:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18205:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "18205:44:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18205:208:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1252, + "nodeType": "ExpressionStatement", + "src": "18205:208:0" + }, + { + "expression": { + "arguments": [{ + "id": 1257, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "18480:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1258, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1183, + "src": "18509:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1259, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18531:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1261, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "18556:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18577:28:0", + "subExpression": { + "baseExpression": { + "id": 1262, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "18577:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1265, + "indexExpression": { + "expression": { + "id": 1263, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18592:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18592:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18577:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1254, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "18441:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1253, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "18426:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18426:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "18426:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18426:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1268, + "nodeType": "ExpressionStatement", + "src": "18426:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1273, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18694:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18694:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1277, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "18727:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "18719:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1275, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18719:7:0", + "typeDescriptions": {} + } + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18719:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1279, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "18757:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1270, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "18646:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1269, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "18629:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18629:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "18629:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18629:153:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1281, + "nodeType": "ExpressionStatement", + "src": "18629:153:0" + }, + { + "expression": { + "arguments": [{ + "id": 1286, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "18900:19:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1287, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18934:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18934:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1289, + "name": "_tokensDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1185, + "src": "18959:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1283, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "18848:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1282, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "18839:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18839:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "18839:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18839:145:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1291, + "nodeType": "ExpressionStatement", + "src": "18839:145:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1299, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19108:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "19108:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 1293, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "19044:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1292, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "19035:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19035:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "19035:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 1298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 1296, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19083:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "19083:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "19035:58:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19035:94:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1302, + "nodeType": "ExpressionStatement", + "src": "19035:94:0" + } + ] + }, + "functionSelector": "92fcbdc1", + "id": 1304, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1197, + "modifierName": { + "id": 1196, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "17570:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17570:12:0" + }, + { + "id": 1199, + "modifierName": { + "id": 1198, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "17583:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17583:13:0" + } + ], + "name": "requestVoucherETHTKNWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1195, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17561:8:0" + }, + "parameters": { + "id": 1194, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1181, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17370:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1183, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17403:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1182, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17403:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1185, + "mutability": "mutable", + "name": "_tokensDeposit", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17429:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1184, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17429:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1187, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17462:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17462:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1189, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17489:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1188, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "17489:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1191, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17507:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1190, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17507:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1193, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "17527:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1192, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "17527:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "17359:184:0" + }, + "returnParameters": { + "id": 1200, + "nodeType": "ParameterList", + "parameters": [], + "src": "17597:0:0" + }, + "scope": 1594, + "src": "17320:1819:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8597 + ], + "body": { + "id": 1428, + "nodeType": "Block", + "src": "19422:1444:0", + "statements": [{ + "assignments": [ + 1327, + 1329 + ], + "declarations": [{ + "constant": false, + "id": 1327, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 1428, + "src": "19434:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1326, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 1428, + "src": "19449:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19449:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1336, + "initialValue": { + "arguments": [{ + "id": 1334, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "19532:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1331, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "19498:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1330, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "19483:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19483:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "19483:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19483:64:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19433:114:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1338, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "19566:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1339, + "name": "_tokensPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "19575:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19566:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4950", + "id": 1341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + }, + "value": "IP" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ea7cc243c1adfefd7098535f6043322da9c8a0b78273c80a6b325a47c98cb9b3", + "typeString": "literal_string \"IP\"" + } + ], + "id": 1337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "19558:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19558:36:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1343, + "nodeType": "ExpressionStatement", + "src": "19558:36:0" + }, + { + "expression": { + "arguments": [{ + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1345, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "19721:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 1346, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "19734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "19734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19721:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4944", + "id": 1349, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19745:4:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + }, + "value": "ID" + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0783b66b75b3ec46e8e9e7694059adf60d701de8fbaa12f566a6b52c64f77f90", + "typeString": "literal_string \"ID\"" + } + ], + "id": 1344, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [-18, -18], + "referencedDeclaration": -18, + "src": "19713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19713:37:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1351, + "nodeType": "ExpressionStatement", + "src": "19713:37:0" + }, + { + "assignments": [ + 1353 + ], + "declarations": [{ + "constant": false, + "id": 1353, + "mutability": "mutable", + "name": "tokenPriceAddress", + "nodeType": "VariableDeclaration", + "scope": 1428, + "src": "19874:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1352, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19874:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "id": 1360, + "initialValue": { + "arguments": [{ + "id": 1358, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "19966:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }], + "expression": { + "arguments": [{ + "id": 1355, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "19930:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1354, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "19915:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19915:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "19915:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 1359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19915:66:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19874:107:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1365, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20049:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20049:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1369, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "20082:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_contract$_BosonRouter_$1594", + "typeString": "contract BosonRouter" + }], + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20074:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1367, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20074:7:0", + "typeDescriptions": {} + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20074:13:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1371, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "20102:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1372, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1312, + "src": "20122:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1373, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1314, + "src": "20145:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1374, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1316, + "src": "20161:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1375, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1318, + "src": "20177:1:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "arguments": [{ + "id": 1362, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "20009:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1361, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "19992:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19992:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "permit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9123, + "src": "19992:42:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint8,bytes32,bytes32) external" + } + }, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19992:197:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1377, + "nodeType": "ExpressionStatement", + "src": "19992:197:0" + }, + { + "expression": { + "arguments": [{ + "id": 1382, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "20256:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1383, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "20285:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1384, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20307:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20307:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1386, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "20332:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "20353:28:0", + "subExpression": { + "baseExpression": { + "id": 1387, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "20353:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1390, + "indexExpression": { + "expression": { + "id": 1388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20368:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20368:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20353:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1379, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "20217:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1378, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "20202:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20202:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "fillOrder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9400, + "src": "20202:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (uint256,address,address,uint8,uint256) external" + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20202:190:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1393, + "nodeType": "ExpressionStatement", + "src": "20202:190:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1398, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20468:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20468:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [{ + "id": 1402, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "20501:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20493:7:0", + "typeDescriptions": {} + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20493:23:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1404, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "20531:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1395, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "20422:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1394, + "name": "IERC20WithPermit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9124, + "src": "20405:16:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20WithPermit_$9124_$", + "typeString": "type(contract IERC20WithPermit)" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20405:35:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20WithPermit_$9124", + "typeString": "contract IERC20WithPermit" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 9089, + "src": "20405:48:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20405:142:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1406, + "nodeType": "ExpressionStatement", + "src": "20405:142:0" + }, + { + "expression": { + "arguments": [{ + "id": 1411, + "name": "tokenPriceAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "20665:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1412, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20697:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20697:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1414, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "20722:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [{ + "id": 1408, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "20613:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1407, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "20604:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20604:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowTokensAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8715, + "src": "20604:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20604:134:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1416, + "nodeType": "ExpressionStatement", + "src": "20604:134:0" + }, + { + "expression": { + "arguments": [{ + "expression": { + "id": 1424, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "20847:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }], + "expression": { + "arguments": [{ + "id": 1418, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "20798:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1417, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "20789:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20789:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "addEscrowAmount", + "nodeType": "MemberAccess", + "referencedDeclaration": 8705, + "src": "20789:40:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$", + "typeString": "function (address) payable external" + } + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [{ + "expression": { + "id": 1421, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "20836:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "20836:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }], + "src": "20789:57:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_payable$_t_address_$returns$__$value", + "typeString": "function (address) payable external" + } + }, + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20789:69:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1427, + "nodeType": "ExpressionStatement", + "src": "20789:69:0" + } + ] + }, + "functionSelector": "ad7f0493", + "id": 1429, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1322, + "modifierName": { + "id": 1321, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "19395:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19395:12:0" + }, + { + "id": 1324, + "modifierName": { + "id": 1323, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19408:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19408:13:0" + } + ], + "name": "requestVoucherTKNETHWithPermit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1320, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19386:8:0" + }, + "parameters": { + "id": 1319, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19197:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1305, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19197:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1308, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19230:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1307, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19230:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1310, + "mutability": "mutable", + "name": "_tokensPrice", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19256:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19256:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1312, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19287:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1311, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19287:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1314, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19314:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1313, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "19314:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1316, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19332:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1315, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19332:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1318, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 1429, + "src": "19352:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1317, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "19352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "19186:182:0" + }, + "returnParameters": { + "id": 1325, + "nodeType": "ParameterList", + "parameters": [], + "src": "19422:0:0" + }, + "scope": 1594, + "src": "19147:1719:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8603 + ], + "body": { + "id": 1467, + "nodeType": "Block", + "src": "21315:380:0", + "statements": [{ + "assignments": [ + 1441 + ], + "declarations": [{ + "constant": false, + "id": 1441, + "mutability": "mutable", + "name": "_burnedSupplyQty", + "nodeType": "VariableDeclaration", + "scope": 1467, + "src": "21326:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1440, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21326:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "id": 1450, + "initialValue": { + "arguments": [{ + "id": 1446, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1432, + "src": "21438:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1447, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21471:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21471:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1443, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "21381:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1442, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "21366:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21366:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelOrFaultVoucherSet", + "nodeType": "MemberAccess", + "referencedDeclaration": 9386, + "src": "21366:53:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) external returns (uint256)" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21366:130:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "21326:170:0" + }, + { + "expression": { + "arguments": [{ + "id": 1455, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1432, + "src": "21565:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1456, + "name": "_burnedSupplyQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "21594:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1457, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21625:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21625:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1452, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "21516:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1451, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "21507:8:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21507:24:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawDepositsSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 8691, + "src": "21507:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_address_payable_$returns$__$", + "typeString": "function (uint256,uint256,address payable) external" + } + }, + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21507:139:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1460, + "nodeType": "ExpressionStatement", + "src": "21507:139:0" + }, + { + "expression": { + "id": 1465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "21659:28:0", + "subExpression": { + "baseExpression": { + "id": 1461, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "21659:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1464, + "indexExpression": { + "expression": { + "id": 1462, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21674:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21674:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "21659:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1466, + "nodeType": "ExpressionStatement", + "src": "21659:28:0" + } + ] + }, + "documentation": { + "id": 1430, + "nodeType": "StructuredDocumentation", + "src": "20874:285:0", + "text": " @notice Seller burns the remaining supply in case it's no longer in exchange and withdrawal of the locked deposits for them are being sent back.\n @param _tokenIdSupply an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for" + }, + "functionSelector": "0bd74705", + "id": 1468, + "implemented": true, + "kind": "function", + "modifiers": [{ + "id": 1436, + "modifierName": { + "id": 1435, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "21274:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21274:12:0" + }, + { + "id": 1438, + "modifierName": { + "id": 1437, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21296:13:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21296:13:0" + } + ], + "name": "requestCancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21256:8:0" + }, + "parameters": { + "id": 1433, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 1468, + "src": "21205:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21205:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "21204:24:0" + }, + "returnParameters": { + "id": 1439, + "nodeType": "ParameterList", + "parameters": [], + "src": "21315:0:0" + }, + "scope": 1594, + "src": "21165:530:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8609 + ], + "body": { + "id": 1484, + "nodeType": "Block", + "src": "21882:84:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1479, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1471, + "src": "21930:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1480, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21947:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21947:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1476, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "21908:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1475, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "21893:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21893:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "redeem", + "nodeType": "MemberAccess", + "referencedDeclaration": 9352, + "src": "21893:36:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21893:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1483, + "nodeType": "ExpressionStatement", + "src": "21893:65:0" + }] + }, + "documentation": { + "id": 1469, + "nodeType": "StructuredDocumentation", + "src": "21703:114:0", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "db006a75", + "id": 1485, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1473, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21873:8:0" + }, + "parameters": { + "id": 1472, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1471, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "21839:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1470, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "21838:25:0" + }, + "returnParameters": { + "id": 1474, + "nodeType": "ParameterList", + "parameters": [], + "src": "21882:0:0" + }, + "scope": 1594, + "src": "21823:143:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8615 + ], + "body": { + "id": 1501, + "nodeType": "Block", + "src": "22138:84:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1496, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "22186:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1497, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22203:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22203:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1493, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "22164:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1492, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22149:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22149:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "refund", + "nodeType": "MemberAccess", + "referencedDeclaration": 9360, + "src": "22149:36:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22149:65:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1500, + "nodeType": "ExpressionStatement", + "src": "22149:65:0" + }] + }, + "documentation": { + "id": 1486, + "nodeType": "StructuredDocumentation", + "src": "21974:99:0", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "278ecde1", + "id": 1502, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1490, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22129:8:0" + }, + "parameters": { + "id": 1489, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1488, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1502, + "src": "22095:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1487, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22095:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "22094:25:0" + }, + "returnParameters": { + "id": 1491, + "nodeType": "ParameterList", + "parameters": [], + "src": "22138:0:0" + }, + "scope": 1594, + "src": "22079:143:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8621 + ], + "body": { + "id": 1518, + "nodeType": "Block", + "src": "22407:86:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1513, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1505, + "src": "22457:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1514, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22474:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22474:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1510, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "22433:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1509, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22418:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22418:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "complain", + "nodeType": "MemberAccess", + "referencedDeclaration": 9368, + "src": "22418:38:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22418:67:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1517, + "nodeType": "ExpressionStatement", + "src": "22418:67:0" + }] + }, + "documentation": { + "id": 1503, + "nodeType": "StructuredDocumentation", + "src": "22230:110:0", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "284f0923", + "id": 1519, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1507, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22398:8:0" + }, + "parameters": { + "id": 1506, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1505, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1519, + "src": "22364:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22364:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "22363:25:0" + }, + "returnParameters": { + "id": 1508, + "nodeType": "ParameterList", + "parameters": [], + "src": "22407:0:0" + }, + "scope": 1594, + "src": "22346:147:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8627 + ], + "body": { + "id": 1535, + "nodeType": "Block", + "src": "22740:128:0", + "statements": [{ + "expression": { + "arguments": [{ + "id": 1530, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1522, + "src": "22809:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1531, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "22839:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "22839:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "arguments": [{ + "id": 1527, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "22766:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }], + "expression": { + "argumentTypes": [{ + "typeIdentifier": "t_address", + "typeString": "address" + }], + "id": 1526, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22751:14:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22751:29:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelOrFault", + "nodeType": "MemberAccess", + "referencedDeclaration": 9376, + "src": "22751:43:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22751:109:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1534, + "nodeType": "ExpressionStatement", + "src": "22751:109:0" + }] + }, + "documentation": { + "id": 1520, + "nodeType": "StructuredDocumentation", + "src": "22501:167:0", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "765e0fb8", + "id": 1536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1524, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "22731:8:0" + }, + "parameters": { + "id": 1523, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1522, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1536, + "src": "22697:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1521, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "22696:25:0" + }, + "returnParameters": { + "id": 1525, + "nodeType": "ParameterList", + "parameters": [], + "src": "22740:0:0" + }, + "scope": 1594, + "src": "22674:194:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8633 + ], + "body": { + "id": 1548, + "nodeType": "Block", + "src": "23104:44:0", + "statements": [{ + "expression": { + "id": 1546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "23116:24:0", + "subExpression": { + "baseExpression": { + "id": 1543, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "23116:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1545, + "indexExpression": { + "id": 1544, + "name": "_party", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1539, + "src": "23131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "23116:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1547, + "nodeType": "ExpressionStatement", + "src": "23116:24:0" + }] + }, + "documentation": { + "id": 1537, + "nodeType": "StructuredDocumentation", + "src": "22876:132:0", + "text": " @notice Increment a seller or buyer's correlation Id\n @param _party The address of the seller or buyer" + }, + "functionSelector": "7ff97ac1", + "id": 1549, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "incrementCorrelationId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1541, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23090:8:0" + }, + "parameters": { + "id": 1540, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1539, + "mutability": "mutable", + "name": "_party", + "nodeType": "VariableDeclaration", + "scope": 1549, + "src": "23046:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1538, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23046:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "23045:16:0" + }, + "returnParameters": { + "id": 1542, + "nodeType": "ParameterList", + "parameters": [], + "src": "23104:0:0" + }, + "scope": 1594, + "src": "23014:134:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8641 + ], + "body": { + "id": 1562, + "nodeType": "Block", + "src": "23469:48:0", + "statements": [{ + "expression": { + "baseExpression": { + "id": 1558, + "name": "correlationIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "23487:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1560, + "indexExpression": { + "id": 1559, + "name": "_party", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1552, + "src": "23502:6:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23487:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1557, + "id": 1561, + "nodeType": "Return", + "src": "23480:29:0" + }] + }, + "documentation": { + "id": 1550, + "nodeType": "StructuredDocumentation", + "src": "23156:182:0", + "text": " @notice Return a seller or buyer's correlation Id\n @param _party The address of the seller or buyer\n @return the specified party's correlation Id" + }, + "functionSelector": "0353b31e", + "id": 1563, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCorrelationId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1554, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23414:8:0" + }, + "parameters": { + "id": 1553, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1552, + "mutability": "mutable", + "name": "_party", + "nodeType": "VariableDeclaration", + "scope": 1563, + "src": "23370:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23370:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "23369:16:0" + }, + "returnParameters": { + "id": 1557, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1556, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1563, + "src": "23455:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1555, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23455:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }], + "src": "23454:9:0" + }, + "scope": 1594, + "src": "23344:173:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8647 + ], + "body": { + "id": 1572, + "nodeType": "Block", + "src": "23752:40:0", + "statements": [{ + "expression": { + "id": 1570, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "23770:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1569, + "id": 1571, + "nodeType": "Return", + "src": "23763:21:0" + }] + }, + "documentation": { + "id": 1564, + "nodeType": "StructuredDocumentation", + "src": "23525:107:0", + "text": " @notice Get the address of Cashier contract\n @return Address of Cashier address" + }, + "functionSelector": "f9d93099", + "id": 1573, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1566, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "23711:8:0" + }, + "parameters": { + "id": 1565, + "nodeType": "ParameterList", + "parameters": [], + "src": "23664:2:0" + }, + "returnParameters": { + "id": 1569, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1568, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1573, + "src": "23738:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23738:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "23737:9:0" + }, + "scope": 1594, + "src": "23638:154:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8653 + ], + "body": { + "id": 1582, + "nodeType": "Block", + "src": "24049:39:0", + "statements": [{ + "expression": { + "id": 1580, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "24067:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1579, + "id": 1581, + "nodeType": "Return", + "src": "24060:20:0" + }] + }, + "documentation": { + "id": 1574, + "nodeType": "StructuredDocumentation", + "src": "23801:122:0", + "text": " @notice Get the address of Voucher Kernel contract\n @return Address of Voucher Kernel contract" + }, + "functionSelector": "e3f5d2d5", + "id": 1583, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1576, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "24008:8:0" + }, + "parameters": { + "id": 1575, + "nodeType": "ParameterList", + "parameters": [], + "src": "23961:2:0" + }, + "returnParameters": { + "id": 1579, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1578, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1583, + "src": "24035:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24035:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "24034:9:0" + }, + "scope": 1594, + "src": "23929:159:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8659 + ], + "body": { + "id": 1592, + "nodeType": "Block", + "src": "24354:42:0", + "statements": [{ + "expression": { + "id": 1590, + "name": "fundLimitsOracle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "24372:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1589, + "id": 1591, + "nodeType": "Return", + "src": "24365:23:0" + }] + }, + "documentation": { + "id": 1584, + "nodeType": "StructuredDocumentation", + "src": "24096:130:0", + "text": " @notice Get the address of Fund Limits Oracle contract\n @return Address of Fund Limits Oracle contract" + }, + "functionSelector": "17d001b0", + "id": 1593, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getFundLimitOracleAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1586, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "24313:8:0" + }, + "parameters": { + "id": 1585, + "nodeType": "ParameterList", + "parameters": [], + "src": "24266:2:0" + }, + "returnParameters": { + "id": 1589, + "nodeType": "ParameterList", + "parameters": [{ + "constant": false, + "id": 1588, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1593, + "src": "24340:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1587, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24340:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }], + "src": "24339:9:0" + }, + "scope": 1594, + "src": "24232:164:0", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1595, + "src": "687:23712:0" + } + ], + "src": "47:24354:0" + }, + "compiler": { + "name": "solc", + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0x306fc6597e2ee1311ae9c98a7cb35eefa1fb5eccecc259e85185cb2aaf157146": { + "anonymous": false, + "inputs": [{ + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_paymentType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogOrderCreated", + "type": "event" + }, + "0x7b81c5e3a8e5647e11ccd172baaaf534f02cb16cd563be7c3c70c9354215bdb1": { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "_newTokenContract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogTokenContractSet", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [{ + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }], + "name": "Paused", + "type": "event" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }], + "name": "Unpaused", + "type": "event" + } + }, + "links": {}, + "address": "0x8404F2b224770cBfdaB8d074Fbe3e9212ABF7F12", + "transactionHash": "0xef863b13fde513b542662ff5bf58540cb35f2efd6203dcfde4dc6f88460d748b" + }, + "5777": { + "events": { + "0x306fc6597e2ee1311ae9c98a7cb35eefa1fb5eccecc259e85185cb2aaf157146": { + "anonymous": false, + "inputs": [{ + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_paymentType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogOrderCreated", + "type": "event", + "signature": "0x306fc6597e2ee1311ae9c98a7cb35eefa1fb5eccecc259e85185cb2aaf157146" + }, + "0x7b81c5e3a8e5647e11ccd172baaaf534f02cb16cd563be7c3c70c9354215bdb1": { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "_newTokenContract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogTokenContractSet", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [{ + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }], + "name": "Paused", + "type": "event", + "signature": "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [{ + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }], + "name": "Unpaused", + "type": "event", + "signature": "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa" + } + }, + "links": {}, + "address": "0x81554F12c4A47bB420D5e5D51F0a8f9837Fe79C3", + "transactionHash": "0xa8a438c3d0f8029284114ac6d0b42fe4ed962297574afe6b325806ec6b301264" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T10:31:40.149Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": { + "cancelOrFault(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "complain(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "getCashierAddress()": { + "returns": { + "_0": "Address of Cashier address" + } + }, + "getCorrelationId(address)": { + "params": { + "_party": "The address of the seller or buyer" + }, + "returns": { + "_0": "the specified party's correlation Id" + } + }, + "getFundLimitOracleAddress()": { + "returns": { + "_0": "Address of Fund Limits Oracle contract" + } + }, + "getVoucherKernelAddress()": { + "returns": { + "_0": "Address of Voucher Kernel contract" + } + }, + "incrementCorrelationId(address)": { + "params": { + "_party": "The address of the seller or buyer" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "redeem(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "refund(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "requestCancelOrFaultVoucherSet(uint256)": { + "params": { + "_tokenIdSupply": "an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for" + } + }, + "requestCreateOrderETHETH(uint256[])": { + "params": { + "metadata": "metadata which is required for creation of a voucher Metadata array is used as in some scenarios we need several more params, as we need to recover owner address in order to permit the contract to transfer funds on his behalf. Since the params get too many, we end up in situation that the stack is too deep. uint256 _validFrom = metadata[0]; uint256 _validTo = metadata[1]; uint256 _price = metadata[2]; uint256 _depositSe = metadata[3]; uint256 _depositBu = metadata[4]; uint256 _quantity = metadata[5];" + } + }, + "requestVoucherETHETH(uint256,address)": { + "params": { + "_issuer": "Address of the issuer of the supply token", + "_tokenIdSupply": "ID of the supply token" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "Contract for interacting with Boson Protocol from the user's perspective.", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelOrFault(uint256)": { + "notice": "Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal" + }, + "complain(uint256)": { + "notice": "Issue a complain for a voucher" + }, + "getCashierAddress()": { + "notice": "Get the address of Cashier contract" + }, + "getCorrelationId(address)": { + "notice": "Return a seller or buyer's correlation Id" + }, + "getFundLimitOracleAddress()": { + "notice": "Get the address of Fund Limits Oracle contract" + }, + "getVoucherKernelAddress()": { + "notice": "Get the address of Voucher Kernel contract" + }, + "incrementCorrelationId(address)": { + "notice": "Increment a seller or buyer's correlation Id" + }, + "pause()": { + "notice": "Pause the Cashier && the Voucher Kernel contracts in case of emergency. All functions related to creating new batch, requestVoucher or withdraw will be paused, hence cannot be executed. There is special function for withdrawing funds if contract is paused." + }, + "redeem(uint256)": { + "notice": "Redemption of the vouchers promise" + }, + "refund(uint256)": { + "notice": "Refunding a voucher" + }, + "requestCancelOrFaultVoucherSet(uint256)": { + "notice": "Seller burns the remaining supply in case it's no longer in exchange and withdrawal of the locked deposits for them are being sent back." + }, + "requestCreateOrderETHETH(uint256[])": { + "notice": "Issuer/Seller offers promises as supply tokens and needs to escrow the deposit" + }, + "requestVoucherETHETH(uint256,address)": { + "notice": "Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return" + }, + "unpause()": { + "notice": "Unpause the Cashier && the Voucher Kernel contracts. All functions related to creating new batch, requestVoucher or withdraw will be unpaused." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/external/keepers/src/abis/ERC1155ERC721.json b/external/keepers/src/abis/ERC1155ERC721.json new file mode 100644 index 00000000..7c296ff5 --- /dev/null +++ b/external/keepers/src/abis/ERC1155ERC721.json @@ -0,0 +1,43943 @@ +{ + "contractName": "ERC1155ERC721", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newVoucherKernel", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogVoucherKernelSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_approve", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "mintBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "burnBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_newBase", + "type": "string" + } + ], + "name": "_setMetadataBase", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_newRoute", + "type": "string" + } + ], + "name": "_set1155Route", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_newRoute", + "type": "string" + } + ], + "name": "_set721Route", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_voucherKernelAddress", + "type": "address" + } + ], + "name": "setVoucherKernelAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_cashierAddress", + "type": "address" + } + ], + "name": "setCashierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVoucherKernelAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCashierAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newCashier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCashierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newVoucherKernel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogVoucherKernelSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_newRoute\",\"type\":\"string\"}],\"name\":\"_set1155Route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_newRoute\",\"type\":\"string\"}],\"name\":\"_set721Route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_newBase\",\"type\":\"string\"}],\"name\":\"_setMetadataBase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"burnBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCashierAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVoucherKernelAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approve\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_cashierAddress\",\"type\":\"address\"}],\"name\":\"setCashierAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voucherKernelAddress\",\"type\":\"address\"}],\"name\":\"setVoucherKernelAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"_set1155Route(string)\":{\"params\":{\"_newRoute\":\"New route to be used\"}},\"_set721Route(string)\":{\"params\":{\"_newRoute\":\"New route to be used\"}},\"_setMetadataBase(string)\":{\"params\":{\"_newBase\":\"New prefix to be used\"}},\"approve(address,uint256)\":{\"details\":\"ERC-721\",\"params\":{\"_to\":\"address to be approved for the given token ID\",\"_tokenId\":\"uint256 ID of the token to be approved\"}},\"balanceOf(address)\":{\"details\":\"ERC-721\",\"params\":{\"_owner\":\"An address for whom to query the balance\"},\"returns\":{\"_0\":\"The number of NFTs owned by `_owner`, possibly zero\"}},\"balanceOf(address,uint256)\":{\"details\":\"ERC-1155\",\"params\":{\"_account\":\"The address of the token holder\",\"_tokenId\":\"ID of the token\"},\"returns\":{\"_0\":\"balance\"}},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"ERC-1155\",\"params\":{\"_accounts\":\"The addresses of the token holders\",\"_tokenIds\":\"IDs of the tokens\"},\"returns\":{\"_0\":\"balances\"}},\"burn(address,uint256,uint256)\":{\"details\":\"ERC-1155\",\"params\":{\"_account\":\"Account which owns the token\",\"_tokenId\":\"ID of the token\",\"_value\":\"Amount of the token\"}},\"burnBatch(address,uint256[],uint256[])\":{\"details\":\"ERC-1155\",\"params\":{\"_account\":\"Account which owns the token\",\"_tokenIds\":\"IDs of the tokens\",\"_values\":\"Amounts of the tokens\"}},\"getApproved(uint256)\":{\"details\":\"ERC-721\",\"params\":{\"_tokenId\":\"uint256 ID of the token to query the approval of\"},\"returns\":{\"_0\":\"address currently approved for the given token ID\"}},\"getCashierAddress()\":{\"returns\":{\"_0\":\"Address of Cashier address\"}},\"getOwner()\":{\"returns\":{\"_0\":\"Address of the owner\"}},\"getVoucherKernelAddress()\":{\"returns\":{\"_0\":\"Address of Voucher Kernel contract\"}},\"isApprovedForAll(address,address)\":{\"details\":\"ERC-1155 & ERC-721\",\"params\":{\"_account\":\"token holder\",\"_operator\":\"operator to check\"},\"returns\":{\"_0\":\"True if the operator is approved, false if not\"}},\"mint(address,uint256)\":{\"details\":\"ERC-721\",\"params\":{\"to\":\"The address that will receive the minted tokens.\",\"tokenId\":\"The token id to mint.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"mint(address,uint256,uint256,bytes)\":{\"details\":\"ERC-1155\",\"params\":{\"_data\":\"Additional data forwarded to onERC1155BatchReceived if _to is a contract\",\"_to\":\"owner of the minted token\",\"_tokenId\":\"ID of the token to be minted\",\"_value\":\"Amount of the token to be minted\"}},\"mintBatch(address,uint256[],uint256[],bytes)\":{\"details\":\"ERC-1155\",\"params\":{\"_data\":\"Additional data forwarded to onERC1155BatchReceived if _to is a contract\",\"_to\":\"The address that will own the minted token\",\"_tokenIds\":\"IDs of the tokens to be minted\",\"_values\":\"Amounts of the tokens to be minted\"}},\"name()\":{\"details\":\"ERC-721\"},\"ownerOf(uint256)\":{\"details\":\"ERC-721\",\"params\":{\"_tokenId\":\"uint256 ID of the token to query the owner of\"},\"returns\":{\"_0\":\"address currently marked as the owner of the given token ID\"}},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"ERC-1155\",\"params\":{\"_data\":\"Additional data forwarded to onERC1155BatchReceived if _to is a contract\",\"_from\":\"Source address\",\"_to\":\"Destination address\",\"_tokenIds\":\"array of token IDs\",\"_values\":\"array of transfer amounts\"}},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"ERC-721\",\"params\":{\"_from\":\"current owner of the token\",\"_to\":\"address to receive the ownership of the given token ID\",\"_tokenId\":\"uint256 ID of the token to be transferred\"}},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"ERC-721\",\"params\":{\"_data\":\"bytes data to send along with a safe transfer check\",\"_from\":\"current owner of the token\",\"_to\":\"address to receive the ownership of the given token ID\",\"_tokenId\":\"uint256 ID of the token to be transferred\"}},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"ERC-1155\",\"params\":{\"_data\":\"Additional data forwarded to onERC1155Received if _to is a contract\",\"_from\":\"Source address\",\"_to\":\"Destination address\",\"_tokenId\":\"ID of the token\",\"_value\":\"Transfer amount\"}},\"setApprovalForAll(address,bool)\":{\"details\":\"ERC-1155 & ERC-721\",\"params\":{\"_approve\":\"flag to set or unset\",\"_operator\":\"to (un)approve\"}},\"setCashierAddress(address)\":{\"params\":{\"_cashierAddress\":\"The Cashier contract\"}},\"setVoucherKernelAddress(address)\":{\"params\":{\"_voucherKernelAddress\":\"The address of the Voucher Kernel contract\"}},\"symbol()\":{\"details\":\"ERC-721\"},\"tokenURI(uint256)\":{\"details\":\"ERC-721 Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC 3986. The URI may point to a JSON file that conforms to the \\\"ERC721 Metadata JSON Schema\\\".\",\"params\":{\"_tokenId\":\"ID of the token\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"ERC-721\",\"params\":{\"_from\":\"current owner of the token\",\"_to\":\"address to receive the ownership of the given token ID\",\"_tokenId\":\"uint256 ID of the token to be transferred\"}},\"uri(uint256)\":{\"details\":\"ERC-1155 URIs are defined in RFC 3986. The URI MUST point to a JSON file that conforms to the \\\"ERC-1155 Metadata URI JSON Schema\\\".\",\"params\":{\"_tokenId\":\"The ID of the token\"},\"returns\":{\"_0\":\"Full URI string for metadata of the _tokenId\"}}},\"title\":\"Multi-token contract, implementing ERC-1155 and ERC-721 hybrid Inspired by: https://github.com/pixowl/sandbox-smart-contracts\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"_set1155Route(string)\":{\"notice\":\"Setting the URL route for ERC1155 tokens metadata\"},\"_set721Route(string)\":{\"notice\":\"Setting the URL route for ERC721 tokens metadata\"},\"_setMetadataBase(string)\":{\"notice\":\"Setting the URL prefix for tokens metadata\"},\"approve(address,uint256)\":{\"notice\":\"Approves another address to transfer the given token ID The zero address indicates there is no approved address. There can only be one approved address per token at a given time. Can only be called by the token owner or an approved operator.\"},\"balanceOf(address)\":{\"notice\":\"Count all NFTs assigned to an owner\"},\"balanceOf(address,uint256)\":{\"notice\":\"Get the balance of tokens of an account\"},\"balanceOfBatch(address[],uint256[])\":{\"notice\":\"Get the balance of account-token pairs.\"},\"burn(address,uint256,uint256)\":{\"notice\":\"Burn an amount of tokens with the given ID\"},\"burnBatch(address,uint256[],uint256[])\":{\"notice\":\"Batch burn an amounts of tokens\"},\"getApproved(uint256)\":{\"notice\":\"Gets the approved address for a token ID, or zero if no address set Reverts if the token ID does not exist.\"},\"getCashierAddress()\":{\"notice\":\"Get the address of Cashier contract\"},\"getOwner()\":{\"notice\":\"Get the contract owner\"},\"getVoucherKernelAddress()\":{\"notice\":\"Get the address of Voucher Kernel contract\"},\"isApprovedForAll(address,address)\":{\"notice\":\"Gets approval status of an operator for a given account.\"},\"mint(address,uint256)\":{\"notice\":\"Function to mint tokens.\"},\"mint(address,uint256,uint256,bytes)\":{\"notice\":\"Mint an amount of a desired token Currently no restrictions as to who is allowed to mint - so, it is public.\"},\"mintBatch(address,uint256[],uint256[],bytes)\":{\"notice\":\"Batch minting of tokens Currently no restrictions as to who is allowed to mint - so, it is public.\"},\"name()\":{\"notice\":\"A descriptive name for a collection of NFTs in this contract\"},\"ownerOf(uint256)\":{\"notice\":\"Gets the owner of the specified token ID.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"notice\":\"Transfers amount of _tokenId from-to addresses with safety call. If _to is a smart contract, will call onERC1155BatchReceived\"},\"safeTransferFrom(address,address,uint256)\":{\"notice\":\"Safely transfers the ownership of a given token ID to another address If the target address is a contract, it must implement `onERC721Received`, which is called upon a safe transfer, and return the magic value `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`; otherwise, the transfer is reverted. Requires the msg.sender to be the owner, approved, or operator\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"notice\":\"Safely transfers the ownership of a given token ID to another address If the target address is a contract, it must implement `onERC721Received` Requires the msg.sender to be the owner, approved, or operator\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"notice\":\"Transfers amount of _tokenId from-to addresses with safety call. If _to is a smart contract, will call onERC1155Received\"},\"setApprovalForAll(address,bool)\":{\"notice\":\"Approves or unapproves the operator. will revert if the caller attempts to approve itself as it is redundant\"},\"setCashierAddress(address)\":{\"notice\":\"Set the address of the cashier contract\"},\"setVoucherKernelAddress(address)\":{\"notice\":\"Set the address of the VoucherKernel contract\"},\"supportsInterface(bytes4)\":{\"notice\":\"Returns true if this contract implements the interface defined by _interfaceId_. This function call must use less than 30 000 gas. ATM not enforced.\"},\"symbol()\":{\"notice\":\"An abbreviated name for NFTs in this contract\"},\"tokenURI(uint256)\":{\"notice\":\"A distinct Uniform Resource Identifier (URI) for a given asset.\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfers the ownership of a given token ID to another address. Usage of this method is discouraged, use `safeTransferFrom` whenever possible. Requires the msg.sender to be the owner, approved, or operator.\"},\"uri(uint256)\":{\"notice\":\"A distinct Uniform Resource Identifier (URI) for a given token.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/ERC1155ERC721.sol\":\"ERC1155ERC721\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/ERC1155ERC721.sol\":{\"keccak256\":\"0x50739c09677d8dea2cadbff4c58f114f0f3d78993c4b6fe23669316a3e0aae0f\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://58f9dfdb824d4465e14e841a9b30a2c58ab3a2a40f0ce546c2ebddca682cec78\",\"dweb:/ipfs/QmRAndpvVHfEDVSQXLcZkLHHcp66voi57Y6PxAwmQLzTd2\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol\":{\"keccak256\":\"0x9d1d5312c331d6a2abc6b40ff3fa19fa0a7803cbc78bd68540689c31e18def53\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://aec82b84697324001ce65295a830144740750470fc2e0653530720fcd68fbb4b\",\"dweb:/ipfs/QmXgkKo2MgYWY16YD4zW3c8F2Ajbyz1tsTQmRjR12G7Vuw\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol\":{\"keccak256\":\"0x34796b446a93c5ac705507913582dcab993b7cc86429c5e272b99597b64e51d9\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://51ba6851cc9c12c62f8ba7f20780880d590f1030c265edee05158064b9f67a36\",\"dweb:/ipfs/QmNidTbLJeMMFFk3iftCeWP9pLsFxdSHsckvakXgKnxoKC\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol\":{\"keccak256\":\"0xb4b2da06924caa82a63fa15eebec3357f13bd6693a9601fc3e37689e8aca80fc\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://ee602fbf4081c7db5fab98da408eb74c5c3e49a843acf142f259ebf788012bc8\",\"dweb:/ipfs/QmQ6ASnm4weSxGmcy9PU4oGZAmnDKdrW4AQN4dDmuZJUii\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155TokenReceiver.sol\":{\"keccak256\":\"0x153171c151b621968c8ac8120ff7ec28b973a40baf4f9350a89e35349084c159\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://c1120712a0584dd1883453bde9a08811e69b94d3bbb89c93c5d2933dde77a8cd\",\"dweb:/ipfs/QmcncVW9ayK5wAVSgsadMLZk5YrzjBHZPjq7vNvkDzbaZh\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x39c55885f7e34a407316f0f15d337baaf69723252f154d7c727c97f818b23e5e\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://3c297eddef2d21c163eecc6758ae3fe9872594025eff98f22d3cb84d4771df9f\",\"dweb:/ipfs/QmTvQ8URMHEHy1GTBfYqkQZXcu1jb9DpxTWUbNFX7BrEX8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xff346a09a5d08dfe7196c4516d78522da0dec1bde99e04e0f3b269f96796d29f\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://197cdfdd6994addd3ef4702e3b367d4563f907106c6be50b2932cb7d336daf0c\",\"dweb:/ipfs/QmSKe383xVyeY8ecpEPHdvEevMVDR121Qqq4udmeaipXQe\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol\":{\"keccak256\":\"0x7b8243200a7630a258025cc2a9fa2fec0ec9f009b0f6e4b7dc0b0bdcb64b2761\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7a1037cfbea713ba1649ec7c9c44570e012cf3f2eafcec3fd7e8da323e81248b\",\"dweb:/ipfs/QmaZzB7rN4RyPhGgfn9Fkvf5K6ynd4owHj6vA8iMH2k3N9\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556134a6806100326000396000f3fe608060405234801561001057600080fd5b50600436106101745760003560e01c8062fdd58e1461017957806301ffc9a7146101b757806306fdde03146101f2578063081812fc1461026f578063095ea7b3146102a85780630e89341c146102d65780631f7fdffa146102f357806323b872dd146104ab5780632eb2c2d6146104e157806338b6db2e1461060857806340c10f19146106ac57806342842e0e146106d85780634e1273f41461070e5780636352211e1461081c5780636b20c4541461083957806370a082311461096c578063731133e9146109925780637d64afde14610a52578063893d20e814610af657806395d89b4114610afe578063a22cb46514610b06578063b88d4fde14610b34578063bb49944014610bf8578063c099a7c414610c9c578063c87b56dd14610cc2578063d95be43a14610cdf578063e3f5d2d514610d05578063e985e9c514610d0d578063f242432a14610d3b578063f5298aca14610dce578063f9d9309914610e00575b600080fd5b6101a56004803603604081101561018f57600080fd5b506001600160a01b038135169060200135610e08565b60408051918252519081900360200190f35b6101de600480360360208110156101cd57600080fd5b50356001600160e01b031916610e2f565b604080519115158252519081900360200190f35b6101fa610eb9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023457818101518382015260200161021c565b50505050905090810190601f1680156102615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61028c6004803603602081101561028557600080fd5b5035610ee6565b604080516001600160a01b039092168252519081900360200190f35b6102d4600480360360408110156102be57600080fd5b506001600160a01b038135169060200135610f55565b005b6101fa600480360360208110156102ec57600080fd5b5035611092565b6102d46004803603608081101561030957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561033357600080fd5b82018360208201111561034557600080fd5b803590602001918460208302840111600160201b8311171561036657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103b557600080fd5b8201836020820111156103c757600080fd5b803590602001918460208302840111600160201b831117156103e857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561043757600080fd5b82018360208201111561044957600080fd5b803590602001918460018302840111600160201b8311171561046a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111c1945050505050565b6102d4600480360360608110156104c157600080fd5b506001600160a01b0381358116916020810135909116906040013561126f565b6102d4600480360360a08110156104f757600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561052a57600080fd5b82018360208201111561053c57600080fd5b803590602001918460208302840111600160201b8311171561055d57600080fd5b919390929091602081019035600160201b81111561057a57600080fd5b82018360208201111561058c57600080fd5b803590602001918460208302840111600160201b831117156105ad57600080fd5b919390929091602081019035600160201b8111156105ca57600080fd5b8201836020820111156105dc57600080fd5b803590602001918460018302840111600160201b831117156105fd57600080fd5b5090925090506112fe565b6102d46004803603602081101561061e57600080fd5b810190602081018135600160201b81111561063857600080fd5b82018360208201111561064a57600080fd5b803590602001918460018302840111600160201b8311171561066b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611795945050505050565b6101de600480360360408110156106c257600080fd5b506001600160a01b0381351690602001356117fc565b6102d4600480360360608110156106ee57600080fd5b506001600160a01b038135811691602081013590911690604001356118ae565b6107cc6004803603604081101561072457600080fd5b810190602081018135600160201b81111561073e57600080fd5b82018360208201111561075057600080fd5b803590602001918460208302840111600160201b8311171561077157600080fd5b919390929091602081019035600160201b81111561078e57600080fd5b8201836020820111156107a057600080fd5b803590602001918460208302840111600160201b831117156107c157600080fd5b5090925090506118c9565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156108085781810151838201526020016107f0565b505050509050019250505060405180910390f35b61028c6004803603602081101561083257600080fd5b50356119ea565b6102d46004803603606081101561084f57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561087957600080fd5b82018360208201111561088b57600080fd5b803590602001918460208302840111600160201b831117156108ac57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108fb57600080fd5b82018360208201111561090d57600080fd5b803590602001918460208302840111600160201b8311171561092e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611a46945050505050565b6101a56004803603602081101561098257600080fd5b50356001600160a01b0316611aed565b6102d4600480360360808110156109a857600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156109de57600080fd5b8201836020820111156109f057600080fd5b803590602001918460018302840111600160201b83111715610a1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611b54945050505050565b6102d460048036036020811015610a6857600080fd5b810190602081018135600160201b811115610a8257600080fd5b820183602082011115610a9457600080fd5b803590602001918460018302840111600160201b83111715610ab557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611bfc945050505050565b61028c611c5f565b6101fa611c6e565b6102d460048036036040811015610b1c57600080fd5b506001600160a01b0381351690602001351515611c8b565b6102d460048036036080811015610b4a57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610b8457600080fd5b820183602082011115610b9657600080fd5b803590602001918460018302840111600160201b83111715610bb757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611d48945050505050565b6102d460048036036020811015610c0e57600080fd5b810190602081018135600160201b811115610c2857600080fd5b820183602082011115610c3a57600080fd5b803590602001918460018302840111600160201b83111715610c5b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ebc945050505050565b6102d460048036036020811015610cb257600080fd5b50356001600160a01b0316611f1f565b6101fa60048036036020811015610cd857600080fd5b5035612015565b6102d460048036036020811015610cf557600080fd5b50356001600160a01b031661207b565b61028c612171565b6101de60048036036040811015610d2357600080fd5b506001600160a01b0381358116916020013516612180565b6102d4600480360360a0811015610d5157600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b811115610d9057600080fd5b820183602082011115610da257600080fd5b803590602001918460018302840111600160201b83111715610dc357600080fd5b5090925090506121ae565b6102d460048036036060811015610de457600080fd5b506001600160a01b038135169060208101359060400135612453565b61028c6124fa565b60009081526003602090815260408083206001600160a01b03949094168352929052205490565b60006301ffc9a760e01b6001600160e01b031983161480610e605750636cdb3d1360e11b6001600160e01b03198316145b80610e7b57506380ac58cd60e01b6001600160e01b03198316145b80610e965750635b5e139f60e01b6001600160e01b03198316145b80610eb157506303a24d0760e21b6001600160e01b03198316145b90505b919050565b6040805180820190915260138152722137b9b7b71029b6b0b93a102b37bab1b432b960691b602082015290565b6000818152600560205260408120546001600160a01b0316610f395760405162461bcd60e51b815260040180806020018281038252602c815260200180613405602c913960400191505060405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610f60826119ea565b9050806001600160a01b0316836001600160a01b03161415610fba576040805162461bcd60e51b815260206004820152600e60248201526d14915115539110539517d0d0531360921b604482015290519081900360640190fd5b336001600160a01b0382161480610ff457506001600160a01b038116600090815260076020908152604080832033845290915290205460ff165b611036576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4160901b604482015290519081900360640190fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6060600860096110a184612509565b60405160200180848054600181600116156101000203166002900480156110ff5780601f106110dd5761010080835404028352918201916110ff565b820191906000526020600020905b8154815290600101906020018083116110eb575b5050838054600181600116156101000203166002900480156111585780601f10611136576101008083540402835291820191611158565b820191906000526020600020905b815481529060010190602001808311611144575b5050825160208401908083835b602083106111845780518252601f199092019160209182019101611165565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040529050919050565b6001546001600160a01b031661120c576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b0316331461125d576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b611269848484846125e0565b50505050565b6000818152600660205260409020546001600160a01b03163314806112a4575033611299826119ea565b6001600160a01b0316145b6112ee576040805162461bcd60e51b81526020600482015260166024820152751393d517d3d5d3915497d393d497d054141493d5915160521b604482015290519081900360640190fd5b6112f9838383612809565b505050565b6001600160a01b038716611347576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b848314611389576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b6001600160a01b0388163314806113c857506001600160a01b038816600090815260076020908152604080832033845290915290205460ff1615156001145b61140b576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa9a160891b604482015290519081900360640190fd5b60005b8581101561164757600087878381811061142457fe5b905060200201359050600086868481811061143b57fe5b905060200201359050806003600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054146114b3576040805162461bcd60e51b8152602060048201526002602482015261495160f01b604482015290519081900360640190fd5b60008281526003602090815260408083206001600160a01b038f1684529091529020546114e09082612a6b565b6003600084815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020819055506115636003600084815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000205482612ac890919063ffffffff16565b6003600084815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002081905550600260009054906101000a90046001600160a01b03166001600160a01b0316635711fd778c8c85856040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b15801561162257600080fd5b505af1158015611636573d6000803e3d6000fd5b50505050505080600101905061140e565b50866001600160a01b0316886001600160a01b0316336001600160a01b0316600080516020613385833981519152898989896040518080602001806020018381038352878782818152602001925060200280828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600083820152604051601f909101601f19169092018290039850909650505050505050a461178b33898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a9150899081908401838280828437600092019190915250612b2792505050565b5050505050505050565b6000546001600160a01b031633146117e5576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b80516117f89060089060208401906132f1565b5050565b6001546000906001600160a01b031661184a576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b0316331461189b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b6118a58383612d1e565b50600192915050565b6112f983838360405180602001604052806000815250611d48565b606083821461190d576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b6060846001600160401b038111801561192557600080fd5b5060405190808252806020026020018201604052801561194f578160200160208202803683370190505b50905060005b858110156119e0576003600086868481811061196d57fe5b905060200201358152602001908152602001600020600088888481811061199057fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020548282815181106119cd57fe5b6020908102919091010152600101611955565b5095945050505050565b6000818152600560205260408120546001600160a01b031680610eb1576040805162461bcd60e51b815260206004820152600f60248201526e2aa72222a324a722a22fa7aba722a960891b604482015290519081900360640190fd5b6001546001600160a01b0316611a91576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b03163314611ae2576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b6112f9838383612e2a565b60006001600160a01b038216611b38576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526004602052604090205490565b6001546001600160a01b0316611b9f576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b03163314611bf0576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b61126984848484613049565b6000546001600160a01b03163314611c4c576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b80516117f890600a9060208401906132f1565b6000546001600160a01b031690565b6040805180820190915260038152622129ab60e91b602082015290565b336001600160a01b0383161415611cda576040805162461bcd60e51b815260206004820152600e60248201526d14915115539110539517d0d0531360921b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b611d5384848461126f565b611d65836001600160a01b031661311c565b1561126957604051630a85bd0160e11b8082526001600160a01b038681166004840190815290861660248401819052604484018690526080606485019081528551608486015285519394919363150b7a02938a938a938a938a939260a40190602085019080838360005b83811015611de7578181015183820152602001611dcf565b50505050905090810190601f168015611e145780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d6020811015611e6057600080fd5b50516001600160e01b03191614611269576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6000546001600160a01b03163314611f0c576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b80516117f89060099060208401906132f1565b6000546001600160a01b03163314611f6f576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b806001600160a01b038116611fba576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0384169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a15050565b6000818152600560205260409020546060906001600160a01b031661206e576040805162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b604482015290519081900360640190fd5b6008600a6110a184612509565b6000546001600160a01b031633146120cb576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b806001600160a01b038116612116576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0384169081179091556040805191825233602083015280517f94d4208cb05337821fef5da6205084b70818af988524d8a2609a53a1ac1033d19281900390910190a15050565b6001546001600160a01b031690565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6001600160a01b0385166121f7576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b6001600160a01b03861633148061223657506001600160a01b038616600090815260076020908152604080832033845290915290205460ff1615156001145b612279576040805162461bcd60e51b815260206004820152600f60248201526e15539055551213d49256915117d4d5608a1b604482015290519081900360640190fd5b60008481526003602090815260408083206001600160a01b038a16845290915290205483146122d4576040805162461bcd60e51b8152602060048201526002602482015261495160f01b604482015290519081900360640190fd5b60008481526003602090815260408083206001600160a01b038a1684529091529020546123019084612a6b565b60008581526003602090815260408083206001600160a01b038b81168552925280832093909355871681522054612339908490612ac8565b60008581526003602090815260408083206001600160a01b03808b1680865291909352818420949094556002548151635711fd7760e01b81528b84166004820152602481019590955260448501899052606485018890529051911692635711fd7792608480830193919282900301818387803b1580156123b857600080fd5b505af11580156123cc573d6000803e3d6000fd5b5050604080518781526020810187905281516001600160a01b03808b1695508b16935033926000805160206133a5833981519152928290030190a461244b338787878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061312292505050565b505050505050565b6001546001600160a01b031661249e576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b031633146124ef576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b6112f9838383613225565b6002546001600160a01b031690565b60608161252e57506040805180820190915260018152600360fc1b6020820152610eb4565b8160005b811561254657600101600a82049150612532565b6060816001600160401b038111801561255e57600080fd5b506040519080825280601f01601f191660200182016040528015612589576020820181803683370190505b50905060001982015b85156125d757600a860660300160f81b828280600190039350815181106125b557fe5b60200101906001600160f81b031916908160001a905350600a86049550612592565b50949350505050565b6001600160a01b038416612629576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b815183511461266d576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b60005b8351811015612731576126e86003600086848151811061268c57fe5b602002602001015181526020019081526020016000206000876001600160a01b03166001600160a01b03168152602001908152602001600020548483815181106126d257fe5b6020026020010151612ac890919063ffffffff16565b600360008684815181106126f857fe5b602090810291909101810151825281810192909252604090810160009081206001600160a01b038a168252909252902055600101612670565b50836001600160a01b031660006001600160a01b0316336001600160a01b03166000805160206133858339815191528686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156127a657818101518382015260200161278e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156127e55781810151838201526020016127cd565b5050505090500194505050505060405180910390a461126933600086868686612b27565b826001600160a01b031661281c826119ea565b6001600160a01b031614612868576040805162461bcd60e51b815260206004820152600e60248201526d15539055551213d49256915117d560921b604482015290519081900360640190fd5b6001600160a01b0382166128b1576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811685526004808552838620805460001901905587821680875284872080546001908101909155888852600587529685902080549094161790925593548251632da3ce8d60e11b815291820186905291519190931692635b479d1a926024808301939192829003018186803b15801561295457600080fd5b505afa158015612968573d6000803e3d6000fd5b505050506040513d602081101561297e57600080fd5b50516129c2576040805162461bcd60e51b815260206004820152600e60248201526d1195539114d7d49153115054d15160921b604482015290519081900360640190fd5b6002546040805163a2919f6360e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163a2919f6391606480830192600092919082900301818387803b158015612a1f57600080fd5b505af1158015612a33573d6000803e3d6000fd5b5050505080826001600160a01b0316846001600160a01b031660008051602061345183398151915260405160405180910390a4505050565b600082821115612ac2576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015612b20576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b612b39846001600160a01b031661311c565b1561244b5763bc197c8160e01b6001600160e01b031916846001600160a01b031663bc197c8188888787876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015612bd9578181015183820152602001612bc1565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015612c18578181015183820152602001612c00565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015612c54578181015183820152602001612c3c565b50505050905090810190601f168015612c815780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b158015612ca657600080fd5b505af1158015612cba573d6000803e3d6000fd5b505050506040513d6020811015612cd057600080fd5b50516001600160e01b0319161461244b576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d4d5541413d4951151609a1b604482015290519081900360640190fd5b6001600160a01b038216612d67576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b6000818152600560205260409020546001600160a01b031615612dd0576040805162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b604482015290519081900360640190fd5b600081815260056020908152604080832080546001600160a01b0319166001600160a01b03871690811790915580845260049092528083208054600101905551839290600080516020613451833981519152908290a45050565b6001600160a01b038316612e73576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b8051825114612eb7576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b60005b8251811015612f7b57612f32828281518110612ed257fe5b602002602001015160036000868581518110612eea57fe5b602002602001015181526020019081526020016000206000876001600160a01b03166001600160a01b0316815260200190815260200160002054612a6b90919063ffffffff16565b60036000858481518110612f4257fe5b602090810291909101810151825281810192909252604090810160009081206001600160a01b0389168252909252902055600101612eba565b5060006001600160a01b0316836001600160a01b0316336001600160a01b03166000805160206133858339815191528585604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015612ff0578181015183820152602001612fd8565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561302f578181015183820152602001613017565b5050505090500194505050505060405180910390a4505050565b6001600160a01b038416613092576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b60008381526003602090815260408083206001600160a01b03881684529091529020546130bf9083612ac8565b60008481526003602090815260408083206001600160a01b038916808552908352818420949094558051878152918201869052805133926000805160206133a583398151915292908290030190a461126933600086868686613122565b3b151590565b613134846001600160a01b031661311c565b1561244b5763f23a6e6160e01b6001600160e01b031916846001600160a01b031663f23a6e6188888787876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156131d55781810151838201526020016131bd565b50505050905090810190601f1680156132025780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015612ca657600080fd5b6001600160a01b03831661326e576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b60008281526003602090815260408083206001600160a01b038716845290915290205461329b9082612a6b565b60008381526003602090815260408083206001600160a01b038816808552908352818420949094558051868152918201859052805192939233926000805160206133a583398151915292908290030190a4505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061333257805160ff191683800117855561335f565b8280016001018555821561335f579182015b8281111561335f578251825591602001919060010190613344565b5061336b92915061336f565b5090565b5b8082111561336b576000815560010161337056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62554e5350454349464945445f4144445245535300000000000000000000000000554e5350454349464945445f564f55434845524b45524e454c000000000000004552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4d49534d4154434845445f41525241595f4c454e475448530000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220c6fdcb0f8d882280fd00bc91a266c5cde528ac15cfa7c6b7f1ee45494ed6957764736f6c63430007010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101745760003560e01c8062fdd58e1461017957806301ffc9a7146101b757806306fdde03146101f2578063081812fc1461026f578063095ea7b3146102a85780630e89341c146102d65780631f7fdffa146102f357806323b872dd146104ab5780632eb2c2d6146104e157806338b6db2e1461060857806340c10f19146106ac57806342842e0e146106d85780634e1273f41461070e5780636352211e1461081c5780636b20c4541461083957806370a082311461096c578063731133e9146109925780637d64afde14610a52578063893d20e814610af657806395d89b4114610afe578063a22cb46514610b06578063b88d4fde14610b34578063bb49944014610bf8578063c099a7c414610c9c578063c87b56dd14610cc2578063d95be43a14610cdf578063e3f5d2d514610d05578063e985e9c514610d0d578063f242432a14610d3b578063f5298aca14610dce578063f9d9309914610e00575b600080fd5b6101a56004803603604081101561018f57600080fd5b506001600160a01b038135169060200135610e08565b60408051918252519081900360200190f35b6101de600480360360208110156101cd57600080fd5b50356001600160e01b031916610e2f565b604080519115158252519081900360200190f35b6101fa610eb9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023457818101518382015260200161021c565b50505050905090810190601f1680156102615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61028c6004803603602081101561028557600080fd5b5035610ee6565b604080516001600160a01b039092168252519081900360200190f35b6102d4600480360360408110156102be57600080fd5b506001600160a01b038135169060200135610f55565b005b6101fa600480360360208110156102ec57600080fd5b5035611092565b6102d46004803603608081101561030957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561033357600080fd5b82018360208201111561034557600080fd5b803590602001918460208302840111600160201b8311171561036657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103b557600080fd5b8201836020820111156103c757600080fd5b803590602001918460208302840111600160201b831117156103e857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561043757600080fd5b82018360208201111561044957600080fd5b803590602001918460018302840111600160201b8311171561046a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111c1945050505050565b6102d4600480360360608110156104c157600080fd5b506001600160a01b0381358116916020810135909116906040013561126f565b6102d4600480360360a08110156104f757600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561052a57600080fd5b82018360208201111561053c57600080fd5b803590602001918460208302840111600160201b8311171561055d57600080fd5b919390929091602081019035600160201b81111561057a57600080fd5b82018360208201111561058c57600080fd5b803590602001918460208302840111600160201b831117156105ad57600080fd5b919390929091602081019035600160201b8111156105ca57600080fd5b8201836020820111156105dc57600080fd5b803590602001918460018302840111600160201b831117156105fd57600080fd5b5090925090506112fe565b6102d46004803603602081101561061e57600080fd5b810190602081018135600160201b81111561063857600080fd5b82018360208201111561064a57600080fd5b803590602001918460018302840111600160201b8311171561066b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611795945050505050565b6101de600480360360408110156106c257600080fd5b506001600160a01b0381351690602001356117fc565b6102d4600480360360608110156106ee57600080fd5b506001600160a01b038135811691602081013590911690604001356118ae565b6107cc6004803603604081101561072457600080fd5b810190602081018135600160201b81111561073e57600080fd5b82018360208201111561075057600080fd5b803590602001918460208302840111600160201b8311171561077157600080fd5b919390929091602081019035600160201b81111561078e57600080fd5b8201836020820111156107a057600080fd5b803590602001918460208302840111600160201b831117156107c157600080fd5b5090925090506118c9565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156108085781810151838201526020016107f0565b505050509050019250505060405180910390f35b61028c6004803603602081101561083257600080fd5b50356119ea565b6102d46004803603606081101561084f57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561087957600080fd5b82018360208201111561088b57600080fd5b803590602001918460208302840111600160201b831117156108ac57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108fb57600080fd5b82018360208201111561090d57600080fd5b803590602001918460208302840111600160201b8311171561092e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611a46945050505050565b6101a56004803603602081101561098257600080fd5b50356001600160a01b0316611aed565b6102d4600480360360808110156109a857600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156109de57600080fd5b8201836020820111156109f057600080fd5b803590602001918460018302840111600160201b83111715610a1157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611b54945050505050565b6102d460048036036020811015610a6857600080fd5b810190602081018135600160201b811115610a8257600080fd5b820183602082011115610a9457600080fd5b803590602001918460018302840111600160201b83111715610ab557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611bfc945050505050565b61028c611c5f565b6101fa611c6e565b6102d460048036036040811015610b1c57600080fd5b506001600160a01b0381351690602001351515611c8b565b6102d460048036036080811015610b4a57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610b8457600080fd5b820183602082011115610b9657600080fd5b803590602001918460018302840111600160201b83111715610bb757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611d48945050505050565b6102d460048036036020811015610c0e57600080fd5b810190602081018135600160201b811115610c2857600080fd5b820183602082011115610c3a57600080fd5b803590602001918460018302840111600160201b83111715610c5b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ebc945050505050565b6102d460048036036020811015610cb257600080fd5b50356001600160a01b0316611f1f565b6101fa60048036036020811015610cd857600080fd5b5035612015565b6102d460048036036020811015610cf557600080fd5b50356001600160a01b031661207b565b61028c612171565b6101de60048036036040811015610d2357600080fd5b506001600160a01b0381358116916020013516612180565b6102d4600480360360a0811015610d5157600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b811115610d9057600080fd5b820183602082011115610da257600080fd5b803590602001918460018302840111600160201b83111715610dc357600080fd5b5090925090506121ae565b6102d460048036036060811015610de457600080fd5b506001600160a01b038135169060208101359060400135612453565b61028c6124fa565b60009081526003602090815260408083206001600160a01b03949094168352929052205490565b60006301ffc9a760e01b6001600160e01b031983161480610e605750636cdb3d1360e11b6001600160e01b03198316145b80610e7b57506380ac58cd60e01b6001600160e01b03198316145b80610e965750635b5e139f60e01b6001600160e01b03198316145b80610eb157506303a24d0760e21b6001600160e01b03198316145b90505b919050565b6040805180820190915260138152722137b9b7b71029b6b0b93a102b37bab1b432b960691b602082015290565b6000818152600560205260408120546001600160a01b0316610f395760405162461bcd60e51b815260040180806020018281038252602c815260200180613405602c913960400191505060405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610f60826119ea565b9050806001600160a01b0316836001600160a01b03161415610fba576040805162461bcd60e51b815260206004820152600e60248201526d14915115539110539517d0d0531360921b604482015290519081900360640190fd5b336001600160a01b0382161480610ff457506001600160a01b038116600090815260076020908152604080832033845290915290205460ff165b611036576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4160901b604482015290519081900360640190fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6060600860096110a184612509565b60405160200180848054600181600116156101000203166002900480156110ff5780601f106110dd5761010080835404028352918201916110ff565b820191906000526020600020905b8154815290600101906020018083116110eb575b5050838054600181600116156101000203166002900480156111585780601f10611136576101008083540402835291820191611158565b820191906000526020600020905b815481529060010190602001808311611144575b5050825160208401908083835b602083106111845780518252601f199092019160209182019101611165565b6001836020036101000a03801982511681845116808217855250505050505090500193505050506040516020818303038152906040529050919050565b6001546001600160a01b031661120c576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b0316331461125d576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b611269848484846125e0565b50505050565b6000818152600660205260409020546001600160a01b03163314806112a4575033611299826119ea565b6001600160a01b0316145b6112ee576040805162461bcd60e51b81526020600482015260166024820152751393d517d3d5d3915497d393d497d054141493d5915160521b604482015290519081900360640190fd5b6112f9838383612809565b505050565b6001600160a01b038716611347576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b848314611389576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b6001600160a01b0388163314806113c857506001600160a01b038816600090815260076020908152604080832033845290915290205460ff1615156001145b61140b576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa9a160891b604482015290519081900360640190fd5b60005b8581101561164757600087878381811061142457fe5b905060200201359050600086868481811061143b57fe5b905060200201359050806003600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054146114b3576040805162461bcd60e51b8152602060048201526002602482015261495160f01b604482015290519081900360640190fd5b60008281526003602090815260408083206001600160a01b038f1684529091529020546114e09082612a6b565b6003600084815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020819055506115636003600084815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000205482612ac890919063ffffffff16565b6003600084815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002081905550600260009054906101000a90046001600160a01b03166001600160a01b0316635711fd778c8c85856040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b15801561162257600080fd5b505af1158015611636573d6000803e3d6000fd5b50505050505080600101905061140e565b50866001600160a01b0316886001600160a01b0316336001600160a01b0316600080516020613385833981519152898989896040518080602001806020018381038352878782818152602001925060200280828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600083820152604051601f909101601f19169092018290039850909650505050505050a461178b33898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a9150899081908401838280828437600092019190915250612b2792505050565b5050505050505050565b6000546001600160a01b031633146117e5576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b80516117f89060089060208401906132f1565b5050565b6001546000906001600160a01b031661184a576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b0316331461189b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b6118a58383612d1e565b50600192915050565b6112f983838360405180602001604052806000815250611d48565b606083821461190d576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b6060846001600160401b038111801561192557600080fd5b5060405190808252806020026020018201604052801561194f578160200160208202803683370190505b50905060005b858110156119e0576003600086868481811061196d57fe5b905060200201358152602001908152602001600020600088888481811061199057fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b03168152602001908152602001600020548282815181106119cd57fe5b6020908102919091010152600101611955565b5095945050505050565b6000818152600560205260408120546001600160a01b031680610eb1576040805162461bcd60e51b815260206004820152600f60248201526e2aa72222a324a722a22fa7aba722a960891b604482015290519081900360640190fd5b6001546001600160a01b0316611a91576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b03163314611ae2576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b6112f9838383612e2a565b60006001600160a01b038216611b38576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526004602052604090205490565b6001546001600160a01b0316611b9f576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b03163314611bf0576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b61126984848484613049565b6000546001600160a01b03163314611c4c576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b80516117f890600a9060208401906132f1565b6000546001600160a01b031690565b6040805180820190915260038152622129ab60e91b602082015290565b336001600160a01b0383161415611cda576040805162461bcd60e51b815260206004820152600e60248201526d14915115539110539517d0d0531360921b604482015290519081900360640190fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b611d5384848461126f565b611d65836001600160a01b031661311c565b1561126957604051630a85bd0160e11b8082526001600160a01b038681166004840190815290861660248401819052604484018690526080606485019081528551608486015285519394919363150b7a02938a938a938a938a939260a40190602085019080838360005b83811015611de7578181015183820152602001611dcf565b50505050905090810190601f168015611e145780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015611e3657600080fd5b505af1158015611e4a573d6000803e3d6000fd5b505050506040513d6020811015611e6057600080fd5b50516001600160e01b03191614611269576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6000546001600160a01b03163314611f0c576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b80516117f89060099060208401906132f1565b6000546001600160a01b03163314611f6f576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b806001600160a01b038116611fba576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0384169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a15050565b6000818152600560205260409020546060906001600160a01b031661206e576040805162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b604482015290519081900360640190fd5b6008600a6110a184612509565b6000546001600160a01b031633146120cb576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4f60901b604482015290519081900360640190fd5b806001600160a01b038116612116576040805162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0384169081179091556040805191825233602083015280517f94d4208cb05337821fef5da6205084b70818af988524d8a2609a53a1ac1033d19281900390910190a15050565b6001546001600160a01b031690565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6001600160a01b0385166121f7576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b6001600160a01b03861633148061223657506001600160a01b038616600090815260076020908152604080832033845290915290205460ff1615156001145b612279576040805162461bcd60e51b815260206004820152600f60248201526e15539055551213d49256915117d4d5608a1b604482015290519081900360640190fd5b60008481526003602090815260408083206001600160a01b038a16845290915290205483146122d4576040805162461bcd60e51b8152602060048201526002602482015261495160f01b604482015290519081900360640190fd5b60008481526003602090815260408083206001600160a01b038a1684529091529020546123019084612a6b565b60008581526003602090815260408083206001600160a01b038b81168552925280832093909355871681522054612339908490612ac8565b60008581526003602090815260408083206001600160a01b03808b1680865291909352818420949094556002548151635711fd7760e01b81528b84166004820152602481019590955260448501899052606485018890529051911692635711fd7792608480830193919282900301818387803b1580156123b857600080fd5b505af11580156123cc573d6000803e3d6000fd5b5050604080518781526020810187905281516001600160a01b03808b1695508b16935033926000805160206133a5833981519152928290030190a461244b338787878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061312292505050565b505050505050565b6001546001600160a01b031661249e576040805162461bcd60e51b815260206004820152601960248201526000805160206133e5833981519152604482015290519081900360640190fd5b6001546001600160a01b031633146124ef576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f564b60881b604482015290519081900360640190fd5b6112f9838383613225565b6002546001600160a01b031690565b60608161252e57506040805180820190915260018152600360fc1b6020820152610eb4565b8160005b811561254657600101600a82049150612532565b6060816001600160401b038111801561255e57600080fd5b506040519080825280601f01601f191660200182016040528015612589576020820181803683370190505b50905060001982015b85156125d757600a860660300160f81b828280600190039350815181106125b557fe5b60200101906001600160f81b031916908160001a905350600a86049550612592565b50949350505050565b6001600160a01b038416612629576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b815183511461266d576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b60005b8351811015612731576126e86003600086848151811061268c57fe5b602002602001015181526020019081526020016000206000876001600160a01b03166001600160a01b03168152602001908152602001600020548483815181106126d257fe5b6020026020010151612ac890919063ffffffff16565b600360008684815181106126f857fe5b602090810291909101810151825281810192909252604090810160009081206001600160a01b038a168252909252902055600101612670565b50836001600160a01b031660006001600160a01b0316336001600160a01b03166000805160206133858339815191528686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156127a657818101518382015260200161278e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156127e55781810151838201526020016127cd565b5050505090500194505050505060405180910390a461126933600086868686612b27565b826001600160a01b031661281c826119ea565b6001600160a01b031614612868576040805162461bcd60e51b815260206004820152600e60248201526d15539055551213d49256915117d560921b604482015290519081900360640190fd5b6001600160a01b0382166128b1576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811685526004808552838620805460001901905587821680875284872080546001908101909155888852600587529685902080549094161790925593548251632da3ce8d60e11b815291820186905291519190931692635b479d1a926024808301939192829003018186803b15801561295457600080fd5b505afa158015612968573d6000803e3d6000fd5b505050506040513d602081101561297e57600080fd5b50516129c2576040805162461bcd60e51b815260206004820152600e60248201526d1195539114d7d49153115054d15160921b604482015290519081900360640190fd5b6002546040805163a2919f6360e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163a2919f6391606480830192600092919082900301818387803b158015612a1f57600080fd5b505af1158015612a33573d6000803e3d6000fd5b5050505080826001600160a01b0316846001600160a01b031660008051602061345183398151915260405160405180910390a4505050565b600082821115612ac2576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015612b20576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b612b39846001600160a01b031661311c565b1561244b5763bc197c8160e01b6001600160e01b031916846001600160a01b031663bc197c8188888787876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015612bd9578181015183820152602001612bc1565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015612c18578181015183820152602001612c00565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015612c54578181015183820152602001612c3c565b50505050905090810190601f168015612c815780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b158015612ca657600080fd5b505af1158015612cba573d6000803e3d6000fd5b505050506040513d6020811015612cd057600080fd5b50516001600160e01b0319161461244b576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d4d5541413d4951151609a1b604482015290519081900360640190fd5b6001600160a01b038216612d67576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b6000818152600560205260409020546001600160a01b031615612dd0576040805162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b604482015290519081900360640190fd5b600081815260056020908152604080832080546001600160a01b0319166001600160a01b03871690811790915580845260049092528083208054600101905551839290600080516020613451833981519152908290a45050565b6001600160a01b038316612e73576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b8051825114612eb7576040805162461bcd60e51b81526020600482015260186024820152600080516020613431833981519152604482015290519081900360640190fd5b60005b8251811015612f7b57612f32828281518110612ed257fe5b602002602001015160036000868581518110612eea57fe5b602002602001015181526020019081526020016000206000876001600160a01b03166001600160a01b0316815260200190815260200160002054612a6b90919063ffffffff16565b60036000858481518110612f4257fe5b602090810291909101810151825281810192909252604090810160009081206001600160a01b0389168252909252902055600101612eba565b5060006001600160a01b0316836001600160a01b0316336001600160a01b03166000805160206133858339815191528585604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015612ff0578181015183820152602001612fd8565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561302f578181015183820152602001613017565b5050505090500194505050505060405180910390a4505050565b6001600160a01b038416613092576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b60008381526003602090815260408083206001600160a01b03881684529091529020546130bf9083612ac8565b60008481526003602090815260408083206001600160a01b038916808552908352818420949094558051878152918201869052805133926000805160206133a583398151915292908290030190a461126933600086868686613122565b3b151590565b613134846001600160a01b031661311c565b1561244b5763f23a6e6160e01b6001600160e01b031916846001600160a01b031663f23a6e6188888787876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156131d55781810151838201526020016131bd565b50505050905090810190601f1680156132025780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015612ca657600080fd5b6001600160a01b03831661326e576040805162461bcd60e51b815260206004820152601360248201526000805160206133c5833981519152604482015290519081900360640190fd5b60008281526003602090815260408083206001600160a01b038716845290915290205461329b9082612a6b565b60008381526003602090815260408083206001600160a01b038816808552908352818420949094558051868152918201859052805192939233926000805160206133a583398151915292908290030190a4505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061333257805160ff191683800117855561335f565b8280016001018555821561335f579182015b8281111561335f578251825591602001919060010190613344565b5061336b92915061336f565b5090565b5b8082111561336b576000815560010161337056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62554e5350454349464945445f4144445245535300000000000000000000000000554e5350454349464945445f564f55434845524b45524e454c000000000000004552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4d49534d4154434845445f41525241595f4c454e475448530000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220c6fdcb0f8d882280fd00bc91a266c5cde528ac15cfa7c6b7f1ee45494ed6957764736f6c63430007010033", + "sourceMap": "679:31638:2:-:0;;;2853:51;;;;;;;;;-1:-1:-1;2878:5:2;:18;;-1:-1:-1;;;;;;2878:18:2;2886:10;2878:18;;;679:31638;;;;;;", + "deployedSourceMap": "679:31638:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15506:191;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;15506:191:2;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;19028:512;;;;;;;;;;;;;;;;-1:-1:-1;19028:512:2;-1:-1:-1;;;;;;19028:512:2;;:::i;:::-;;;;;;;;;;;;;;;;;;28879:107;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10467:306;;;;;;;;;;;;;;;;-1:-1:-1;10467:306:2;;:::i;:::-;;;;-1:-1:-1;;;;;10467:306:2;;;;;;;;;;;;;;9427:722;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;9427:722:2;;;;;;;;:::i;:::-;;28537:218;;;;;;;;;;;;;;;;-1:-1:-1;28537:218:2;;:::i;22926:276::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22926:276:2;;;;;;;;;;;;;;;-1:-1:-1;;;22926:276:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22926:276:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22926:276:2;;;;;;;;-1:-1:-1;22926:276:2;;-1:-1:-1;;;;;22926:276:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22926:276:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22926:276:2;;;;;;;;-1:-1:-1;22926:276:2;;-1:-1:-1;;;;;22926:276:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;22926:276:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22926:276:2;;-1:-1:-1;22926:276:2;;-1:-1:-1;;;;;22926:276:2:i;7286:428::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;7286:428:2;;;;;;;;;;;;;;;;;:::i;11253:1790::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11253:1790:2;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11253:1790:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11253:1790:2;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11253:1790:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11253:1790:2;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11253:1790:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11253:1790:2;;;;;;;;;;-1:-1:-1;11253:1790:2;;-1:-1:-1;11253:1790:2;-1:-1:-1;11253:1790:2;:::i;27552:109::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;27552:109:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;27552:109:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27552:109:2;;-1:-1:-1;27552:109:2;;-1:-1:-1;;;;;27552:109:2:i;21556:196::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;21556:196:2;;;;;;;;:::i;5417:183::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5417:183:2;;;;;;;;;;;;;;;;;:::i;16998:628::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16998:628:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16998:628:2;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16998:628:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16998:628:2;;;;;;;;;;-1:-1:-1;16998:628:2;;-1:-1:-1;16998:628:2;-1:-1:-1;16998:628:2;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16437:316;;;;;;;;;;;;;;;;-1:-1:-1;16437:316:2;;:::i;26041:213::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;26041:213:2;;;;;;;;;;;;;;;-1:-1:-1;;;26041:213:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;26041:213:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26041:213:2;;;;;;;;-1:-1:-1;26041:213:2;;-1:-1:-1;;;;;26041:213:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;26041:213:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26041:213:2;;-1:-1:-1;26041:213:2;;-1:-1:-1;;;;;26041:213:2:i;15913:273::-;;;;;;;;;;;;;;;;-1:-1:-1;15913:273:2;-1:-1:-1;;;;;15913:273:2;;:::i;20065:216::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20065:216:2;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;20065:216:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;20065:216:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20065:216:2;;-1:-1:-1;20065:216:2;;-1:-1:-1;;;;;20065:216:2:i;28053:111::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28053:111:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;28053:111:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;28053:111:2;;-1:-1:-1;28053:111:2;;-1:-1:-1;;;;;28053:111:2:i;31595:136::-;;;:::i;29095:95::-;;;:::i;17902:413::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17902:413:2;;;;;;;;;;:::i;6147:665::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6147:665:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6147:665:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6147:665:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6147:665:2;;-1:-1:-1;6147:665:2;;-1:-1:-1;;;;;6147:665:2:i;27801:113::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;27801:113:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;27801:113:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27801:113:2;;-1:-1:-1;27801:113:2;;-1:-1:-1;;;;;27801:113:2:i;30479:244::-;;;;;;;;;;;;;;;;-1:-1:-1;30479:244:2;-1:-1:-1;;;;;30479:244:2;;:::i;29522:289::-;;;;;;;;;;;;;;;;-1:-1:-1;29522:289:2;;:::i;30055:288::-;;;;;;;;;;;;;;;;-1:-1:-1;30055:288:2;-1:-1:-1;;;;;30055:288:2;;:::i;31867:166::-;;;:::i;18606:223::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;18606:223:2;;;;;;;;;;:::i;3352:1392::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3352:1392:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3352:1392:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3352:1392:2;;;;;;;;;;-1:-1:-1;3352:1392:2;;-1:-1:-1;3352:1392:2;-1:-1:-1;3352:1392:2;:::i;24784:190::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;24784:190:2;;;;;;;;;;;;;:::i;32154:154::-;;;:::i;15506:191::-;15629:7;15661:18;;;:8;:18;;;;;;;;-1:-1:-1;;;;;15661:28:2;;;;;;;;;;;;15506:191::o;19028:512::-;19144:4;-1:-1:-1;;;;;;;;;19244:26:2;;;;:79;;-1:-1:-1;;;;;;;;;;19297:26:2;;;19244:79;:133;;;-1:-1:-1;;;;;;;;;;19351:26:2;;;19244:133;:186;;;-1:-1:-1;;;;;;;;;;19404:26:2;;;19244:186;:258;;;-1:-1:-1;;;;;;;;;;19476:26:2;;;19244:258;19166:336;;19028:512;;;;:::o;28879:107::-;28950:28;;;;;;;;;;;;-1:-1:-1;;;28950:28:2;;;;28879:107;:::o;10467:306::-;10572:7;10619:19;;;:9;:19;;;;;;-1:-1:-1;;;;;10619:19:2;10597:127;;;;-1:-1:-1;;;10597:127:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10744:21:2;;;;:11;:21;;;;;;-1:-1:-1;;;;;10744:21:2;;10467:306::o;9427:722::-;9502:18;9523:17;9531:8;9523:7;:17::i;:::-;9502:38;;9566:10;-1:-1:-1;;;;;9559:17:2;:3;-1:-1:-1;;;;;9559:17:2;;;9551:44;;;;;-1:-1:-1;;;9551:44:2;;;;;;;;;;;;-1:-1:-1;;;9551:44:2;;;;;;;;;;;;;;;9728:10;-1:-1:-1;;;;;9728:24:2;;;;:86;;-1:-1:-1;;;;;;9773:29:2;;;;;;:17;:29;;;;;;;;9803:10;9773:41;;;;;;;;;;9728:86;9706:190;;;;;-1:-1:-1;;;9706:190:2;;;;;;;;;;;;-1:-1:-1;;;9706:190:2;;;;;;;;;;;;;;;10063:21;;;;:11;:21;;;;;;:27;;-1:-1:-1;;;;;;10063:27:2;-1:-1:-1;;;;;10063:27:2;;;;;;;;;10106:35;;10063:21;;10106:35;;;;;;;9427:722;;;:::o;28537:218::-;28591:13;28679:12;28693:17;28712:19;28722:8;28712:9;:19::i;:::-;28662:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;28662:70:2;;;;;;;;;;;;;;;;;;;-1:-1:-1;;28662:70:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28617:130;;28537:218;;;:::o;22926:276::-;2363:20;;-1:-1:-1;;;;;2363:20:2;2341:109;;;;;-1:-1:-1;;;2341:109:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2341:109:2;;;;;;;;;;;;;;;2573:20;;-1:-1:-1;;;;;2573:20:2;2559:10;:34;2551:62;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;;;;23152:42:::1;23163:3;23168:9;23179:7;23188:5;23152:10;:42::i;:::-;22926:276:::0;;;;:::o;7286:428::-;7437:21;;;;:11;:21;;;;;;-1:-1:-1;;;;;7437:21:2;7462:10;7437:35;;:87;;-1:-1:-1;7514:10:2;7493:17;7501:8;7493:7;:17::i;:::-;-1:-1:-1;;;;;7493:31:2;;7437:87;7415:159;;;;;-1:-1:-1;;;7415:159:2;;;;;;;;;;;;-1:-1:-1;;;7415:159:2;;;;;;;;;;;;;;;7671:35;7685:5;7692:3;7697:8;7671:13;:35::i;:::-;7286:428;;;:::o;11253:1790::-;-1:-1:-1;;;;;11481:17:2;;11473:49;;;;;-1:-1:-1;;;11473:49:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11473:49:2;;;;;;;;;;;;;;;11631:34;;;11623:71;;;;;-1:-1:-1;;;11623:71:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11623:71:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;11818:19:2;;11827:10;11818:19;;:67;;-1:-1:-1;;;;;;11841:24:2;;;;;;:17;:24;;;;;;;;11866:10;11841:36;;;;;;;;;;:44;;:36;:44;11818:67;11796:132;;;;;-1:-1:-1;;;11796:132:2;;;;;;;;;;;;-1:-1:-1;;;11796:132:2;;;;;;;;;;;;;;;12030:9;12025:645;12045:20;;;12025:645;;;12087:15;12105:9;;12115:1;12105:12;;;;;;;;;;;;;12087:30;;12132:13;12148:7;;12156:1;12148:10;;;;;;;;;;;;;12132:26;;12211:5;12183:8;:17;12192:7;12183:17;;;;;;;;;;;:24;12201:5;-1:-1:-1;;;;;12183:24:2;-1:-1:-1;;;;;12183:24:2;;;;;;;;;;;;;:33;12175:48;;;;;-1:-1:-1;;;12175:48:2;;;;;;;;;;;;-1:-1:-1;;;12175:48:2;;;;;;;;;;;;;;;12380:17;;;;:8;:17;;;;;;;;-1:-1:-1;;;;;12380:24:2;;;;;;;;;;:35;;12409:5;12380:28;:35::i;:::-;12353:8;:17;12362:7;12353:17;;;;;;;;;;;:24;12371:5;-1:-1:-1;;;;;12353:24:2;-1:-1:-1;;;;;12353:24:2;;;;;;;;;;;;:62;;;;12455:33;12465:8;:17;12474:7;12465:17;;;;;;;;;;;:22;12483:3;-1:-1:-1;;;;;12465:22:2;-1:-1:-1;;;;;12465:22:2;;;;;;;;;;;;;12455:5;:9;;:33;;;;:::i;:::-;12430:8;:17;12439:7;12430:17;;;;;;;;;;;:22;12448:3;-1:-1:-1;;;;;12430:22:2;-1:-1:-1;;;;;12430:22:2;;;;;;;;;;;;:58;;;;12514:14;;;;;;;;;-1:-1:-1;;;;;12514:14:2;-1:-1:-1;;;;;12505:42:2;;12566:5;12590:3;12612:7;12638:5;12505:153;;;;;;;;;;;;;-1:-1:-1;;;;;12505:153:2;;;;;;-1:-1:-1;;;;;12505:153:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12025:645;;12067:3;;;;;12025:645;;;;12720:3;-1:-1:-1;;;;;12687:57:2;12713:5;-1:-1:-1;;;;;12687:57:2;12701:10;-1:-1:-1;;;;;12687:57:2;-1:-1:-1;;;;;;;;;;;12725:9:2;;12736:7;;12687:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;12687:57:2;;;;;;;;;;;;;;;;;-1:-1:-1;12687:57:2;;;;;;;;;;;;;;;;;;;-1:-1:-1;;12687:57:2;;;;;;;;-1:-1:-1;12687:57:2;;-1:-1:-1;;;;;;;12687:57:2;12860:175;12910:10;12935:5;12955:3;12973:9;;12860:175;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;12860:175:2;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12997:7:2;;-1:-1:-1;12997:7:2;;;;12860:175;;;12997:7;;12860:175;12997:7;12860:175;;;;;;;;;-1:-1:-1;;12860:175:2;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13019:5:2;;-1:-1:-1;13019:5:2;;;;12860:175;;13019:5;;;;12860:175;;;;;;;;;-1:-1:-1;12860:35:2;;-1:-1:-1;;;12860:175:2:i;:::-;11253:1790;;;;;;;;:::o;27552:109::-;2161:5;;-1:-1:-1;;;;;2161:5:2;2147:10;:19;2139:46;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;;;;27630:23;;::::1;::::0;:12:::1;::::0;:23:::1;::::0;::::1;::::0;::::1;:::i;:::-;;27552:109:::0;:::o;21556:196::-;2363:20;;21682:4;;-1:-1:-1;;;;;2363:20:2;2341:109;;;;;-1:-1:-1;;;2341:109:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2341:109:2;;;;;;;;;;;;;;;2573:20;;-1:-1:-1;;;;;2573:20:2;2559:10;:34;2551:62;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;;;;21704:18:::1;21710:2;21714:7;21704:5;:18::i;:::-;-1:-1:-1::0;21740:4:2::1;21556:196:::0;;;;:::o;5417:183::-;5550:42;5567:5;5574:3;5579:8;5550:42;;;;;;;;;;;;:16;:42::i;16998:628::-;17139:16;17190:36;;;17168:110;;;;;-1:-1:-1;;;17168:110:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;17168:110:2;;;;;;;;;;;;;;;17380:30;17427:9;-1:-1:-1;;;;;17413:31:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17413:31:2;;17380:64;;17462:9;17457:129;17477:20;;;17457:129;;;17538:8;:22;17547:9;;17557:1;17547:12;;;;;;;;;;;;;17538:22;;;;;;;;;;;:36;17561:9;;17571:1;17561:12;;;;;;;;;;;;;-1:-1:-1;;;;;17561:12:2;-1:-1:-1;;;;;17538:36:2;-1:-1:-1;;;;;17538:36:2;;;;;;;;;;;;;17519:13;17533:1;17519:16;;;;;;;;;;;;;;;;;:55;17499:3;;17457:129;;;-1:-1:-1;17605:13:2;16998:628;-1:-1:-1;;;;;16998:628:2:o;16437:316::-;16502:7;16543:19;;;:9;:19;;;;;;-1:-1:-1;;;;;16543:19:2;16581:24;16573:52;;;;;-1:-1:-1;;;16573:52:2;;;;;;;;;;;;-1:-1:-1;;;16573:52:2;;;;;;;;;;;;;;26041:213;2363:20;;-1:-1:-1;;;;;2363:20:2;2341:109;;;;;-1:-1:-1;;;2341:109:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2341:109:2;;;;;;;;;;;;;;;2573:20;;-1:-1:-1;;;;;2573:20:2;2559:10;:34;2551:62;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;;;;26206:40:::1;26217:8;26227:9;26238:7;26206:10;:40::i;15913:273::-:0;15978:7;-1:-1:-1;;;;;16006:20:2;;15998:52;;;;;-1:-1:-1;;;15998:52:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15998:52:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;;16160:18:2;;;;;:10;:18;;;;;;;15913:273::o;20065:216::-;2363:20;;-1:-1:-1;;;;;2363:20:2;2341:109;;;;;-1:-1:-1;;;2341:109:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2341:109:2;;;;;;;;;;;;;;;2573:20;;-1:-1:-1;;;;;2573:20:2;2559:10;:34;2551:62;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;;;;20238:35:::1;20244:3;20249:8;20259:6;20267:5;20238;:35::i;28053:111::-:0;2161:5;;-1:-1:-1;;;;;2161:5:2;2147:10;:19;2139:46;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;;;;28128:28;;::::1;::::0;:16:::1;::::0;:28:::1;::::0;::::1;::::0;::::1;:::i;31595:136::-:0;31686:7;31718:5;-1:-1:-1;;;;;31718:5:2;31595:136;:::o;29095:95::-;29170:12;;;;;;;;;;;;-1:-1:-1;;;29170:12:2;;;;29095:95;:::o;17902:413::-;18042:10;-1:-1:-1;;;;;18042:23:2;;;;18034:50;;;;;-1:-1:-1;;;18034:50:2;;;;;;;;;;;;-1:-1:-1;;;18034:50:2;;;;;;;;;;;;;;;18211:10;18193:29;;;;:17;:29;;;;;;;;-1:-1:-1;;;;;18193:40:2;;;;;;;;;;;;:51;;-1:-1:-1;;18193:51:2;;;;;;;;;;18260:47;;;;;;;18193:40;;18211:10;18260:47;;;;;;;;;;;17902:413;;:::o;6147:665::-;6309:34;6322:5;6329:3;6334:8;6309:12;:34::i;:::-;6360:16;:3;-1:-1:-1;;;;;6360:14:2;;:16::i;:::-;6356:449;;;6419:173;;-1:-1:-1;;;6419:173:2;;;-1:-1:-1;;;;;6419:173:2;;;;;;;;;:41;;;:173;;;;;;;;;;;;;;;;;;;;;;;;;;;6596:50;;6419:41;;6596:50;;6483:5;;6439:3;;6537:8;;6568:5;;6419:173;;;;;;;;;;;-1:-1:-1;6419:173:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6419:173:2;-1:-1:-1;;;;;;6419:227:2;;6393:316;;;;;-1:-1:-1;;;6393:316:2;;;;;;;;;;;;-1:-1:-1;;;6393:316:2;;;;;;;;;;;;;;27801:113;2161:5;;-1:-1:-1;;;;;2161:5:2;2147:10;:19;2139:46;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;;;;27877:29;;::::1;::::0;:17:::1;::::0;:29:::1;::::0;::::1;::::0;::::1;:::i;30479:244::-:0;2161:5;;-1:-1:-1;;;;;2161:5:2;2147:10;:19;2139:46;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;;;;30592:15;-1:-1:-1;;;;;2786:22:2;::::1;2778:47;;;::::0;;-1:-1:-1;;;2778:47:2;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2778:47:2;;;;;;;;;;;;;::::1;;30625:14:::2;:32:::0;;-1:-1:-1;;;;;;30625:32:2::2;-1:-1:-1::0;;;;;30625:32:2;::::2;::::0;;::::2;::::0;;;30673:42:::2;::::0;;;;;30704:10:::2;30673:42;::::0;::::2;::::0;;;::::2;::::0;;;;;;;;::::2;2280:1:::1;30479:244:::0;:::o;29522:289::-;29646:1;29615:19;;;:9;:19;;;;;;29581:13;;-1:-1:-1;;;;;29615:19:2;29607:56;;;;;-1:-1:-1;;;29607:56:2;;;;;;;;;;;;-1:-1:-1;;;29607:56:2;;;;;;;;;;;;;;;29736:12;29750:16;29768:19;29778:8;29768:9;:19::i;30055:288::-;2161:5;;-1:-1:-1;;;;;2161:5:2;2147:10;:19;2139:46;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;-1:-1:-1;;;2139:46:2;;;;;;;;;;;;;;;30180:21;-1:-1:-1;;;;;2786:22:2;::::1;2778:47;;;::::0;;-1:-1:-1;;;2778:47:2;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2778:47:2;;;;;;;;;;;;;::::1;;30219:20:::2;:44:::0;;-1:-1:-1;;;;;;30219:44:2::2;-1:-1:-1::0;;;;;30219:44:2;::::2;::::0;;::::2;::::0;;;30281:54:::2;::::0;;;;;30324:10:::2;30281:54;::::0;::::2;::::0;;;::::2;::::0;;;;;;;;::::2;2280:1:::1;30055:288:::0;:::o;31867:166::-;32005:20;;-1:-1:-1;;;;;32005:20:2;31867:166;:::o;18606:223::-;-1:-1:-1;;;;;18783:27:2;;;18754:4;18783:27;;;:17;:27;;;;;;;;:38;;;;;;;;;;;;;;;18606:223::o;3352:1392::-;-1:-1:-1;;;;;3551:17:2;;3543:49;;;;;-1:-1:-1;;;3543:49:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;3543:49:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;3715:19:2;;3724:10;3715:19;;:67;;-1:-1:-1;;;;;;3738:24:2;;;;;;:17;:24;;;;;;;;3763:10;3738:36;;;;;;;;;;:44;;:36;:44;3715:67;3693:132;;;;;-1:-1:-1;;;3693:132:2;;;;;;;;;;;;-1:-1:-1;;;3693:132:2;;;;;;;;;;;;;;;3929:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;3929:25:2;;;;;;;;;;:35;;3921:50;;;;;-1:-1:-1;;;3921:50:2;;;;;;;;;;;;-1:-1:-1;;;3921:50:2;;;;;;;;;;;;;;;4121:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;4121:25:2;;;;;;;;;;:37;;4151:6;4121:29;:37::i;:::-;4093:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;4093:25:2;;;;;;;;;;:65;;;;4206:23;;;;;;4195:35;;:6;;:10;:35::i;:::-;4169:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;4169:23:2;;;;;;;;;;;;;:61;;;;4252:14;;4243:135;;-1:-1:-1;;;4243:135:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4252:14;;;4243:42;;:135;;;;;4169:18;;4243:135;;;;;4169:18;4252:14;4243:135;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4396:56:2;;;;;;;;;;;;;;-1:-1:-1;;;;;4396:56:2;;;;-1:-1:-1;4396:56:2;;;-1:-1:-1;4411:10:2;;-1:-1:-1;;;;;;;;;;;4396:56:2;;;;;;;4568:168;4613:10;4638:5;4658:3;4676:8;4699:6;4720:5;;4568:168;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4568:30:2;;-1:-1:-1;;;4568:168:2:i;:::-;3352:1392;;;;;;:::o;24784:190::-;2363:20;;-1:-1:-1;;;;;2363:20:2;2341:109;;;;;-1:-1:-1;;;2341:109:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2341:109:2;;;;;;;;;;;;;;;2573:20;;-1:-1:-1;;;;;2573:20:2;2559:10;:34;2551:62;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;-1:-1:-1;;;2551:62:2;;;;;;;;;;;;;;;24933:33:::1;24939:8;24949;24959:6;24933:5;:33::i;32154:154::-:0;32286:14;;-1:-1:-1;;;;;32286:14:2;32154:154;:::o;30962:531::-;31043:27;31092:7;31088:50;;-1:-1:-1;31116:10:2;;;;;;;;;;;;-1:-1:-1;;;31116:10:2;;;;;;31088:50;31160:2;31148:9;31195:69;31202:6;;31195:69;;31225:5;;31250:2;31245:7;;;;31195:69;;;31274:17;31304:3;-1:-1:-1;;;;;31294:14:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31294:14:2;-1:-1:-1;31274:34:2;-1:-1:-1;;;31331:7:2;;31349:107;31356:7;;31349:107;;31416:2;31411;:7;31405:2;:14;31392:29;;31380:4;31385:3;;;;;;;31380:9;;;;;;;;;;;:41;-1:-1:-1;;;;;31380:41:2;;;;;;;;-1:-1:-1;31442:2:2;31436:8;;;;31349:107;;;-1:-1:-1;31480:4:2;30962:531;-1:-1:-1;;;;30962:531:2:o;23583:954::-;-1:-1:-1;;;;;23761:17:2;;23753:49;;;;;-1:-1:-1;;;23753:49:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;23753:49:2;;;;;;;;;;;;;;;23931:7;:14;23911:9;:16;:34;23903:71;;;;;-1:-1:-1;;;23903:71:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;23903:71:2;;;;;;;;;;;;;;;24083:9;24078:179;24102:9;:16;24098:1;:20;24078:179;;;24170:75;24203:8;:22;24212:9;24222:1;24212:12;;;;;;;;;;;;;;24203:22;;;;;;;;;;;:27;24226:3;-1:-1:-1;;;;;24203:27:2;-1:-1:-1;;;;;24203:27:2;;;;;;;;;;;;;24170:7;24178:1;24170:10;;;;;;;;;;;;;;:14;;:75;;;;:::i;:::-;24140:8;:22;24149:9;24159:1;24149:12;;;;;;;;;;;;;;;;;;;24140:22;;;;;;;;;;;;;-1:-1:-1;24140:22:2;;;-1:-1:-1;;;;;24140:27:2;;;;;;;;;:105;24120:3;;24078:179;;;;24312:3;-1:-1:-1;;;;;24274:62:2;24308:1;-1:-1:-1;;;;;24274:62:2;24288:10;-1:-1:-1;;;;;24274:62:2;-1:-1:-1;;;;;;;;;;;24317:9:2;24328:7;24274:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24349:180;24399:10;24432:1;24449:3;24467:9;24491:7;24513:5;24349:35;:180::i;8125:845::-;8277:5;-1:-1:-1;;;;;8256:26:2;:17;8264:8;8256:7;:17::i;:::-;-1:-1:-1;;;;;8256:26:2;;8248:53;;;;;-1:-1:-1;;;8248:53:2;;;;;;;;;;;;-1:-1:-1;;;8248:53:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;8404:17:2;;8396:49;;;;;-1:-1:-1;;;8396:49:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8396:49:2;;;;;;;;;;;;;;;8580:1;8548:21;;;:11;:21;;;;;;;;:34;;-1:-1:-1;;;;;;8548:34:2;;;;;;-1:-1:-1;;;;;8595:17:2;;;;;:10;:17;;;;;;:19;;-1:-1:-1;;8595:19:2;;;8625:15;;;;;;;;;:17;;8548:34;8625:17;;;;;;8655:19;;;:9;:19;;;;;;:25;;;;;;;;;8716:20;;8701:68;;-1:-1:-1;;;8701:68:2;;;;;;;;;;8716:20;;;;;8701:58;;:68;;;;;8548:21;;8701:68;;;;;8716:20;8701:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8701:68:2;8693:95;;;;;-1:-1:-1;;;8693:95:2;;;;;;;;;;;;-1:-1:-1;;;8693:95:2;;;;;;;;;;;;;;;8810:14;;8801:113;;;-1:-1:-1;;;8801:113:2;;-1:-1:-1;;;;;8801:113:2;;;;;;;;;;;;;;;;;;;;;;8810:14;;;;;8801:41;;:113;;;;;8810:14;;8801:113;;;;;;;8810:14;;8801:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8953:8;8948:3;-1:-1:-1;;;;;8932:30:2;8941:5;-1:-1:-1;;;;;8932:30:2;-1:-1:-1;;;;;;;;;;;8932:30:2;;;;;;;;;8125:845;;;:::o;3128:155:23:-;3186:7;3218:1;3213;:6;;3205:49;;;;;-1:-1:-1;;;3205:49:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3271:5:23;;;3128:155::o;2682:175::-;2740:7;2771:5;;;2794:6;;;;2786:46;;;;;-1:-1:-1;;;2786:46:23;;;;;;;;;;;;-1:-1:-1;;;2786:46:23;;;;;;;;;;;;;;;2849:1;2682:175;-1:-1:-1;;;2682:175:23:o;14529:740:2:-;14780:16;:3;-1:-1:-1;;;;;14780:14:2;;:16::i;:::-;14776:486;;;15060:57;;;-1:-1:-1;;;;;14839:278:2;;14860:3;-1:-1:-1;;;;;14839:48:2;;14910:9;14942:5;14970:9;15002:7;15032:5;14839:217;;;;;;;;;;;;;-1:-1:-1;;;;;14839:217:2;;;;;;-1:-1:-1;;;;;14839:217:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14839:217:2;-1:-1:-1;;;;;;14839:278:2;;14813:353;;;;;-1:-1:-1;;;14813:353:2;;;;;;;;;;;;-1:-1:-1;;;14813:353:2;;;;;;;;;;;;;;22031:454;-1:-1:-1;;;;;22105:17:2;;22097:49;;;;;-1:-1:-1;;;22097:49:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22097:49:2;;;;;;;;;;;;;;;22300:1;22269:19;;;:9;:19;;;;;;-1:-1:-1;;;;;22269:19:2;:33;22247:111;;;;;-1:-1:-1;;;22247:111:2;;;;;;;;;;;;-1:-1:-1;;;22247:111:2;;;;;;;;;;;;;;;22371:19;;;;:9;:19;;;;;;;;:25;;-1:-1:-1;;;;;;22371:25:2;-1:-1:-1;;;;;22371:25:2;;;;;;;;22407:15;;;:10;:15;;;;;;:17;;-1:-1:-1;22407:17:2;;;22442:35;22371:19;;;-1:-1:-1;;;;;;;;;;;22442:35:2;22371:19;;22442:35;22031:454;;:::o;26512:819::-;-1:-1:-1;;;;;26666:22:2;;26658:54;;;;;-1:-1:-1;;;26658:54:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26658:54:2;;;;;;;;;;;;;;;26841:7;:14;26821:9;:16;:34;26813:71;;;;;-1:-1:-1;;;26813:71:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26813:71:2;;;;;;;;;;;;;;;26993:9;26988:175;27012:9;:16;27008:1;:20;26988:175;;;27085:66;27140:7;27148:1;27140:10;;;;;;;;;;;;;;27085:8;:22;27094:9;27104:1;27094:12;;;;;;;;;;;;;;27085:22;;;;;;;;;;;:32;27108:8;-1:-1:-1;;;;;27085:32:2;-1:-1:-1;;;;;27085:32:2;;;;;;;;;;;;;:54;;:66;;;;:::i;:::-;27050:8;:22;27059:9;27069:1;27059:12;;;;;;;;;;;;;;;;;;;27050:22;;;;;;;;;;;;;-1:-1:-1;27050:22:2;;;-1:-1:-1;;;;;27050:32:2;;;;;;;;;:101;27030:3;;26988:175;;;;27264:1;-1:-1:-1;;;;;27180:143:2;27233:8;-1:-1:-1;;;;;27180:143:2;27208:10;-1:-1:-1;;;;;27180:143:2;-1:-1:-1;;;;;;;;;;;27281:9:2;27305:7;27180:143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26512:819;;;:::o;20661:621::-;-1:-1:-1;;;;;20814:17:2;;20806:49;;;;;-1:-1:-1;;;20806:49:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20806:49:2;;;;;;;;;;;;;;;20976:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;20976:23:2;;;;;;;;;;:35;;21004:6;20976:27;:35::i;:::-;20950:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;20950:23:2;;;;;;;;;;;:61;;;;21027;;;;;;;;;;;;;21042:10;;-1:-1:-1;;;;;;;;;;;21027:61:2;;;;;;;;21101:173;21146:10;21179:1;21196:3;21214:8;21237:6;21258:5;21101:30;:173::i;718:413:26:-;1078:20;1116:8;;;718:413::o;13426:703:2:-;13652:16;:3;-1:-1:-1;;;;;13652:14:2;;:16::i;:::-;13648:474;;;13925:52;;;-1:-1:-1;;;;;13711:266:2;;13732:3;-1:-1:-1;;;;;13711:43:2;;13777:9;13809:5;13837:8;13868:6;13897:5;13711:210;;;;;;;;;;;;;-1:-1:-1;;;;;13711:210:2;;;;;;-1:-1:-1;;;;;13711:210:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25221:453;-1:-1:-1;;;;;25350:22:2;;25342:54;;;;;-1:-1:-1;;;25342:54:2;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;25342:54:2;;;;;;;;;;;;;;;25544:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;25544:28:2;;;;;;;;;;:40;;25577:6;25544:32;:40::i;:::-;25513:18;;;;:8;:18;;;;;;;;-1:-1:-1;;;;;25513:28:2;;;;;;;;;;;:71;;;;25600:66;;;;;;;;;;;;;25513:18;;:28;25615:10;;-1:-1:-1;;;;;;;;;;;25600:66:2;;;;;;;;25221:453;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\n\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\n\r\nimport \"./interfaces/IERC1155.sol\";\r\nimport \"./interfaces/IERC1155TokenReceiver.sol\";\r\nimport \"./interfaces/IERC721.sol\";\r\nimport \"./interfaces/IERC721TokenReceiver.sol\";\r\nimport \"./interfaces/IERC1155ERC721.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./interfaces/ICashier.sol\";\r\n\r\n//preparing for ERC-1066, ERC-1444, EIP-838\r\n\r\n/**\r\n * @title Multi-token contract, implementing ERC-1155 and ERC-721 hybrid\r\n * Inspired by: https://github.com/pixowl/sandbox-smart-contracts\r\n */\r\ncontract ERC1155ERC721 is IERC1155, IERC721, IERC1155ERC721 {\r\n using SafeMath for uint256;\r\n using Address for address;\r\n\r\n //min security\r\n address private owner; //contract owner\r\n address private voucherKernelAddress; //address of the VoucherKernel contract\r\n address private cashierAddress; //address of the Cashier contract\r\n\r\n //standard reqs\r\n //ERC-1155\r\n mapping(uint256 => mapping(address => uint256)) private balances; //balance of token ids of an account\r\n\r\n //ERC-721\r\n mapping(address => uint256) private balance721;\r\n mapping(uint256 => address) private owners721;\r\n mapping(uint256 => address) private operator721;\r\n\r\n //shared storage: ERC-1155 & ERC-721\r\n mapping(address => mapping(address => bool)) private operatorApprovals; //approval of accounts of an operator\r\n //metadata is shared, too (but ERC-1155 and ERC-721 have different metadata extension reqs)\r\n string internal metadataBase;\r\n string internal metadata1155Route;\r\n string internal metadata721Route;\r\n\r\n //ERC-1155 metadata event: URIs are defined in RFC 3986. The URI MUST point to a JSON file that conforms to the ERC-1155 Metadata URI JSON Schema.\r\n //not used ATM\r\n //event URI(string _value, uint256 indexed _id);\r\n\r\n event LogVoucherKernelSet(address _newVoucherKernel, address _triggeredBy);\r\n event LogCashierSet(address _newCashier, address _triggeredBy);\r\n\r\n modifier onlyOwner() {\r\n require(msg.sender == owner, \"UNAUTHORIZED_O\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyFromVoucherKernel() {\r\n require(\r\n voucherKernelAddress != address(0),\r\n \"UNSPECIFIED_VOUCHERKERNEL\"\r\n ); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == voucherKernelAddress, \"UNAUTHORIZED_VK\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier notZeroAddress(address _address) {\r\n require(_address != address(0), \"ZERO_ADDRESS\");\r\n _;\r\n }\r\n\r\n constructor() {\r\n owner = msg.sender;\r\n }\r\n\r\n /**\r\n * @notice Transfers amount of _tokenId from-to addresses with safety call.\r\n * If _to is a smart contract, will call onERC1155Received\r\n * @dev ERC-1155\r\n * @param _from Source address\r\n * @param _to Destination address\r\n * @param _tokenId ID of the token\r\n * @param _value Transfer amount\r\n * @param _data Additional data forwarded to onERC1155Received if _to is a contract\r\n */\r\n function safeTransferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _tokenId,\r\n uint256 _value,\r\n bytes calldata _data\r\n ) external override {\r\n require(_to != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(\r\n _from == msg.sender || operatorApprovals[_from][msg.sender] == true,\r\n \"UNAUTHORIZED_ST\"\r\n ); //hex\"10\"FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n require(balances[_tokenId][_from] == _value, \"IQ\"); //invalid qty\r\n\r\n // SafeMath throws with insufficient funds or if _id is not valid (balance will be 0)\r\n balances[_tokenId][_from] = balances[_tokenId][_from].sub(_value);\r\n balances[_tokenId][_to] = _value.add(balances[_tokenId][_to]);\r\n\r\n ICashier(cashierAddress).onERC1155Transfer(\r\n _from,\r\n _to,\r\n _tokenId,\r\n _value\r\n );\r\n\r\n emit TransferSingle(msg.sender, _from, _to, _tokenId, _value);\r\n\r\n //make sure the tx was accepted - in case of a revert below, the event above is reverted, too\r\n _doSafeTransferAcceptanceCheck(\r\n msg.sender,\r\n _from,\r\n _to,\r\n _tokenId,\r\n _value,\r\n _data\r\n );\r\n }\r\n\r\n /**\r\n * @notice Safely transfers the ownership of a given token ID to another address\r\n * If the target address is a contract, it must implement `onERC721Received`,\r\n * which is called upon a safe transfer, and return the magic value\r\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\r\n * the transfer is reverted.\r\n * Requires the msg.sender to be the owner, approved, or operator\r\n * @dev ERC-721\r\n * @param _from current owner of the token\r\n * @param _to address to receive the ownership of the given token ID\r\n * @param _tokenId uint256 ID of the token to be transferred\r\n */\r\n function safeTransferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _tokenId\r\n ) public override {\r\n safeTransferFrom(_from, _to, _tokenId, \"\");\r\n }\r\n\r\n /**\r\n * @notice Safely transfers the ownership of a given token ID to another address\r\n * If the target address is a contract, it must implement `onERC721Received`\r\n * Requires the msg.sender to be the owner, approved, or operator\r\n * @dev ERC-721\r\n * @param _from current owner of the token\r\n * @param _to address to receive the ownership of the given token ID\r\n * @param _tokenId uint256 ID of the token to be transferred\r\n * @param _data bytes data to send along with a safe transfer check\r\n */\r\n function safeTransferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _tokenId,\r\n bytes memory _data\r\n ) public override {\r\n transferFrom(_from, _to, _tokenId);\r\n\r\n if (_to.isContract()) {\r\n require(\r\n ERC721TokenReceiver(_to).onERC721Received(\r\n _from,\r\n _to,\r\n _tokenId,\r\n _data\r\n ) == ERC721TokenReceiver(_to).onERC721Received.selector,\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n }\r\n }\r\n\r\n /**\r\n * @notice Transfers the ownership of a given token ID to another address.\r\n * Usage of this method is discouraged, use `safeTransferFrom` whenever possible.\r\n * Requires the msg.sender to be the owner, approved, or operator.\r\n * @dev ERC-721\r\n * @param _from current owner of the token\r\n * @param _to address to receive the ownership of the given token ID\r\n * @param _tokenId uint256 ID of the token to be transferred\r\n */\r\n function transferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _tokenId\r\n ) public override {\r\n require(\r\n operator721[_tokenId] == msg.sender ||\r\n ownerOf(_tokenId) == msg.sender,\r\n \"NOT_OWNER_NOR_APPROVED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n _transferFrom(_from, _to, _tokenId);\r\n }\r\n\r\n /**\r\n * @notice Internal function to transfer ownership of a given token ID to another address.\r\n * As opposed to transferFrom, this imposes no restrictions on msg.sender.\r\n * @dev ERC-721\r\n * @param _from current owner of the token\r\n * @param _to address to receive the ownership of the given token ID\r\n * @param _tokenId uint256 ID of the token to be transferred\r\n */\r\n function _transferFrom(\r\n address _from,\r\n address _to,\r\n uint256 _tokenId\r\n ) internal {\r\n require(ownerOf(_tokenId) == _from, \"UNAUTHORIZED_T\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n require(_to != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n operator721[_tokenId] = address(0);\r\n\r\n balance721[_from]--;\r\n balance721[_to]++;\r\n\r\n owners721[_tokenId] = _to;\r\n\r\n require(IVoucherKernel(voucherKernelAddress).isVoucherTransferable(_tokenId), \"FUNDS_RELEASED\");\r\n\r\n ICashier(cashierAddress).onERC721Transfer(\r\n _from,\r\n _to,\r\n _tokenId\r\n );\r\n\r\n emit Transfer(_from, _to, _tokenId);\r\n }\r\n\r\n /**\r\n * @notice Approves another address to transfer the given token ID\r\n * The zero address indicates there is no approved address.\r\n * There can only be one approved address per token at a given time.\r\n * Can only be called by the token owner or an approved operator.\r\n * @dev ERC-721\r\n * @param _to address to be approved for the given token ID\r\n * @param _tokenId uint256 ID of the token to be approved\r\n */\r\n function approve(address _to, uint256 _tokenId) public override {\r\n address tokenOwner = ownerOf(_tokenId);\r\n require(_to != tokenOwner, \"REDUNDANT_CALL\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicatableToCurrentState)\r\n\r\n require(\r\n msg.sender == tokenOwner ||\r\n operatorApprovals[tokenOwner][msg.sender], // isApprovedForAll(owner, msg.sender),\r\n \"UNAUTHORIZED_A\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n //\"ERC721: approve caller is not owner nor approved for all\"\r\n\r\n operator721[_tokenId] = _to;\r\n emit Approval(tokenOwner, _to, _tokenId);\r\n }\r\n\r\n /**\r\n * @notice Gets the approved address for a token ID, or zero if no address set\r\n * Reverts if the token ID does not exist.\r\n * @dev ERC-721\r\n * @param _tokenId uint256 ID of the token to query the approval of\r\n * @return address currently approved for the given token ID\r\n */\r\n function getApproved(uint256 _tokenId)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n require(\r\n owners721[_tokenId] != address(0),\r\n \"ERC721: approved query for nonexistent token\"\r\n );\r\n\r\n return operator721[_tokenId];\r\n }\r\n\r\n /**\r\n @notice Transfers amount of _tokenId from-to addresses with safety call.\r\n If _to is a smart contract, will call onERC1155BatchReceived\r\n @dev ERC-1155\r\n @param _from Source address\r\n @param _to Destination address\r\n @param _tokenIds array of token IDs\r\n @param _values array of transfer amounts\r\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract\r\n */\r\n function safeBatchTransferFrom(\r\n address _from,\r\n address _to,\r\n uint256[] calldata _tokenIds,\r\n uint256[] calldata _values,\r\n bytes calldata _data\r\n ) external override {\r\n require(_to != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(_tokenIds.length == _values.length, \"MISMATCHED_ARRAY_LENGTHS\"); //hex\"28\" FISSION.code(FISSION.Category.Find, FISSION.Status.Duplicate_Conflict_Collision)\r\n require(\r\n _from == msg.sender || operatorApprovals[_from][msg.sender] == true,\r\n \"UNAUTHORIZED_SB\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n for (uint256 i = 0; i < _tokenIds.length; ++i) {\r\n uint256 tokenId = _tokenIds[i];\r\n uint256 value = _values[i];\r\n\r\n require(balances[tokenId][_from] == value, \"IQ\"); //invalid qty\r\n\r\n // SafeMath throws with insufficient funds or if _id is not valid (balance will be 0)\r\n balances[tokenId][_from] = balances[tokenId][_from].sub(value);\r\n balances[tokenId][_to] = value.add(balances[tokenId][_to]);\r\n\r\n ICashier(cashierAddress).onERC1155Transfer(\r\n _from,\r\n _to,\r\n tokenId,\r\n value\r\n );\r\n }\r\n\r\n emit TransferBatch(msg.sender, _from, _to, _tokenIds, _values);\r\n\r\n //make sure the tx was accepted - in case of a revert below, the event above is reverted, too\r\n _doSafeBatchTransferAcceptanceCheck(\r\n msg.sender,\r\n _from,\r\n _to,\r\n _tokenIds,\r\n _values,\r\n _data\r\n );\r\n }\r\n\r\n /**\r\n * @notice Check successful transfer if recipient is a contract\r\n * @dev ERC-1155\r\n * @param _operator The operator of the transfer\r\n * @param _from Address of sender\r\n * @param _to Address of recipient\r\n * @param _tokenId ID of the token\r\n * @param _value Value transferred\r\n * @param _data Optional data\r\n */\r\n function _doSafeTransferAcceptanceCheck(\r\n address _operator,\r\n address _from,\r\n address _to,\r\n uint256 _tokenId,\r\n uint256 _value,\r\n bytes memory _data\r\n ) internal {\r\n if (_to.isContract()) {\r\n require(\r\n ERC1155TokenReceiver(_to).onERC1155Received(\r\n _operator,\r\n _from,\r\n _tokenId,\r\n _value,\r\n _data\r\n ) == ERC1155TokenReceiver(_to).onERC1155Received.selector,\r\n \"NOT_SUPPORTED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n }\r\n }\r\n\r\n /**\r\n * @notice Check successful transfer if recipient is a contract\r\n * @dev ERC-1155\r\n * @param _operator The operator of the transfer\r\n * @param _from Address of sender\r\n * @param _to Address of recipient\r\n * @param _tokenIds Array of IDs of tokens\r\n * @param _values Array of values transferred\r\n * @param _data Optional data\r\n */\r\n function _doSafeBatchTransferAcceptanceCheck(\r\n address _operator,\r\n address _from,\r\n address _to,\r\n uint256[] memory _tokenIds,\r\n uint256[] memory _values,\r\n bytes memory _data\r\n ) internal {\r\n if (_to.isContract()) {\r\n require(\r\n ERC1155TokenReceiver(_to).onERC1155BatchReceived(\r\n _operator,\r\n _from,\r\n _tokenIds,\r\n _values,\r\n _data\r\n ) == ERC1155TokenReceiver(_to).onERC1155BatchReceived.selector,\r\n \"NOT_SUPPORTED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n }\r\n }\r\n\r\n /**\r\n @notice Get the balance of tokens of an account\r\n @dev ERC-1155\r\n @param _account The address of the token holder\r\n @param _tokenId ID of the token\r\n @return balance\r\n */\r\n function balanceOf(address _account, uint256 _tokenId)\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return balances[_tokenId][_account];\r\n }\r\n\r\n /// @notice Count all NFTs assigned to an owner\r\n /// @dev ERC-721\r\n /// @param _owner An address for whom to query the balance\r\n /// @return The number of NFTs owned by `_owner`, possibly zero\r\n function balanceOf(address _owner) public view override returns (uint256) {\r\n require(_owner != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n return balance721[_owner];\r\n }\r\n\r\n /**\r\n * @notice Gets the owner of the specified token ID.\r\n * @dev ERC-721\r\n * @param _tokenId uint256 ID of the token to query the owner of\r\n * @return address currently marked as the owner of the given token ID\r\n */\r\n function ownerOf(uint256 _tokenId) public view override returns (address) {\r\n address tokenOwner = owners721[_tokenId];\r\n require(tokenOwner != address(0), \"UNDEFINED_OWNER\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n return tokenOwner;\r\n }\r\n\r\n /**\r\n @notice Get the balance of account-token pairs.\r\n @dev ERC-1155\r\n @param _accounts The addresses of the token holders\r\n @param _tokenIds IDs of the tokens\r\n @return balances\r\n */\r\n function balanceOfBatch(\r\n address[] calldata _accounts,\r\n uint256[] calldata _tokenIds\r\n ) external view override returns (uint256[] memory) {\r\n require(\r\n _accounts.length == _tokenIds.length,\r\n \"MISMATCHED_ARRAY_LENGTHS\"\r\n ); //hex\"28\" FISSION.code(FISSION.Category.Find, FISSION.Status.Duplicate_Conflict_Collision)\r\n uint256[] memory batchBalances = new uint256[](_accounts.length);\r\n\r\n for (uint256 i = 0; i < _accounts.length; ++i) {\r\n batchBalances[i] = balances[_tokenIds[i]][_accounts[i]];\r\n }\r\n\r\n return batchBalances;\r\n }\r\n\r\n /**\r\n * @notice Approves or unapproves the operator.\r\n * will revert if the caller attempts to approve itself as it is redundant\r\n * @dev ERC-1155 & ERC-721\r\n * @param _operator to (un)approve\r\n * @param _approve flag to set or unset\r\n */\r\n function setApprovalForAll(address _operator, bool _approve)\r\n external\r\n override(IERC1155, IERC721)\r\n {\r\n require(msg.sender != _operator, \"REDUNDANT_CALL\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicatableToCurrentState)\r\n operatorApprovals[msg.sender][_operator] = _approve;\r\n emit ApprovalForAll(msg.sender, _operator, _approve);\r\n }\r\n\r\n /**\r\n @notice Gets approval status of an operator for a given account.\r\n @dev ERC-1155 & ERC-721\r\n @param _account token holder\r\n @param _operator operator to check\r\n @return True if the operator is approved, false if not\r\n */\r\n function isApprovedForAll(address _account, address _operator)\r\n public\r\n view\r\n override(IERC1155, IERC721)\r\n returns (bool)\r\n {\r\n return operatorApprovals[_account][_operator];\r\n }\r\n\r\n /**\r\n * @notice Returns true if this contract implements the interface defined by _interfaceId_.\r\n * This function call must use less than 30 000 gas. ATM not enforced.\r\n */\r\n function supportsInterface(bytes4 _interfaceId)\r\n external\r\n pure\r\n override\r\n returns (bool)\r\n {\r\n return\r\n //check matching against ERC-165 identifiers\r\n _interfaceId == 0x01ffc9a7 || //ERC-165\r\n _interfaceId == 0xd9b67a26 || //ERC-1155\r\n _interfaceId == 0x80ac58cd || //ERC-721\r\n _interfaceId == 0x5b5e139f || //ERC-721 metadata extension\r\n _interfaceId == 0x0e89341c; //ERC-1155 metadata extension\r\n }\r\n\r\n // // // // // // // //\r\n // STANDARD - UTILS\r\n // // // // // // // //\r\n /**\r\n * @notice Mint an amount of a desired token\r\n * Currently no restrictions as to who is allowed to mint - so, it is public.\r\n * @dev ERC-1155\r\n * @param _to owner of the minted token\r\n * @param _tokenId ID of the token to be minted\r\n * @param _value Amount of the token to be minted\r\n * @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract\r\n */\r\n function mint(\r\n address _to,\r\n uint256 _tokenId,\r\n uint256 _value,\r\n bytes memory _data\r\n ) public override onlyFromVoucherKernel {\r\n _mint(_to, _tokenId, _value, _data);\r\n }\r\n\r\n /**\r\n * @notice Internal function to mint an amount of a desired token\r\n * @dev ERC-1155\r\n * @param _to owner of the minted token\r\n * @param _tokenId ID of the token to be minted\r\n * @param _value Amount of the token to be minted\r\n * @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract\r\n */\r\n function _mint(\r\n address _to,\r\n uint256 _tokenId,\r\n uint256 _value,\r\n bytes memory _data\r\n ) internal {\r\n require(_to != address(0), \"UNSPECIFIED_ADDRESS\"); //FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n balances[_tokenId][_to] = balances[_tokenId][_to].add(_value);\r\n emit TransferSingle(msg.sender, address(0), _to, _tokenId, _value);\r\n\r\n _doSafeTransferAcceptanceCheck(\r\n msg.sender,\r\n address(0),\r\n _to,\r\n _tokenId,\r\n _value,\r\n _data\r\n );\r\n }\r\n\r\n /**\r\n * @notice Function to mint tokens.\r\n * @dev ERC-721\r\n * @param to The address that will receive the minted tokens.\r\n * @param tokenId The token id to mint.\r\n * @return A boolean that indicates if the operation was successful.\r\n */\r\n function mint(address to, uint256 tokenId)\r\n public\r\n override\r\n onlyFromVoucherKernel\r\n returns (bool)\r\n {\r\n _mint(to, tokenId);\r\n return true;\r\n }\r\n\r\n /**\r\n * @notice Internal function to mint a new token.\r\n * Reverts if the given token ID already exists.\r\n * @dev ERC-721\r\n * @param _to The address that will own the minted token\r\n * @param _tokenId uint256 ID of the token to be minted\r\n */\r\n function _mint(address _to, uint256 _tokenId) internal {\r\n require(_to != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(\r\n owners721[_tokenId] == address(0),\r\n \"ERC721: token already minted\"\r\n );\r\n\r\n owners721[_tokenId] = _to;\r\n balance721[_to]++;\r\n\r\n emit Transfer(address(0), _to, _tokenId);\r\n }\r\n\r\n /**\r\n * @notice Batch minting of tokens\r\n * Currently no restrictions as to who is allowed to mint - so, it is public.\r\n * @dev ERC-1155\r\n * @param _to The address that will own the minted token\r\n * @param _tokenIds IDs of the tokens to be minted\r\n * @param _values Amounts of the tokens to be minted\r\n * @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract\r\n */\r\n function mintBatch(\r\n address _to,\r\n uint256[] memory _tokenIds,\r\n uint256[] memory _values,\r\n bytes memory _data\r\n ) public onlyFromVoucherKernel {\r\n //require approved minter\r\n\r\n _mintBatch(_to, _tokenIds, _values, _data);\r\n }\r\n\r\n /**\r\n * @notice Internal function for batch minting of tokens\\\r\n * @dev ERC-1155\r\n * @param _to The address that will own the minted token\r\n * @param _tokenIds IDs of the tokens to be minted\r\n * @param _values Amounts of the tokens to be minted\r\n * @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract\r\n */\r\n function _mintBatch(\r\n address _to,\r\n uint256[] memory _tokenIds,\r\n uint256[] memory _values,\r\n bytes memory _data\r\n ) internal {\r\n require(_to != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(_tokenIds.length == _values.length, \"MISMATCHED_ARRAY_LENGTHS\"); //hex\"28\" FISSION.code(FISSION.Category.Find, FISSION.Status.Duplicate_Conflict_Collision)\r\n\r\n for (uint256 i = 0; i < _tokenIds.length; i++) {\r\n balances[_tokenIds[i]][_to] = _values[i].add(\r\n balances[_tokenIds[i]][_to]\r\n );\r\n }\r\n\r\n emit TransferBatch(msg.sender, address(0), _to, _tokenIds, _values);\r\n\r\n _doSafeBatchTransferAcceptanceCheck(\r\n msg.sender,\r\n address(0),\r\n _to,\r\n _tokenIds,\r\n _values,\r\n _data\r\n );\r\n }\r\n\r\n /**\r\n * @notice Burn an amount of tokens with the given ID\r\n * @dev ERC-1155\r\n * @param _account Account which owns the token\r\n * @param _tokenId ID of the token\r\n * @param _value Amount of the token\r\n */\r\n function burn(\r\n address _account,\r\n uint256 _tokenId,\r\n uint256 _value\r\n ) public override onlyFromVoucherKernel {\r\n _burn(_account, _tokenId, _value);\r\n }\r\n\r\n /**\r\n * @notice Burn an amount of tokens with the given ID\r\n * @dev ERC-1155\r\n * @param _account Account which owns the token\r\n * @param _tokenId ID of the token\r\n * @param _value Amount of the token\r\n */\r\n function _burn(\r\n address _account,\r\n uint256 _tokenId,\r\n uint256 _value\r\n ) internal {\r\n require(_account != address(0), \"UNSPECIFIED_ADDRESS\"); //\"UNSPECIFIED_ADDRESS\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n balances[_tokenId][_account] = balances[_tokenId][_account].sub(_value);\r\n emit TransferSingle(msg.sender, _account, address(0), _tokenId, _value);\r\n }\r\n\r\n /* Burning ERC-721 is not allowed, as a voucher (being an ERC-721 token) has a final state and shouldn't be destructed. */\r\n\r\n /**\r\n * @notice Batch burn an amounts of tokens\r\n * @dev ERC-1155\r\n * @param _account Account which owns the token\r\n * @param _tokenIds IDs of the tokens\r\n * @param _values Amounts of the tokens\r\n */\r\n function burnBatch(\r\n address _account,\r\n uint256[] memory _tokenIds,\r\n uint256[] memory _values\r\n ) public onlyFromVoucherKernel {\r\n _burnBatch(_account, _tokenIds, _values);\r\n }\r\n\r\n /**\r\n * @notice Internal function to batch burn an amounts of tokens\r\n * @dev ERC-1155\r\n * @param _account Account which owns the token\r\n * @param _tokenIds IDs of the tokens\r\n * @param _values Amounts of the tokens\r\n */\r\n function _burnBatch(\r\n address _account,\r\n uint256[] memory _tokenIds,\r\n uint256[] memory _values\r\n ) internal {\r\n require(_account != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(_tokenIds.length == _values.length, \"MISMATCHED_ARRAY_LENGTHS\"); //hex\"28\" FISSION.code(FISSION.Category.Find, FISSION.Status.Duplicate_Conflict_Collision)\r\n\r\n for (uint256 i = 0; i < _tokenIds.length; i++) {\r\n balances[_tokenIds[i]][_account] = balances[_tokenIds[i]][_account]\r\n .sub(_values[i]);\r\n }\r\n\r\n emit TransferBatch(\r\n msg.sender,\r\n _account,\r\n address(0),\r\n _tokenIds,\r\n _values\r\n );\r\n }\r\n\r\n // // // // // // // //\r\n // METADATA EXTENSIONS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Setting the URL prefix for tokens metadata\r\n * @param _newBase New prefix to be used\r\n */\r\n function _setMetadataBase(string memory _newBase) public onlyOwner {\r\n metadataBase = _newBase;\r\n }\r\n\r\n /**\r\n * @notice Setting the URL route for ERC1155 tokens metadata\r\n * @param _newRoute New route to be used\r\n */\r\n function _set1155Route(string memory _newRoute) public onlyOwner {\r\n metadata1155Route = _newRoute;\r\n }\r\n\r\n /**\r\n * @notice Setting the URL route for ERC721 tokens metadata\r\n * @param _newRoute New route to be used\r\n */\r\n function _set721Route(string memory _newRoute) public onlyOwner {\r\n metadata721Route = _newRoute;\r\n }\r\n\r\n /**\r\n * @notice A distinct Uniform Resource Identifier (URI) for a given token.\r\n * @dev ERC-1155\r\n * URIs are defined in RFC 3986. The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".\r\n * @param _tokenId The ID of the token\r\n * @return Full URI string for metadata of the _tokenId\r\n */\r\n function uri(uint256 _tokenId) external view returns (string memory) {\r\n return\r\n string(\r\n abi.encodePacked(metadataBase, metadata1155Route, _uint2str(_tokenId))\r\n );\r\n }\r\n\r\n /**\r\n * @notice A descriptive name for a collection of NFTs in this contract\r\n * @dev ERC-721\r\n */\r\n function name() external pure returns (string memory _name) {\r\n return \"Boson Smart Voucher\";\r\n }\r\n\r\n /**\r\n * @notice An abbreviated name for NFTs in this contract\r\n * @dev ERC-721\r\n */\r\n function symbol() external pure returns (string memory _symbol) {\r\n return \"BSV\";\r\n }\r\n\r\n /**\r\n * @notice A distinct Uniform Resource Identifier (URI) for a given asset.\r\n * @dev ERC-721\r\n * Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC 3986. The URI may point to a JSON file that conforms to the \"ERC721 Metadata JSON Schema\".\r\n * @param _tokenId ID of the token\r\n */\r\n function tokenURI(uint256 _tokenId) external view returns (string memory) {\r\n require(owners721[_tokenId] != address(0), \"INVALID_ID\");\r\n return\r\n string(\r\n abi.encodePacked(metadataBase, metadata721Route, _uint2str(_tokenId))\r\n );\r\n }\r\n\r\n // // // // // // // //\r\n // UTILS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Set the address of the VoucherKernel contract\r\n * @param _voucherKernelAddress The address of the Voucher Kernel contract\r\n */\r\n function setVoucherKernelAddress(address _voucherKernelAddress)\r\n external\r\n onlyOwner\r\n notZeroAddress(_voucherKernelAddress)\r\n {\r\n voucherKernelAddress = _voucherKernelAddress;\r\n\r\n emit LogVoucherKernelSet(_voucherKernelAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the address of the cashier contract\r\n * @param _cashierAddress The Cashier contract\r\n */\r\n function setCashierAddress(address _cashierAddress)\r\n external\r\n onlyOwner\r\n notZeroAddress(_cashierAddress)\r\n {\r\n cashierAddress = _cashierAddress;\r\n emit LogCashierSet(_cashierAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Convert UINT to string\r\n * Thank you, Oraclize (aka Provable)!\r\n * https://github.com/provable-things/ethereum-api/blob/master/provableAPI_0.5.sol\r\n * @param _i uint parameter\r\n */\r\n function _uint2str(uint256 _i)\r\n internal\r\n pure\r\n returns (string memory _uintAsString)\r\n {\r\n if (_i == 0) {\r\n return \"0\";\r\n }\r\n uint256 j = _i;\r\n uint256 len;\r\n while (j != 0) {\r\n len++;\r\n j /= 10;\r\n }\r\n bytes memory bstr = new bytes(len);\r\n uint256 k = len - 1;\r\n while (_i != 0) {\r\n bstr[k--] = bytes1(uint8(48 + (_i % 10)));\r\n _i /= 10;\r\n }\r\n return string(bstr);\r\n }\r\n\r\n /**\r\n * @notice Get the contract owner\r\n * @return Address of the owner\r\n */\r\n function getOwner() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return owner;\r\n }\r\n\r\n /**\r\n * @notice Get the address of Voucher Kernel contract\r\n * @return Address of Voucher Kernel contract\r\n */\r\n function getVoucherKernelAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return voucherKernelAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the address of Cashier contract\r\n * @return Address of Cashier address\r\n */\r\n function getCashierAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return cashierAddress;\r\n }\r\n \r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/ERC1155ERC721.sol", + "ast": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/ERC1155ERC721.sol", + "exportedSymbols": { + "ERC1155ERC721": [ + 5767 + ] + }, + "id": 5768, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4107, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:2" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4108, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 12500, + "src": "75:51:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 4109, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 13087, + "src": "128:51:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 4110, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8895, + "src": "183:35:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155TokenReceiver.sol", + "file": "./interfaces/IERC1155TokenReceiver.sol", + "id": 4111, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8995, + "src": "220:48:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 4112, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 9232, + "src": "270:34:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 4113, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 9250, + "src": "306:47:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 4114, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8957, + "src": "355:41:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 4115, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 9644, + "src": "398:41:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol", + "file": "./interfaces/ICashier.sol", + "id": 4116, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8785, + "src": "441:35:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4118, + "name": "IERC1155", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8894, + "src": "705:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 4119, + "nodeType": "InheritanceSpecifier", + "src": "705:8:2" + }, + { + "baseName": { + "id": 4120, + "name": "IERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9231, + "src": "715:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 4121, + "nodeType": "InheritanceSpecifier", + "src": "715:7:2" + }, + { + "baseName": { + "id": 4122, + "name": "IERC1155ERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8956, + "src": "724:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 4123, + "nodeType": "InheritanceSpecifier", + "src": "724:14:2" + } + ], + "contractDependencies": [ + 8894, + 8956, + 9006, + 9231 + ], + "contractKind": "contract", + "documentation": { + "id": 4117, + "nodeType": "StructuredDocumentation", + "src": "527:150:2", + "text": " @title Multi-token contract, implementing ERC-1155 and ERC-721 hybrid\n Inspired by: https://github.com/pixowl/sandbox-smart-contracts" + }, + "fullyImplemented": true, + "id": 5767, + "linearizedBaseContracts": [ + 5767, + 8956, + 9231, + 9006, + 8894 + ], + "name": "ERC1155ERC721", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4126, + "libraryName": { + "id": 4124, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "752:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "746:27:2", + "typeName": { + "id": 4125, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "765:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 4129, + "libraryName": { + "id": 4127, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "785:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "779:26:2", + "typeName": { + "id": 4128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "797:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "constant": false, + "id": 4131, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "833:21:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4130, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "833:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4133, + "mutability": "mutable", + "name": "voucherKernelAddress", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "878:36:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "878:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4135, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "961:30:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "961:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4141, + "mutability": "mutable", + "name": "balances", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1071:64:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + }, + "typeName": { + "id": 4140, + "keyType": { + "id": 4136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1079:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1071:47:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + }, + "valueType": { + "id": 4139, + "keyType": { + "id": 4137, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1098:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1090:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4138, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1109:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4145, + "mutability": "mutable", + "name": "balance721", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1196:46:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4144, + "keyType": { + "id": 4142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1204:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1196:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1215:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4149, + "mutability": "mutable", + "name": "owners721", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1249:45:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 4148, + "keyType": { + "id": 4146, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1257:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1249:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 4147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4153, + "mutability": "mutable", + "name": "operator721", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1301:47:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 4152, + "keyType": { + "id": 4150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1309:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1301:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 4151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1320:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4159, + "mutability": "mutable", + "name": "operatorApprovals", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1399:70:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "typeName": { + "id": 4158, + "keyType": { + "id": 4154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1407:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1399:44:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "valueType": { + "id": 4157, + "keyType": { + "id": 4155, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1426:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1418:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 4156, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1437:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4161, + "mutability": "mutable", + "name": "metadataBase", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1611:28:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4160, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1611:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4163, + "mutability": "mutable", + "name": "metadata1155Route", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1646:33:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4162, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1646:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4165, + "mutability": "mutable", + "name": "metadata721Route", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1686:32:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4164, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1686:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "anonymous": false, + "id": 4171, + "name": "LogVoucherKernelSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 4170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4167, + "indexed": false, + "mutability": "mutable", + "name": "_newVoucherKernel", + "nodeType": "VariableDeclaration", + "scope": 4171, + "src": "1981:25:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1981:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4169, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 4171, + "src": "2008:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2008:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1980:49:2" + }, + "src": "1955:75:2" + }, + { + "anonymous": false, + "id": 4177, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 4176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4173, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 4177, + "src": "2056:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2056:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4175, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 4177, + "src": "2077:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2077:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2055:43:2" + }, + "src": "2036:63:2" + }, + { + "body": { + "id": 4188, + "nodeType": "Block", + "src": "2128:161:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4180, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2147:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2147:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4182, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "2161:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2147:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4f", + "id": 4184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2168:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", + "typeString": "literal_string \"UNAUTHORIZED_O\"" + }, + "value": "UNAUTHORIZED_O" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", + "typeString": "literal_string \"UNAUTHORIZED_O\"" + } + ], + "id": 4179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2139:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2139:46:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4186, + "nodeType": "ExpressionStatement", + "src": "2139:46:2" + }, + { + "id": 4187, + "nodeType": "PlaceholderStatement", + "src": "2280:1:2" + } + ] + }, + "id": 4189, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 4178, + "nodeType": "ParameterList", + "parameters": [], + "src": "2125:2:2" + }, + "src": "2107:182:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4210, + "nodeType": "Block", + "src": "2330:387:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4192, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "2363:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2387:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4193, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2387:7:2", + "typeDescriptions": {} + } + }, + "id": 4196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2387:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2363:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f564f55434845524b45524e454c", + "id": 4198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2412:27:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35e7845fb5a39bd1c4191f758dba933d1bfe9e3c864842e431e6d5dc4068475", + "typeString": "literal_string \"UNSPECIFIED_VOUCHERKERNEL\"" + }, + "value": "UNSPECIFIED_VOUCHERKERNEL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35e7845fb5a39bd1c4191f758dba933d1bfe9e3c864842e431e6d5dc4068475", + "typeString": "literal_string \"UNSPECIFIED_VOUCHERKERNEL\"" + } + ], + "id": 4191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2341:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2341:109:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4200, + "nodeType": "ExpressionStatement", + "src": "2341:109:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4202, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2559:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2559:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4204, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "2573:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2559:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f564b", + "id": 4206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2595:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a2f0c2140d117207ed920dcb303a59a4da759cc226fe941427b02f3b235dfa27", + "typeString": "literal_string \"UNAUTHORIZED_VK\"" + }, + "value": "UNAUTHORIZED_VK" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a2f0c2140d117207ed920dcb303a59a4da759cc226fe941427b02f3b235dfa27", + "typeString": "literal_string \"UNAUTHORIZED_VK\"" + } + ], + "id": 4201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2551:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:62:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4208, + "nodeType": "ExpressionStatement", + "src": "2551:62:2" + }, + { + "id": 4209, + "nodeType": "PlaceholderStatement", + "src": "2708:1:2" + } + ] + }, + "id": 4211, + "name": "onlyFromVoucherKernel", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 4190, + "nodeType": "ParameterList", + "parameters": [], + "src": "2327:2:2" + }, + "src": "2297:420:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4226, + "nodeType": "Block", + "src": "2767:78:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4216, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4213, + "src": "2786:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2806:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2798:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4217, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2798:7:2", + "typeDescriptions": {} + } + }, + "id": 4220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2798:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2786:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5a45524f5f41444452455353", + "id": 4222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:14:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_71869b3729b99fadce3ee30cb1aa2a0d639e6a2d24158c1ae1ae0059e81b72af", + "typeString": "literal_string \"ZERO_ADDRESS\"" + }, + "value": "ZERO_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_71869b3729b99fadce3ee30cb1aa2a0d639e6a2d24158c1ae1ae0059e81b72af", + "typeString": "literal_string \"ZERO_ADDRESS\"" + } + ], + "id": 4215, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2778:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2778:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4224, + "nodeType": "ExpressionStatement", + "src": "2778:47:2" + }, + { + "id": 4225, + "nodeType": "PlaceholderStatement", + "src": "2836:1:2" + } + ] + }, + "id": 4227, + "name": "notZeroAddress", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 4214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4213, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 4227, + "src": "2749:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4212, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2749:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2748:18:2" + }, + "src": "2725:120:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4235, + "nodeType": "Block", + "src": "2867:37:2", + "statements": [ + { + "expression": { + "id": 4233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4230, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "2878:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 4231, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2886:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2886:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2878:18:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4234, + "nodeType": "ExpressionStatement", + "src": "2878:18:2" + } + ] + }, + "id": 4236, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4228, + "nodeType": "ParameterList", + "parameters": [], + "src": "2864:2:2" + }, + "returnParameters": { + "id": 4229, + "nodeType": "ParameterList", + "parameters": [], + "src": "2867:0:2" + }, + "scope": 5767, + "src": "2853:51:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8836 + ], + "body": { + "id": 4348, + "nodeType": "Block", + "src": "3532:1212:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4252, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "3551:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3566:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3558:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3558:7:2", + "typeDescriptions": {} + } + }, + "id": 4256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3558:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3551:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3570:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4251, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3543:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3543:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4260, + "nodeType": "ExpressionStatement", + "src": "3543:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4262, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "3715:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4263, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3724:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3724:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3715:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4266, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "3738:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4268, + "indexExpression": { + "id": 4267, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "3756:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3738:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4271, + "indexExpression": { + "expression": { + "id": 4269, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3763:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3763:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3738:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "74727565", + "id": 4272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3778:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3738:44:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3715:67:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f5354", + "id": 4275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3797:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ca5f8e7eb56d1b2f73830c4befc9c07536bf1cee80cce74bda91161d1c20d898", + "typeString": "literal_string \"UNAUTHORIZED_ST\"" + }, + "value": "UNAUTHORIZED_ST" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ca5f8e7eb56d1b2f73830c4befc9c07536bf1cee80cce74bda91161d1c20d898", + "typeString": "literal_string \"UNAUTHORIZED_ST\"" + } + ], + "id": 4261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3693:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3693:132:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4277, + "nodeType": "ExpressionStatement", + "src": "3693:132:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "3929:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4281, + "indexExpression": { + "id": 4280, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "3938:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3929:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4283, + "indexExpression": { + "id": 4282, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "3948:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3929:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4284, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "3958:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3929:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4951", + "id": 4286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3966:4:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + }, + "value": "IQ" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + } + ], + "id": 4278, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3921:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3921:50:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4288, + "nodeType": "ExpressionStatement", + "src": "3921:50:2" + }, + { + "expression": { + "id": 4302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4289, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4093:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4292, + "indexExpression": { + "id": 4290, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4102:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4093:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4293, + "indexExpression": { + "id": 4291, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4112:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4093:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4300, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4151:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4294, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4121:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4296, + "indexExpression": { + "id": 4295, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4130:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4121:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4298, + "indexExpression": { + "id": 4297, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4140:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4121:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "4121:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4121:37:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4093:65:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4303, + "nodeType": "ExpressionStatement", + "src": "4093:65:2" + }, + { + "expression": { + "id": 4317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4304, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4169:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4307, + "indexExpression": { + "id": 4305, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4178:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4169:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4308, + "indexExpression": { + "id": 4306, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4188:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4169:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 4311, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4206:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4313, + "indexExpression": { + "id": 4312, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4215:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4206:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4315, + "indexExpression": { + "id": 4314, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4225:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4206:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4309, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4195:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "4195:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4195:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4169:61:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4318, + "nodeType": "ExpressionStatement", + "src": "4169:61:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4323, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4300:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4324, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4320:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4325, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4338:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4326, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4361:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4320, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "4252:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4319, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4243:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 4321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 8737, + "src": "4243:42:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256) external" + } + }, + "id": 4327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:135:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4328, + "nodeType": "ExpressionStatement", + "src": "4243:135:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 4330, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4411:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4411:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4332, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4423:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4333, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4430:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4334, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4435:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4335, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4445:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4329, + "name": "TransferSingle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "4396:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 4336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4396:56:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4337, + "nodeType": "EmitStatement", + "src": "4391:61:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 4339, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4613:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4613:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4341, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4638:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4342, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4658:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4343, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4676:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4344, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4699:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4345, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4247, + "src": "4720:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 4338, + "name": "_doSafeTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4794, + "src": "4568:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256,bytes memory)" + } + }, + "id": 4346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4568:168:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4347, + "nodeType": "ExpressionStatement", + "src": "4568:168:2" + } + ] + }, + "documentation": { + "id": 4237, + "nodeType": "StructuredDocumentation", + "src": "2912:434:2", + "text": " @notice Transfers amount of _tokenId from-to addresses with safety call.\n If _to is a smart contract, will call onERC1155Received\n @dev ERC-1155\n @param _from Source address\n @param _to Destination address\n @param _tokenId ID of the token\n @param _value Transfer amount\n @param _data Additional data forwarded to onERC1155Received if _to is a contract" + }, + "functionSelector": "f242432a", + "id": 4349, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4249, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3523:8:2" + }, + "parameters": { + "id": 4248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4239, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3388:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3388:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4241, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3412:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3412:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4243, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3434:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3434:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4245, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3461:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3461:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4247, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3486:20:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4246, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3486:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3377:136:2" + }, + "returnParameters": { + "id": 4250, + "nodeType": "ParameterList", + "parameters": [], + "src": "3532:0:2" + }, + "scope": 5767, + "src": "3352:1392:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9186 + ], + "body": { + "id": 4367, + "nodeType": "Block", + "src": "5539:61:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4361, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4352, + "src": "5567:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4362, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "5574:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4363, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4356, + "src": "5579:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 4364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5589:2:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 4360, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4368, + 4412 + ], + "referencedDeclaration": 4412, + "src": "5550:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 4365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5550:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4366, + "nodeType": "ExpressionStatement", + "src": "5550:42:2" + } + ] + }, + "documentation": { + "id": 4350, + "nodeType": "StructuredDocumentation", + "src": "4752:659:2", + "text": " @notice Safely transfers the ownership of a given token ID to another address\n If the target address is a contract, it must implement `onERC721Received`,\n which is called upon a safe transfer, and return the magic value\n `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n the transfer is reverted.\n Requires the msg.sender to be the owner, approved, or operator\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred" + }, + "functionSelector": "42842e0e", + "id": 4368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4358, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5530:8:2" + }, + "parameters": { + "id": 4357, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4352, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4368, + "src": "5453:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5453:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4354, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4368, + "src": "5477:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4353, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5477:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4356, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4368, + "src": "5499:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4355, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5499:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5442:80:2" + }, + "returnParameters": { + "id": 4359, + "nodeType": "ParameterList", + "parameters": [], + "src": "5539:0:2" + }, + "scope": 5767, + "src": "5417:183:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9176 + ], + "body": { + "id": 4411, + "nodeType": "Block", + "src": "6298:514:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4382, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "6322:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4383, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6329:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4384, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4375, + "src": "6334:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4381, + "name": "transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4447 + ], + "referencedDeclaration": 4447, + "src": "6309:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6309:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4386, + "nodeType": "ExpressionStatement", + "src": "6309:34:2" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4387, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6360:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "6360:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6360:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4410, + "nodeType": "IfStatement", + "src": "6356:449:2", + "trueBody": { + "id": 4409, + "nodeType": "Block", + "src": "6378:427:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 4405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4395, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "6483:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4396, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6511:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4397, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4375, + "src": "6537:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4398, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4377, + "src": "6568:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 4392, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6439:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4391, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "6419:19:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6419:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "6419:41:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6419:173:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 4401, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6616:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4400, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "6596:19:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 4402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6596:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "6596:41:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "6596:50:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "6419:227:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 4406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6665:29:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 4390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6393:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6393:316:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4408, + "nodeType": "ExpressionStatement", + "src": "6393:316:2" + } + ] + } + } + ] + }, + "documentation": { + "id": 4369, + "nodeType": "StructuredDocumentation", + "src": "5608:533:2", + "text": " @notice Safely transfers the ownership of a given token ID to another address\n If the target address is a contract, it must implement `onERC721Received`\n Requires the msg.sender to be the owner, approved, or operator\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred\n @param _data bytes data to send along with a safe transfer check" + }, + "functionSelector": "b88d4fde", + "id": 4412, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4379, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6289:8:2" + }, + "parameters": { + "id": 4378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4371, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6183:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6183:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4373, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6207:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4372, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6207:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4375, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6229:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4374, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6229:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4377, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6256:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4376, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6256:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6172:109:2" + }, + "returnParameters": { + "id": 4380, + "nodeType": "ParameterList", + "parameters": [], + "src": "6298:0:2" + }, + "scope": 5767, + "src": "6147:665:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9196 + ], + "body": { + "id": 4446, + "nodeType": "Block", + "src": "7404:310:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 4424, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "7437:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4426, + "indexExpression": { + "id": 4425, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "7449:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7437:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4427, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7462:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7462:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7437:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4431, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "7501:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4430, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4908 + ], + "referencedDeclaration": 4908, + "src": "7493:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 4432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7493:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4433, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7514:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7514:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7493:31:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7437:87:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f545f4f574e45525f4e4f525f415050524f564544", + "id": 4437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7539:24:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6c1ef0880797d80cfb5d03f0706d17419220d72dedb8d29675f3cf2fe13f3aba", + "typeString": "literal_string \"NOT_OWNER_NOR_APPROVED\"" + }, + "value": "NOT_OWNER_NOR_APPROVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6c1ef0880797d80cfb5d03f0706d17419220d72dedb8d29675f3cf2fe13f3aba", + "typeString": "literal_string \"NOT_OWNER_NOR_APPROVED\"" + } + ], + "id": 4423, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7415:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7415:159:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4439, + "nodeType": "ExpressionStatement", + "src": "7415:159:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4441, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4415, + "src": "7685:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4442, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4417, + "src": "7692:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4443, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "7697:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4440, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4527, + "src": "7671:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7671:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4445, + "nodeType": "ExpressionStatement", + "src": "7671:35:2" + } + ] + }, + "documentation": { + "id": 4413, + "nodeType": "StructuredDocumentation", + "src": "6820:460:2", + "text": " @notice Transfers the ownership of a given token ID to another address.\n Usage of this method is discouraged, use `safeTransferFrom` whenever possible.\n Requires the msg.sender to be the owner, approved, or operator.\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred" + }, + "functionSelector": "23b872dd", + "id": 4447, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4421, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7395:8:2" + }, + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "7318:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4414, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7318:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4417, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "7342:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7342:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "7364:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4418, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7364:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7307:80:2" + }, + "returnParameters": { + "id": 4422, + "nodeType": "ParameterList", + "parameters": [], + "src": "7404:0:2" + }, + "scope": 5767, + "src": "7286:428:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 4526, + "nodeType": "Block", + "src": "8237:733:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4459, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8264:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4458, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4908 + ], + "referencedDeclaration": 4908, + "src": "8256:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8256:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4461, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8277:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8256:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f54", + "id": 4463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8284:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a346341f54e0d0a651e2d90fa5e8663272f9e42fbfd9680c5e5644c341fa6ca4", + "typeString": "literal_string \"UNAUTHORIZED_T\"" + }, + "value": "UNAUTHORIZED_T" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a346341f54e0d0a651e2d90fa5e8663272f9e42fbfd9680c5e5644c341fa6ca4", + "typeString": "literal_string \"UNAUTHORIZED_T\"" + } + ], + "id": 4457, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8248:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8248:53:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4465, + "nodeType": "ExpressionStatement", + "src": "8248:53:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4467, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8404:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8419:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8411:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8411:7:2", + "typeDescriptions": {} + } + }, + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8411:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8404:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8423:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4466, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8396:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8396:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4475, + "nodeType": "ExpressionStatement", + "src": "8396:49:2" + }, + { + "expression": { + "id": 4483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4476, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "8548:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4478, + "indexExpression": { + "id": 4477, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8560:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8548:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8580:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8572:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8572:7:2", + "typeDescriptions": {} + } + }, + "id": 4482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8572:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8548:34:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4484, + "nodeType": "ExpressionStatement", + "src": "8548:34:2" + }, + { + "expression": { + "id": 4488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "8595:19:2", + "subExpression": { + "baseExpression": { + "id": 4485, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "8595:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4487, + "indexExpression": { + "id": 4486, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8606:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8595:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4489, + "nodeType": "ExpressionStatement", + "src": "8595:19:2" + }, + { + "expression": { + "id": 4493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8625:17:2", + "subExpression": { + "baseExpression": { + "id": 4490, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "8625:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4492, + "indexExpression": { + "id": 4491, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8636:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8625:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4494, + "nodeType": "ExpressionStatement", + "src": "8625:17:2" + }, + { + "expression": { + "id": 4499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4495, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "8655:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4497, + "indexExpression": { + "id": 4496, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8665:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8655:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4498, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8677:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8655:25:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4500, + "nodeType": "ExpressionStatement", + "src": "8655:25:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4506, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8760:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4503, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "8716:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4502, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "8701:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 4504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8701:36:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 4505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isVoucherTransferable", + "nodeType": "MemberAccess", + "referencedDeclaration": 9574, + "src": "8701:58:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view external returns (bool)" + } + }, + "id": 4507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8701:68:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "46554e44535f52454c4541534544", + "id": 4508, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8771:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_934bfe8ea9e27d246dfc9d0083a676a42c03dee49dfbc9a3462184e5c60a4d6a", + "typeString": "literal_string \"FUNDS_RELEASED\"" + }, + "value": "FUNDS_RELEASED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_934bfe8ea9e27d246dfc9d0083a676a42c03dee49dfbc9a3462184e5c60a4d6a", + "typeString": "literal_string \"FUNDS_RELEASED\"" + } + ], + "id": 4501, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8693:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8693:95:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4510, + "nodeType": "ExpressionStatement", + "src": "8693:95:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4515, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8857:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4516, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8877:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4517, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8895:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4512, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "8810:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4511, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "8801:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 4513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8801:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 4514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 8725, + "src": "8801:41:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 4518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8801:113:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4519, + "nodeType": "ExpressionStatement", + "src": "8801:113:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4521, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8941:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4522, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8948:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4523, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8953:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4520, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9139, + "src": "8932:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8932:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4525, + "nodeType": "EmitStatement", + "src": "8927:35:2" + } + ] + }, + "documentation": { + "id": 4448, + "nodeType": "StructuredDocumentation", + "src": "7722:397:2", + "text": " @notice Internal function to transfer ownership of a given token ID to another address.\n As opposed to transferFrom, this imposes no restrictions on msg.sender.\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred" + }, + "id": 4527, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4455, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4450, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "8158:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4449, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8158:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4452, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "8182:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8182:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4454, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "8204:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8204:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8147:80:2" + }, + "returnParameters": { + "id": 4456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8237:0:2" + }, + "scope": 5767, + "src": "8125:845:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9204 + ], + "body": { + "id": 4576, + "nodeType": "Block", + "src": "9491:658:2", + "statements": [ + { + "assignments": [ + 4537 + ], + "declarations": [ + { + "constant": false, + "id": 4537, + "mutability": "mutable", + "name": "tokenOwner", + "nodeType": "VariableDeclaration", + "scope": 4576, + "src": "9502:18:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4536, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9502:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4541, + "initialValue": { + "arguments": [ + { + "id": 4539, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "9531:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4538, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4908 + ], + "referencedDeclaration": 4908, + "src": "9523:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 4540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9523:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9502:38:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4543, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "9559:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 4544, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "9566:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9559:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "524544554e44414e545f43414c4c", + "id": 4546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9578:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + }, + "value": "REDUNDANT_CALL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + } + ], + "id": 4542, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9551:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9551:44:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4548, + "nodeType": "ExpressionStatement", + "src": "9551:44:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4550, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9728:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9728:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4552, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "9742:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9728:24:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "baseExpression": { + "baseExpression": { + "id": 4554, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "9773:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4556, + "indexExpression": { + "id": 4555, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "9791:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9773:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4559, + "indexExpression": { + "expression": { + "id": 4557, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9803:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9803:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9773:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9728:86:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f41", + "id": 4561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9869:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b109989dc87862f05ce512959ee04fbc39856c04777748c77fbf8d55b7a8c011", + "typeString": "literal_string \"UNAUTHORIZED_A\"" + }, + "value": "UNAUTHORIZED_A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b109989dc87862f05ce512959ee04fbc39856c04777748c77fbf8d55b7a8c011", + "typeString": "literal_string \"UNAUTHORIZED_A\"" + } + ], + "id": 4549, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9706:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9706:190:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4563, + "nodeType": "ExpressionStatement", + "src": "9706:190:2" + }, + { + "expression": { + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4564, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "10063:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4566, + "indexExpression": { + "id": 4565, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "10075:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10063:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4567, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "10087:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10063:27:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4569, + "nodeType": "ExpressionStatement", + "src": "10063:27:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4571, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "10115:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4572, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "10127:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4573, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "10132:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4570, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9148, + "src": "10106:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10106:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4575, + "nodeType": "EmitStatement", + "src": "10101:40:2" + } + ] + }, + "documentation": { + "id": 4528, + "nodeType": "StructuredDocumentation", + "src": "8978:443:2", + "text": " @notice Approves another address to transfer the given token ID\n The zero address indicates there is no approved address.\n There can only be one approved address per token at a given time.\n Can only be called by the token owner or an approved operator.\n @dev ERC-721\n @param _to address to be approved for the given token ID\n @param _tokenId uint256 ID of the token to be approved" + }, + "functionSelector": "095ea7b3", + "id": 4577, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4534, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9482:8:2" + }, + "parameters": { + "id": 4533, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4530, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "9444:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9444:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4532, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "9457:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4531, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9457:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9443:31:2" + }, + "returnParameters": { + "id": 4535, + "nodeType": "ParameterList", + "parameters": [], + "src": "9491:0:2" + }, + "scope": 5767, + "src": "9427:722:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9220 + ], + "body": { + "id": 4602, + "nodeType": "Block", + "src": "10586:187:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 4587, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "10619:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4589, + "indexExpression": { + "id": 4588, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4580, + "src": "10629:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10619:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10650:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10642:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10642:7:2", + "typeDescriptions": {} + } + }, + "id": 4593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10642:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10619:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e", + "id": 4595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10667:46:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9291e0f44949204f2e9b40e6be090924979d6047b2365868f4e9f027722eb89d", + "typeString": "literal_string \"ERC721: approved query for nonexistent token\"" + }, + "value": "ERC721: approved query for nonexistent token" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9291e0f44949204f2e9b40e6be090924979d6047b2365868f4e9f027722eb89d", + "typeString": "literal_string \"ERC721: approved query for nonexistent token\"" + } + ], + "id": 4586, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10597:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10597:127:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4597, + "nodeType": "ExpressionStatement", + "src": "10597:127:2" + }, + { + "expression": { + "baseExpression": { + "id": 4598, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "10744:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4600, + "indexExpression": { + "id": 4599, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4580, + "src": "10756:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10744:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4585, + "id": 4601, + "nodeType": "Return", + "src": "10737:28:2" + } + ] + }, + "documentation": { + "id": 4578, + "nodeType": "StructuredDocumentation", + "src": "10157:304:2", + "text": " @notice Gets the approved address for a token ID, or zero if no address set\n Reverts if the token ID does not exist.\n @dev ERC-721\n @param _tokenId uint256 ID of the token to query the approval of\n @return address currently approved for the given token ID" + }, + "functionSelector": "081812fc", + "id": 4603, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4582, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10545:8:2" + }, + "parameters": { + "id": 4581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4580, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4603, + "src": "10488:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10488:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10487:18:2" + }, + "returnParameters": { + "id": 4585, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4584, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4603, + "src": "10572:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4583, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10572:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10571:9:2" + }, + "scope": 5767, + "src": "10467:306:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8852 + ], + "body": { + "id": 4751, + "nodeType": "Block", + "src": "11462:1581:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4621, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "11481:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11496:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11488:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11488:7:2", + "typeDescriptions": {} + } + }, + "id": 4625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11488:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "11481:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11500:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4620, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11473:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11473:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4629, + "nodeType": "ExpressionStatement", + "src": "11473:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4631, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "11631:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11631:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4633, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "11651:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11651:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11631:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 4636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11667:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 4630, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11623:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11623:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4638, + "nodeType": "ExpressionStatement", + "src": "11623:71:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4640, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "11818:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4641, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11827:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11827:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "11818:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4644, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "11841:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4646, + "indexExpression": { + "id": 4645, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "11859:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11841:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4649, + "indexExpression": { + "expression": { + "id": 4647, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11866:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11866:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11841:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "74727565", + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11881:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "11841:44:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11818:67:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f5342", + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11900:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_184887f256bf91e0eafcb177f95f3c8e3b254b2c7e9eb81c480965f351bfe007", + "typeString": "literal_string \"UNAUTHORIZED_SB\"" + }, + "value": "UNAUTHORIZED_SB" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_184887f256bf91e0eafcb177f95f3c8e3b254b2c7e9eb81c480965f351bfe007", + "typeString": "literal_string \"UNAUTHORIZED_SB\"" + } + ], + "id": 4639, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11796:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11796:132:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4655, + "nodeType": "ExpressionStatement", + "src": "11796:132:2" + }, + { + "body": { + "id": 4730, + "nodeType": "Block", + "src": "12072:598:2", + "statements": [ + { + "assignments": [ + 4668 + ], + "declarations": [ + { + "constant": false, + "id": 4668, + "mutability": "mutable", + "name": "tokenId", + "nodeType": "VariableDeclaration", + "scope": 4730, + "src": "12087:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4667, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12087:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4672, + "initialValue": { + "baseExpression": { + "id": 4669, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12105:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4671, + "indexExpression": { + "id": 4670, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12115:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12105:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12087:30:2" + }, + { + "assignments": [ + 4674 + ], + "declarations": [ + { + "constant": false, + "id": 4674, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 4730, + "src": "12132:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12132:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4678, + "initialValue": { + "baseExpression": { + "id": 4675, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "12148:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4677, + "indexExpression": { + "id": 4676, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12156:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12148:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12132:26:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4680, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12183:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4682, + "indexExpression": { + "id": 4681, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12192:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12183:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4684, + "indexExpression": { + "id": 4683, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12201:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12183:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4685, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12211:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12183:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4951", + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12218:4:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + }, + "value": "IQ" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + } + ], + "id": 4679, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12175:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12175:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4689, + "nodeType": "ExpressionStatement", + "src": "12175:48:2" + }, + { + "expression": { + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4690, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12353:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4693, + "indexExpression": { + "id": 4691, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12362:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12353:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4694, + "indexExpression": { + "id": 4692, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12371:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12353:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4701, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12409:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4695, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12380:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4697, + "indexExpression": { + "id": 4696, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12389:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12380:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4699, + "indexExpression": { + "id": 4698, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12398:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12380:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "12380:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12380:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12353:62:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4704, + "nodeType": "ExpressionStatement", + "src": "12353:62:2" + }, + { + "expression": { + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4705, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12430:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4708, + "indexExpression": { + "id": 4706, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12439:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12430:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4709, + "indexExpression": { + "id": 4707, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12448:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12430:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 4712, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12465:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4714, + "indexExpression": { + "id": 4713, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12474:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12465:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4716, + "indexExpression": { + "id": 4715, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12483:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12465:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4710, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12455:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "12455:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12455:33:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12430:58:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4719, + "nodeType": "ExpressionStatement", + "src": "12430:58:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4724, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12566:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4725, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12590:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4726, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12612:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4727, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12638:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4721, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "12514:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4720, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "12505:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 4722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12505:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 8737, + "src": "12505:42:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256) external" + } + }, + "id": 4728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12505:153:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4729, + "nodeType": "ExpressionStatement", + "src": "12505:153:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4660, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12045:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 4661, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12049:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "12049:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12045:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4731, + "initializationExpression": { + "assignments": [ + 4657 + ], + "declarations": [ + { + "constant": false, + "id": 4657, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 4731, + "src": "12030:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4656, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12030:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4659, + "initialValue": { + "hexValue": "30", + "id": 4658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12042:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "12030:13:2" + }, + "loopExpression": { + "expression": { + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "12067:3:2", + "subExpression": { + "id": 4664, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12069:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4666, + "nodeType": "ExpressionStatement", + "src": "12067:3:2" + }, + "nodeType": "ForStatement", + "src": "12025:645:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 4733, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12701:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12701:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4735, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12713:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4736, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12720:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4737, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12725:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 4738, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "12736:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + ], + "id": 4732, + "name": "TransferBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8815, + "src": "12687:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12687:57:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4740, + "nodeType": "EmitStatement", + "src": "12682:62:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 4742, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12910:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12910:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4744, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12935:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4745, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12955:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4746, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12973:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 4747, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "12997:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 4748, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4616, + "src": "13019:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 4741, + "name": "_doSafeBatchTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4838, + "src": "12860:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" + } + }, + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12860:175:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4750, + "nodeType": "ExpressionStatement", + "src": "12860:175:2" + } + ] + }, + "documentation": { + "id": 4604, + "nodeType": "StructuredDocumentation", + "src": "10781:466:2", + "text": "@notice Transfers amount of _tokenId from-to addresses with safety call.\nIf _to is a smart contract, will call onERC1155BatchReceived\n@dev ERC-1155\n@param _from Source address\n@param _to Destination address\n@param _tokenIds array of token IDs\n@param _values array of transfer amounts\n@param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "functionSelector": "2eb2c2d6", + "id": 4752, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeBatchTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4618, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11453:8:2" + }, + "parameters": { + "id": 4617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4606, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11294:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4605, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11294:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4608, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11318:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4607, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11318:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4611, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11340:28:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4609, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11340:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4610, + "nodeType": "ArrayTypeName", + "src": "11340:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4614, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11379:26:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11379:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4613, + "nodeType": "ArrayTypeName", + "src": "11379:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4616, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11416:20:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4615, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11416:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "11283:160:2" + }, + "returnParameters": { + "id": 4619, + "nodeType": "ParameterList", + "parameters": [], + "src": "11462:0:2" + }, + "scope": 5767, + "src": "11253:1790:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 4793, + "nodeType": "Block", + "src": "13637:492:2", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4768, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4759, + "src": "13652:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "13652:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13652:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4792, + "nodeType": "IfStatement", + "src": "13648:474:2", + "trueBody": { + "id": 4791, + "nodeType": "Block", + "src": "13670:452:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 4787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4776, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4755, + "src": "13777:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4777, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4757, + "src": "13809:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4778, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "13837:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4779, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "13868:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4780, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "13897:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 4773, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4759, + "src": "13732:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4772, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "13711:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13711:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 8975, + "src": "13711:43:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13711:210:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 4783, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4759, + "src": "13946:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4782, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "13925:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13925:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 8975, + "src": "13925:43:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "13925:52:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13711:266:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f545f535550504f52544544", + "id": 4788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13996:15:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + }, + "value": "NOT_SUPPORTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + } + ], + "id": 4771, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13685:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13685:341:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4790, + "nodeType": "ExpressionStatement", + "src": "13685:341:2" + } + ] + } + } + ] + }, + "documentation": { + "id": 4753, + "nodeType": "StructuredDocumentation", + "src": "13051:369:2", + "text": " @notice Check successful transfer if recipient is a contract\n @dev ERC-1155\n @param _operator The operator of the transfer\n @param _from Address of sender\n @param _to Address of recipient\n @param _tokenId ID of the token\n @param _value Value transferred\n @param _data Optional data" + }, + "id": 4794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_doSafeTransferAcceptanceCheck", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4755, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13476:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4754, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13476:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4757, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13504:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4756, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13504:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4759, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13528:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4758, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13528:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4761, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13550:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4760, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13550:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4763, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13577:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4762, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13577:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4765, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13602:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4764, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13602:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "13465:162:2" + }, + "returnParameters": { + "id": 4767, + "nodeType": "ParameterList", + "parameters": [], + "src": "13637:0:2" + }, + "scope": 5767, + "src": "13426:703:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4837, + "nodeType": "Block", + "src": "14765:504:2", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4812, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4801, + "src": "14780:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14780:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14780:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4836, + "nodeType": "IfStatement", + "src": "14776:486:2", + "trueBody": { + "id": 4835, + "nodeType": "Block", + "src": "14798:464:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4820, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4797, + "src": "14910:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4821, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4799, + "src": "14942:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4822, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4804, + "src": "14970:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 4823, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4807, + "src": "15002:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 4824, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4809, + "src": "15032:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 4817, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4801, + "src": "14860:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4816, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "14839:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14839:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155BatchReceived", + "nodeType": "MemberAccess", + "referencedDeclaration": 8993, + "src": "14839:48:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)" + } + }, + "id": 4825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14839:217:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 4827, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4801, + "src": "15081:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4826, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "15060:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15060:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155BatchReceived", + "nodeType": "MemberAccess", + "referencedDeclaration": 8993, + "src": "15060:48:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)" + } + }, + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "15060:57:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "14839:278:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f545f535550504f52544544", + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15136:15:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + }, + "value": "NOT_SUPPORTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + } + ], + "id": 4815, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14813:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14813:353:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4834, + "nodeType": "ExpressionStatement", + "src": "14813:353:2" + } + ] + } + } + ] + }, + "documentation": { + "id": 4795, + "nodeType": "StructuredDocumentation", + "src": "14137:386:2", + "text": " @notice Check successful transfer if recipient is a contract\n @dev ERC-1155\n @param _operator The operator of the transfer\n @param _from Address of sender\n @param _to Address of recipient\n @param _tokenIds Array of IDs of tokens\n @param _values Array of values transferred\n @param _data Optional data" + }, + "id": 4838, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_doSafeBatchTransferAcceptanceCheck", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4797, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14584:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14584:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4799, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14612:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4798, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14612:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4801, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14636:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4800, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14636:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4804, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14658:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14658:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4803, + "nodeType": "ArrayTypeName", + "src": "14658:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4807, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14695:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4805, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14695:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4806, + "nodeType": "ArrayTypeName", + "src": "14695:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4809, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14730:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4808, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14730:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "14573:182:2" + }, + "returnParameters": { + "id": 4811, + "nodeType": "ParameterList", + "parameters": [], + "src": "14765:0:2" + }, + "scope": 5767, + "src": "14529:740:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8862 + ], + "body": { + "id": 4855, + "nodeType": "Block", + "src": "15643:54:2", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4849, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "15661:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4851, + "indexExpression": { + "id": 4850, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4843, + "src": "15670:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15661:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4853, + "indexExpression": { + "id": 4852, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4841, + "src": "15680:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15661:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4848, + "id": 4854, + "nodeType": "Return", + "src": "15654:35:2" + } + ] + }, + "documentation": { + "id": 4839, + "nodeType": "StructuredDocumentation", + "src": "15277:223:2", + "text": "@notice Get the balance of tokens of an account\n@dev ERC-1155\n@param _account The address of the token holder\n@param _tokenId ID of the token\n@return balance" + }, + "functionSelector": "00fdd58e", + "id": 4856, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4845, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15602:8:2" + }, + "parameters": { + "id": 4844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4841, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "15525:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4840, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15525:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4843, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "15543:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4842, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15543:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15524:36:2" + }, + "returnParameters": { + "id": 4848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4847, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "15629:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15629:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15628:9:2" + }, + "scope": 5767, + "src": "15506:191:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9156 + ], + "body": { + "id": 4879, + "nodeType": "Block", + "src": "15987:199:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4866, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4859, + "src": "16006:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16024:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4868, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16016:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16016:7:2", + "typeDescriptions": {} + } + }, + "id": 4870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16016:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "16006:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16028:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4865, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15998:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15998:52:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4874, + "nodeType": "ExpressionStatement", + "src": "15998:52:2" + }, + { + "expression": { + "baseExpression": { + "id": 4875, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "16160:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4877, + "indexExpression": { + "id": 4876, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4859, + "src": "16171:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16160:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4864, + "id": 4878, + "nodeType": "Return", + "src": "16153:25:2" + } + ] + }, + "documentation": { + "id": 4857, + "nodeType": "StructuredDocumentation", + "src": "15705:202:2", + "text": "@notice Count all NFTs assigned to an owner\n @dev ERC-721\n @param _owner An address for whom to query the balance\n @return The number of NFTs owned by `_owner`, possibly zero" + }, + "functionSelector": "70a08231", + "id": 4880, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4861, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15960:8:2" + }, + "parameters": { + "id": 4860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4859, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 4880, + "src": "15932:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15932:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15931:16:2" + }, + "returnParameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4880, + "src": "15978:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15978:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15977:9:2" + }, + "scope": 5767, + "src": "15913:273:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9164 + ], + "body": { + "id": 4907, + "nodeType": "Block", + "src": "16511:242:2", + "statements": [ + { + "assignments": [ + 4890 + ], + "declarations": [ + { + "constant": false, + "id": 4890, + "mutability": "mutable", + "name": "tokenOwner", + "nodeType": "VariableDeclaration", + "scope": 4907, + "src": "16522:18:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4889, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16522:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4894, + "initialValue": { + "baseExpression": { + "id": 4891, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "16543:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4893, + "indexExpression": { + "id": 4892, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4883, + "src": "16553:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16543:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16522:40:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4896, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4890, + "src": "16581:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16603:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16595:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16595:7:2", + "typeDescriptions": {} + } + }, + "id": 4900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16595:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "16581:24:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e444546494e45445f4f574e4552", + "id": 4902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16607:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_665a82e24970e95450234db0a05e4b37f2a03b4524d96a2fb7fddd76a7ed30de", + "typeString": "literal_string \"UNDEFINED_OWNER\"" + }, + "value": "UNDEFINED_OWNER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665a82e24970e95450234db0a05e4b37f2a03b4524d96a2fb7fddd76a7ed30de", + "typeString": "literal_string \"UNDEFINED_OWNER\"" + } + ], + "id": 4895, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16573:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16573:52:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4904, + "nodeType": "ExpressionStatement", + "src": "16573:52:2" + }, + { + "expression": { + "id": 4905, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4890, + "src": "16735:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4888, + "id": 4906, + "nodeType": "Return", + "src": "16728:17:2" + } + ] + }, + "documentation": { + "id": 4881, + "nodeType": "StructuredDocumentation", + "src": "16194:237:2", + "text": " @notice Gets the owner of the specified token ID.\n @dev ERC-721\n @param _tokenId uint256 ID of the token to query the owner of\n @return address currently marked as the owner of the given token ID" + }, + "functionSelector": "6352211e", + "id": 4908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4885, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "16484:8:2" + }, + "parameters": { + "id": 4884, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4883, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4908, + "src": "16454:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16454:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16453:18:2" + }, + "returnParameters": { + "id": 4888, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4887, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4908, + "src": "16502:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16502:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "16501:9:2" + }, + "scope": 5767, + "src": "16437:316:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8875 + ], + "body": { + "id": 4972, + "nodeType": "Block", + "src": "17157:469:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4923, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17190:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17190:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4925, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "17210:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17210:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17190:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17241:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 4922, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "17168:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17168:110:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4930, + "nodeType": "ExpressionStatement", + "src": "17168:110:2" + }, + { + "assignments": [ + 4935 + ], + "declarations": [ + { + "constant": false, + "id": 4935, + "mutability": "mutable", + "name": "batchBalances", + "nodeType": "VariableDeclaration", + "scope": 4972, + "src": "17380:30:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4933, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17380:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4934, + "nodeType": "ArrayTypeName", + "src": "17380:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "id": 4942, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 4939, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17427:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17427:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "17413:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 4936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17417:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4937, + "nodeType": "ArrayTypeName", + "src": "17417:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 4941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17413:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17380:64:2" + }, + { + "body": { + "id": 4968, + "nodeType": "Block", + "src": "17504:82:2", + "statements": [ + { + "expression": { + "id": 4966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4954, + "name": "batchBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "17519:13:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 4956, + "indexExpression": { + "id": 4955, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17533:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17519:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4957, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "17538:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4961, + "indexExpression": { + "baseExpression": { + "id": 4958, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "17547:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4960, + "indexExpression": { + "id": 4959, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17557:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17547:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17538:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4965, + "indexExpression": { + "baseExpression": { + "id": 4962, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17561:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4964, + "indexExpression": { + "id": 4963, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17571:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17561:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17538:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17519:55:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4967, + "nodeType": "ExpressionStatement", + "src": "17519:55:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4947, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17477:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 4948, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17481:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17481:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17477:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4969, + "initializationExpression": { + "assignments": [ + 4944 + ], + "declarations": [ + { + "constant": false, + "id": 4944, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 4969, + "src": "17462:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17462:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4946, + "initialValue": { + "hexValue": "30", + "id": 4945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17474:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17462:13:2" + }, + "loopExpression": { + "expression": { + "id": 4952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "17499:3:2", + "subExpression": { + "id": 4951, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17501:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4953, + "nodeType": "ExpressionStatement", + "src": "17499:3:2" + }, + "nodeType": "ForStatement", + "src": "17457:129:2" + }, + { + "expression": { + "id": 4970, + "name": "batchBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "17605:13:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 4921, + "id": 4971, + "nodeType": "Return", + "src": "17598:20:2" + } + ] + }, + "documentation": { + "id": 4909, + "nodeType": "StructuredDocumentation", + "src": "16761:231:2", + "text": "@notice Get the balance of account-token pairs.\n@dev ERC-1155\n@param _accounts The addresses of the token holders\n@param _tokenIds IDs of the tokens\n@return balances" + }, + "functionSelector": "4e1273f4", + "id": 4973, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOfBatch", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4917, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17121:8:2" + }, + "parameters": { + "id": 4916, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4912, + "mutability": "mutable", + "name": "_accounts", + "nodeType": "VariableDeclaration", + "scope": 4973, + "src": "17032:28:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4910, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17032:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4911, + "nodeType": "ArrayTypeName", + "src": "17032:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4915, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 4973, + "src": "17071:28:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17071:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4914, + "nodeType": "ArrayTypeName", + "src": "17071:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "17021:85:2" + }, + "returnParameters": { + "id": 4921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4920, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4973, + "src": "17139:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17139:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4919, + "nodeType": "ArrayTypeName", + "src": "17139:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "17138:18:2" + }, + "scope": 5767, + "src": "16998:628:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8883, + 9212 + ], + "body": { + "id": 5008, + "nodeType": "Block", + "src": "18023:292:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4985, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18042:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18042:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 4987, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4976, + "src": "18056:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "18042:23:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "524544554e44414e545f43414c4c", + "id": 4989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18067:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + }, + "value": "REDUNDANT_CALL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + } + ], + "id": 4984, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18034:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18034:50:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4991, + "nodeType": "ExpressionStatement", + "src": "18034:50:2" + }, + { + "expression": { + "id": 4999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4992, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "18193:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4996, + "indexExpression": { + "expression": { + "id": 4993, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18211:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18211:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18193:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4997, + "indexExpression": { + "id": 4995, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4976, + "src": "18223:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18193:40:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4998, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4978, + "src": "18236:8:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18193:51:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5000, + "nodeType": "ExpressionStatement", + "src": "18193:51:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5002, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18275:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18275:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5004, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4976, + "src": "18287:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5005, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4978, + "src": "18298:8:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5001, + "name": "ApprovalForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8937, + "src": "18260:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,address,bool)" + } + }, + "id": 5006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18260:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5007, + "nodeType": "EmitStatement", + "src": "18255:52:2" + } + ] + }, + "documentation": { + "id": 4974, + "nodeType": "StructuredDocumentation", + "src": "17634:262:2", + "text": " @notice Approves or unapproves the operator.\n will revert if the caller attempts to approve itself as it is redundant\n @dev ERC-1155 & ERC-721\n @param _operator to (un)approve\n @param _approve flag to set or unset" + }, + "functionSelector": "a22cb465", + "id": 5009, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4982, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 4980, + "name": "IERC1155", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8894, + "src": "17999:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + { + "id": 4981, + "name": "IERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9231, + "src": "18009:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + } + ], + "src": "17990:27:2" + }, + "parameters": { + "id": 4979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4976, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "17929:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4975, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17929:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4978, + "mutability": "mutable", + "name": "_approve", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "17948:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4977, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17948:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "17928:34:2" + }, + "returnParameters": { + "id": 4983, + "nodeType": "ParameterList", + "parameters": [], + "src": "18023:0:2" + }, + "scope": 5767, + "src": "17902:413:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8893, + 9230 + ], + "body": { + "id": 5028, + "nodeType": "Block", + "src": "18765:64:2", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5022, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "18783:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 5024, + "indexExpression": { + "id": 5023, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "18801:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18783:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 5026, + "indexExpression": { + "id": 5025, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5014, + "src": "18811:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18783:38:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5021, + "id": 5027, + "nodeType": "Return", + "src": "18776:45:2" + } + ] + }, + "documentation": { + "id": 5010, + "nodeType": "StructuredDocumentation", + "src": "18323:277:2", + "text": "@notice Gets approval status of an operator for a given account.\n@dev ERC-1155 & ERC-721\n@param _account token holder\n@param _operator operator to check\n@return True if the operator is approved, false if not" + }, + "functionSelector": "e985e9c5", + "id": 5029, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5018, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 5016, + "name": "IERC1155", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8894, + "src": "18717:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + { + "id": 5017, + "name": "IERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9231, + "src": "18727:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + } + ], + "src": "18708:27:2" + }, + "parameters": { + "id": 5015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5012, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5029, + "src": "18632:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5011, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18632:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5014, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 5029, + "src": "18650:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18650:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "18631:37:2" + }, + "returnParameters": { + "id": 5021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5029, + "src": "18754:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18754:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18753:6:2" + }, + "scope": 5767, + "src": "18606:223:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9005 + ], + "body": { + "id": 5058, + "nodeType": "Block", + "src": "19155:385:2", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5038, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19244:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783031666663396137", + "id": 5039, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19260:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_33540519_by_1", + "typeString": "int_const 33540519" + }, + "value": "0x01ffc9a7" + }, + "src": "19244:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5041, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19297:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30786439623637613236", + "id": 5042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19313:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_3652614694_by_1", + "typeString": "int_const 3652614694" + }, + "value": "0xd9b67a26" + }, + "src": "19297:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:79:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5045, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19351:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783830616335386364", + "id": 5046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19367:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_2158778573_by_1", + "typeString": "int_const 2158778573" + }, + "value": "0x80ac58cd" + }, + "src": "19351:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:133:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5049, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19404:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783562356531333966", + "id": 5050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19420:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1532892063_by_1", + "typeString": "int_const 1532892063" + }, + "value": "0x5b5e139f" + }, + "src": "19404:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:186:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5053, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19476:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783065383933343163", + "id": 5054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19492:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_243872796_by_1", + "typeString": "int_const 243872796" + }, + "value": "0x0e89341c" + }, + "src": "19476:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:258:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5037, + "id": 5057, + "nodeType": "Return", + "src": "19166:336:2" + } + ] + }, + "documentation": { + "id": 5030, + "nodeType": "StructuredDocumentation", + "src": "18837:185:2", + "text": " @notice Returns true if this contract implements the interface defined by _interfaceId_.\n This function call must use less than 30 000 gas. ATM not enforced." + }, + "functionSelector": "01ffc9a7", + "id": 5059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5034, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19117:8:2" + }, + "parameters": { + "id": 5033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5032, + "mutability": "mutable", + "name": "_interfaceId", + "nodeType": "VariableDeclaration", + "scope": 5059, + "src": "19055:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 5031, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "19055:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "19054:21:2" + }, + "returnParameters": { + "id": 5037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5036, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5059, + "src": "19144:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5035, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19144:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "19143:6:2" + }, + "scope": 5767, + "src": "19028:512:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8908 + ], + "body": { + "id": 5081, + "nodeType": "Block", + "src": "20227:54:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5075, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5062, + "src": "20244:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5076, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5064, + "src": "20249:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5077, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5066, + "src": "20259:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5078, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5068, + "src": "20267:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5074, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5145, + 5217 + ], + "referencedDeclaration": 5145, + "src": "20238:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory)" + } + }, + "id": 5079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20238:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5080, + "nodeType": "ExpressionStatement", + "src": "20238:35:2" + } + ] + }, + "documentation": { + "id": 5060, + "nodeType": "StructuredDocumentation", + "src": "19631:428:2", + "text": " @notice Mint an amount of a desired token\n Currently no restrictions as to who is allowed to mint - so, it is public.\n @dev ERC-1155\n @param _to owner of the minted token\n @param _tokenId ID of the token to be minted\n @param _value Amount of the token to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "functionSelector": "731133e9", + "id": 5082, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5072, + "modifierName": { + "id": 5071, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "20205:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20205:21:2" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5070, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20196:8:2" + }, + "parameters": { + "id": 5069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5062, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20089:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20089:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5064, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20111:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5063, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20111:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5066, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20138:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20138:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5068, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20163:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5067, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20163:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "20078:110:2" + }, + "returnParameters": { + "id": 5073, + "nodeType": "ParameterList", + "parameters": [], + "src": "20227:0:2" + }, + "scope": 5767, + "src": "20065:216:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5144, + "nodeType": "Block", + "src": "20795:487:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5095, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "20814:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20829:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20821:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5096, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20821:7:2", + "typeDescriptions": {} + } + }, + "id": 5099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20821:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "20814:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20833:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5094, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20806:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20806:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5103, + "nodeType": "ExpressionStatement", + "src": "20806:49:2" + }, + { + "expression": { + "id": 5117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5104, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "20950:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5107, + "indexExpression": { + "id": 5105, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "20959:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20950:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5108, + "indexExpression": { + "id": 5106, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "20969:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20950:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 5115, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5089, + "src": "21004:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5109, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "20976:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5111, + "indexExpression": { + "id": 5110, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "20985:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20976:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5113, + "indexExpression": { + "id": 5112, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "20995:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20976:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "20976:27:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20976:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20950:61:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5118, + "nodeType": "ExpressionStatement", + "src": "20950:61:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21042:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21042:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21062:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21054:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21054:7:2", + "typeDescriptions": {} + } + }, + "id": 5125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21054:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5126, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "21066:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5127, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "21071:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5128, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5089, + "src": "21081:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5119, + "name": "TransferSingle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "21027:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21027:61:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5130, + "nodeType": "EmitStatement", + "src": "21022:66:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5132, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21146:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21146:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21179:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21171:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21171:7:2", + "typeDescriptions": {} + } + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21171:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5138, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "21196:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5139, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "21214:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5140, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5089, + "src": "21237:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5141, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5091, + "src": "21258:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5131, + "name": "_doSafeTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4794, + "src": "21101:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256,bytes memory)" + } + }, + "id": 5142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21101:173:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5143, + "nodeType": "ExpressionStatement", + "src": "21101:173:2" + } + ] + }, + "documentation": { + "id": 5083, + "nodeType": "StructuredDocumentation", + "src": "20289:366:2", + "text": " @notice Internal function to mint an amount of a desired token\n @dev ERC-1155\n @param _to owner of the minted token\n @param _tokenId ID of the token to be minted\n @param _value Amount of the token to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "id": 5145, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5092, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5085, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20686:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5084, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20686:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5087, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20708:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20708:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5089, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20735:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5088, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20735:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5091, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20760:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5090, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20760:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "20675:110:2" + }, + "returnParameters": { + "id": 5093, + "nodeType": "ParameterList", + "parameters": [], + "src": "20795:0:2" + }, + "scope": 5767, + "src": "20661:621:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8928 + ], + "body": { + "id": 5165, + "nodeType": "Block", + "src": "21693:59:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5148, + "src": "21710:2:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5160, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5150, + "src": "21714:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5158, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5145, + 5217 + ], + "referencedDeclaration": 5217, + "src": "21704:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 5161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21704:18:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5162, + "nodeType": "ExpressionStatement", + "src": "21704:18:2" + }, + { + "expression": { + "hexValue": "74727565", + "id": 5163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21740:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5157, + "id": 5164, + "nodeType": "Return", + "src": "21733:11:2" + } + ] + }, + "documentation": { + "id": 5146, + "nodeType": "StructuredDocumentation", + "src": "21290:260:2", + "text": " @notice Function to mint tokens.\n @dev ERC-721\n @param to The address that will receive the minted tokens.\n @param tokenId The token id to mint.\n @return A boolean that indicates if the operation was successful." + }, + "functionSelector": "40c10f19", + "id": 5166, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5154, + "modifierName": { + "id": 5153, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "21642:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21642:21:2" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5152, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21624:8:2" + }, + "parameters": { + "id": 5151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5148, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 5166, + "src": "21570:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21570:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5150, + "mutability": "mutable", + "name": "tokenId", + "nodeType": "VariableDeclaration", + "scope": 5166, + "src": "21582:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5149, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21582:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "21569:29:2" + }, + "returnParameters": { + "id": 5157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5156, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5166, + "src": "21682:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "21682:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "21681:6:2" + }, + "scope": 5767, + "src": "21556:196:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5216, + "nodeType": "Block", + "src": "22086:399:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5175, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22105:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22120:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5177, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22112:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22112:7:2", + "typeDescriptions": {} + } + }, + "id": 5179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22112:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "22105:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22124:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5174, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22097:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22097:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5183, + "nodeType": "ExpressionStatement", + "src": "22097:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 5185, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "22269:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 5187, + "indexExpression": { + "id": 5186, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5171, + "src": "22279:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22269:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22300:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22292:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5188, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22292:7:2", + "typeDescriptions": {} + } + }, + "id": 5191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22292:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "22269:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4552433732313a20746f6b656e20616c7265616479206d696e746564", + "id": 5193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22317:30:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57", + "typeString": "literal_string \"ERC721: token already minted\"" + }, + "value": "ERC721: token already minted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57", + "typeString": "literal_string \"ERC721: token already minted\"" + } + ], + "id": 5184, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22247:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22247:111:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5195, + "nodeType": "ExpressionStatement", + "src": "22247:111:2" + }, + { + "expression": { + "id": 5200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 5196, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "22371:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 5198, + "indexExpression": { + "id": 5197, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5171, + "src": "22381:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "22371:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5199, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22393:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "22371:25:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5201, + "nodeType": "ExpressionStatement", + "src": "22371:25:2" + }, + { + "expression": { + "id": 5205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "22407:17:2", + "subExpression": { + "baseExpression": { + "id": 5202, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "22407:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5204, + "indexExpression": { + "id": 5203, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22418:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "22407:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5206, + "nodeType": "ExpressionStatement", + "src": "22407:17:2" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 5210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22459:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22451:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22451:7:2", + "typeDescriptions": {} + } + }, + "id": 5211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22451:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5212, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22463:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5213, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5171, + "src": "22468:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5207, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9139, + "src": "22442:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 5214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22442:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5215, + "nodeType": "EmitStatement", + "src": "22437:40:2" + } + ] + }, + "documentation": { + "id": 5167, + "nodeType": "StructuredDocumentation", + "src": "21760:265:2", + "text": " @notice Internal function to mint a new token.\n Reverts if the given token ID already exists.\n @dev ERC-721\n @param _to The address that will own the minted token\n @param _tokenId uint256 ID of the token to be minted" + }, + "id": 5217, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5217, + "src": "22046:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22046:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5171, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5217, + "src": "22059:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22059:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "22045:31:2" + }, + "returnParameters": { + "id": 5173, + "nodeType": "ParameterList", + "parameters": [], + "src": "22086:0:2" + }, + "scope": 5767, + "src": "22031:454:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5240, + "nodeType": "Block", + "src": "23104:98:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5234, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5220, + "src": "23163:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5235, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5223, + "src": "23168:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5236, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5226, + "src": "23179:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5237, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "23188:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5233, + "name": "_mintBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "23152:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256[] memory,uint256[] memory,bytes memory)" + } + }, + "id": 5238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23152:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5239, + "nodeType": "ExpressionStatement", + "src": "23152:42:2" + } + ] + }, + "documentation": { + "id": 5218, + "nodeType": "StructuredDocumentation", + "src": "22493:427:2", + "text": " @notice Batch minting of tokens\n Currently no restrictions as to who is allowed to mint - so, it is public.\n @dev ERC-1155\n @param _to The address that will own the minted token\n @param _tokenIds IDs of the tokens to be minted\n @param _values Amounts of the tokens to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "functionSelector": "1f7fdffa", + "id": 5241, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5231, + "modifierName": { + "id": 5230, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "23082:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "23082:21:2" + } + ], + "name": "mintBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5220, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "22955:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22955:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5223, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "22977:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22977:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5222, + "nodeType": "ArrayTypeName", + "src": "22977:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5226, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "23014:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23014:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5225, + "nodeType": "ArrayTypeName", + "src": "23014:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5228, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "23049:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5227, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "23049:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "22944:130:2" + }, + "returnParameters": { + "id": 5232, + "nodeType": "ParameterList", + "parameters": [], + "src": "23104:0:2" + }, + "scope": 5767, + "src": "22926:276:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5333, + "nodeType": "Block", + "src": "23742:795:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5256, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "23761:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23776:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23768:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23768:7:2", + "typeDescriptions": {} + } + }, + "id": 5260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23768:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "23761:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23780:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5255, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23753:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23753:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5264, + "nodeType": "ExpressionStatement", + "src": "23753:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5266, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "23911:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "23911:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 5268, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "23931:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "23931:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23911:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23947:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 5265, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23903:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23903:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5273, + "nodeType": "ExpressionStatement", + "src": "23903:71:2" + }, + { + "body": { + "id": 5306, + "nodeType": "Block", + "src": "24125:132:2", + "statements": [ + { + "expression": { + "id": 5304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5285, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "24140:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5290, + "indexExpression": { + "baseExpression": { + "id": 5286, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24149:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5288, + "indexExpression": { + "id": 5287, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24159:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24149:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24140:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5291, + "indexExpression": { + "id": 5289, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24163:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24140:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 5296, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "24203:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5300, + "indexExpression": { + "baseExpression": { + "id": 5297, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24212:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5299, + "indexExpression": { + "id": 5298, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24222:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24212:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24203:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5302, + "indexExpression": { + "id": 5301, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24226:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24203:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 5292, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24170:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5294, + "indexExpression": { + "id": 5293, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24178:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24170:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "24170:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24170:75:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24140:105:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5305, + "nodeType": "ExpressionStatement", + "src": "24140:105:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5278, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24098:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5279, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24102:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "24102:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24098:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5307, + "initializationExpression": { + "assignments": [ + 5275 + ], + "declarations": [ + { + "constant": false, + "id": 5275, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 5307, + "src": "24083:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24083:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5277, + "initialValue": { + "hexValue": "30", + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24095:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "24083:13:2" + }, + "loopExpression": { + "expression": { + "id": 5283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "24120:3:2", + "subExpression": { + "id": 5282, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24120:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5284, + "nodeType": "ExpressionStatement", + "src": "24120:3:2" + }, + "nodeType": "ForStatement", + "src": "24078:179:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5309, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24288:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "24288:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24308:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24300:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24300:7:2", + "typeDescriptions": {} + } + }, + "id": 5314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24300:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5315, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24312:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5316, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24317:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5317, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24328:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 5308, + "name": "TransferBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8815, + "src": "24274:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" + } + }, + "id": 5318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24274:62:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5319, + "nodeType": "EmitStatement", + "src": "24269:67:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5321, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24399:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "24399:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24432:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24424:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24424:7:2", + "typeDescriptions": {} + } + }, + "id": 5326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24424:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5327, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24449:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5328, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24467:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5329, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24491:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5330, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5252, + "src": "24513:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5320, + "name": "_doSafeBatchTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4838, + "src": "24349:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" + } + }, + "id": 5331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24349:180:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5332, + "nodeType": "ExpressionStatement", + "src": "24349:180:2" + } + ] + }, + "documentation": { + "id": 5242, + "nodeType": "StructuredDocumentation", + "src": "23210:367:2", + "text": " @notice Internal function for batch minting of tokens\\\n @dev ERC-1155\n @param _to The address that will own the minted token\n @param _tokenIds IDs of the tokens to be minted\n @param _values Amounts of the tokens to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "id": 5334, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mintBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5244, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23613:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23613:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5247, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23635:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23635:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5246, + "nodeType": "ArrayTypeName", + "src": "23635:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5250, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23672:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5248, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23672:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5249, + "nodeType": "ArrayTypeName", + "src": "23672:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5252, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23707:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5251, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "23707:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "23602:130:2" + }, + "returnParameters": { + "id": 5254, + "nodeType": "ParameterList", + "parameters": [], + "src": "23742:0:2" + }, + "scope": 5767, + "src": "23583:954:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8918 + ], + "body": { + "id": 5353, + "nodeType": "Block", + "src": "24922:52:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5348, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5337, + "src": "24939:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5349, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5339, + "src": "24949:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5350, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5341, + "src": "24959:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5347, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5402, + "src": "24933:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24933:33:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5352, + "nodeType": "ExpressionStatement", + "src": "24933:33:2" + } + ] + }, + "documentation": { + "id": 5335, + "nodeType": "StructuredDocumentation", + "src": "24545:233:2", + "text": " @notice Burn an amount of tokens with the given ID\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenId ID of the token\n @param _value Amount of the token" + }, + "functionSelector": "f5298aca", + "id": 5354, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5345, + "modifierName": { + "id": 5344, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "24900:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "24900:21:2" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5343, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "24891:8:2" + }, + "parameters": { + "id": 5342, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5337, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "24808:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24808:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5339, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "24835:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24835:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5341, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "24862:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5340, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24862:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "24797:86:2" + }, + "returnParameters": { + "id": 5346, + "nodeType": "ParameterList", + "parameters": [], + "src": "24922:0:2" + }, + "scope": 5767, + "src": "24784:190:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5401, + "nodeType": "Block", + "src": "25331:343:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5365, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25350:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25370:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25362:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25362:7:2", + "typeDescriptions": {} + } + }, + "id": 5369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25362:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "25350:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25374:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5364, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25342:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25342:54:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5373, + "nodeType": "ExpressionStatement", + "src": "25342:54:2" + }, + { + "expression": { + "id": 5387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5374, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "25513:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5377, + "indexExpression": { + "id": 5375, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5359, + "src": "25522:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25513:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5378, + "indexExpression": { + "id": 5376, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25532:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "25513:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 5385, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5361, + "src": "25577:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5379, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "25544:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5381, + "indexExpression": { + "id": 5380, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5359, + "src": "25553:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25544:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5383, + "indexExpression": { + "id": 5382, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25563:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25544:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "25544:32:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25544:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25513:71:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5388, + "nodeType": "ExpressionStatement", + "src": "25513:71:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5390, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "25615:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "25615:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5392, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25627:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25645:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25637:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25637:7:2", + "typeDescriptions": {} + } + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25637:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5397, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5359, + "src": "25649:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5398, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5361, + "src": "25659:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5389, + "name": "TransferSingle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "25600:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 5399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25600:66:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5400, + "nodeType": "EmitStatement", + "src": "25595:71:2" + } + ] + }, + "documentation": { + "id": 5355, + "nodeType": "StructuredDocumentation", + "src": "24982:233:2", + "text": " @notice Burn an amount of tokens with the given ID\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenId ID of the token\n @param _value Amount of the token" + }, + "id": 5402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5357, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "25246:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25246:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5359, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "25273:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25273:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5361, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "25300:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25300:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "25235:86:2" + }, + "returnParameters": { + "id": 5363, + "nodeType": "ParameterList", + "parameters": [], + "src": "25331:0:2" + }, + "scope": 5767, + "src": "25221:453:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5422, + "nodeType": "Block", + "src": "26195:59:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5417, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5405, + "src": "26217:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5418, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5408, + "src": "26227:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5419, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5411, + "src": "26238:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 5416, + "name": "_burnBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "26206:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,uint256[] memory,uint256[] memory)" + } + }, + "id": 5420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26206:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5421, + "nodeType": "ExpressionStatement", + "src": "26206:40:2" + } + ] + }, + "documentation": { + "id": 5403, + "nodeType": "StructuredDocumentation", + "src": "25812:223:2", + "text": " @notice Batch burn an amounts of tokens\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenIds IDs of the tokens\n @param _values Amounts of the tokens" + }, + "functionSelector": "6b20c454", + "id": 5423, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5414, + "modifierName": { + "id": 5413, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "26173:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "26173:21:2" + } + ], + "name": "burnBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5405, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5423, + "src": "26070:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26070:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5408, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5423, + "src": "26097:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26097:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5407, + "nodeType": "ArrayTypeName", + "src": "26097:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5411, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5423, + "src": "26134:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5409, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26134:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5410, + "nodeType": "ArrayTypeName", + "src": "26134:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "26059:106:2" + }, + "returnParameters": { + "id": 5415, + "nodeType": "ParameterList", + "parameters": [], + "src": "26195:0:2" + }, + "scope": 5767, + "src": "26041:213:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5500, + "nodeType": "Block", + "src": "26647:684:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5436, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "26666:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26686:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26678:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26678:7:2", + "typeDescriptions": {} + } + }, + "id": 5440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26678:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "26666:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26690:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26658:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26658:54:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5444, + "nodeType": "ExpressionStatement", + "src": "26658:54:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5446, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "26821:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "26821:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 5448, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5432, + "src": "26841:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "26841:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26821:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 5451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26857:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 5445, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26813:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26813:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5453, + "nodeType": "ExpressionStatement", + "src": "26813:71:2" + }, + { + "body": { + "id": 5486, + "nodeType": "Block", + "src": "27035:128:2", + "statements": [ + { + "expression": { + "id": 5484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5465, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "27050:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5470, + "indexExpression": { + "baseExpression": { + "id": 5466, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27059:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5468, + "indexExpression": { + "id": 5467, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27069:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27059:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27050:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5471, + "indexExpression": { + "id": 5469, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "27073:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "27050:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 5480, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5432, + "src": "27140:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5482, + "indexExpression": { + "id": 5481, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27148:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27140:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5472, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "27085:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5476, + "indexExpression": { + "baseExpression": { + "id": 5473, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27094:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5475, + "indexExpression": { + "id": 5474, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27104:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27094:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27085:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5478, + "indexExpression": { + "id": 5477, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "27108:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27085:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "27085:54:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27085:66:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27050:101:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5485, + "nodeType": "ExpressionStatement", + "src": "27050:101:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5458, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27008:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5459, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27012:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "27012:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27008:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5487, + "initializationExpression": { + "assignments": [ + 5455 + ], + "declarations": [ + { + "constant": false, + "id": 5455, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 5487, + "src": "26993:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5454, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26993:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5457, + "initialValue": { + "hexValue": "30", + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27005:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "26993:13:2" + }, + "loopExpression": { + "expression": { + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "27030:3:2", + "subExpression": { + "id": 5462, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27030:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5464, + "nodeType": "ExpressionStatement", + "src": "27030:3:2" + }, + "nodeType": "ForStatement", + "src": "26988:175:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5489, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "27208:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "27208:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5491, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "27233:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27264:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27256:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5492, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27256:7:2", + "typeDescriptions": {} + } + }, + "id": 5495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27256:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5496, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27281:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5497, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5432, + "src": "27305:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 5488, + "name": "TransferBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8815, + "src": "27180:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" + } + }, + "id": 5498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27180:143:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5499, + "nodeType": "EmitStatement", + "src": "27175:148:2" + } + ] + }, + "documentation": { + "id": 5424, + "nodeType": "StructuredDocumentation", + "src": "26262:244:2", + "text": " @notice Internal function to batch burn an amounts of tokens\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenIds IDs of the tokens\n @param _values Amounts of the tokens" + }, + "id": 5501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5501, + "src": "26542:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26542:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5429, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5501, + "src": "26569:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5427, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26569:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5428, + "nodeType": "ArrayTypeName", + "src": "26569:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5432, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5501, + "src": "26606:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5430, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26606:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5431, + "nodeType": "ArrayTypeName", + "src": "26606:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "26531:106:2" + }, + "returnParameters": { + "id": 5434, + "nodeType": "ParameterList", + "parameters": [], + "src": "26647:0:2" + }, + "scope": 5767, + "src": "26512:819:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5513, + "nodeType": "Block", + "src": "27619:42:2", + "statements": [ + { + "expression": { + "id": 5511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5509, + "name": "metadataBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4161, + "src": "27630:12:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5510, + "name": "_newBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5504, + "src": "27645:8:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "27630:23:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5512, + "nodeType": "ExpressionStatement", + "src": "27630:23:2" + } + ] + }, + "documentation": { + "id": 5502, + "nodeType": "StructuredDocumentation", + "src": "27427:119:2", + "text": " @notice Setting the URL prefix for tokens metadata\n @param _newBase New prefix to be used" + }, + "functionSelector": "38b6db2e", + "id": 5514, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5507, + "modifierName": { + "id": 5506, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "27609:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27609:9:2" + } + ], + "name": "_setMetadataBase", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5505, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5504, + "mutability": "mutable", + "name": "_newBase", + "nodeType": "VariableDeclaration", + "scope": 5514, + "src": "27578:22:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5503, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27578:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "27577:24:2" + }, + "returnParameters": { + "id": 5508, + "nodeType": "ParameterList", + "parameters": [], + "src": "27619:0:2" + }, + "scope": 5767, + "src": "27552:109:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5526, + "nodeType": "Block", + "src": "27866:48:2", + "statements": [ + { + "expression": { + "id": 5524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5522, + "name": "metadata1155Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4163, + "src": "27877:17:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5523, + "name": "_newRoute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "27897:9:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "27877:29:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5525, + "nodeType": "ExpressionStatement", + "src": "27877:29:2" + } + ] + }, + "documentation": { + "id": 5515, + "nodeType": "StructuredDocumentation", + "src": "27669:126:2", + "text": " @notice Setting the URL route for ERC1155 tokens metadata\n @param _newRoute New route to be used" + }, + "functionSelector": "bb499440", + "id": 5527, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5520, + "modifierName": { + "id": 5519, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "27856:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27856:9:2" + } + ], + "name": "_set1155Route", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "_newRoute", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "27824:23:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5516, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27824:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "27823:25:2" + }, + "returnParameters": { + "id": 5521, + "nodeType": "ParameterList", + "parameters": [], + "src": "27866:0:2" + }, + "scope": 5767, + "src": "27801:113:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5539, + "nodeType": "Block", + "src": "28117:47:2", + "statements": [ + { + "expression": { + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5535, + "name": "metadata721Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4165, + "src": "28128:16:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5536, + "name": "_newRoute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5530, + "src": "28147:9:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "28128:28:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5538, + "nodeType": "ExpressionStatement", + "src": "28128:28:2" + } + ] + }, + "documentation": { + "id": 5528, + "nodeType": "StructuredDocumentation", + "src": "27922:125:2", + "text": " @notice Setting the URL route for ERC721 tokens metadata\n @param _newRoute New route to be used" + }, + "functionSelector": "7d64afde", + "id": 5540, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5533, + "modifierName": { + "id": 5532, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "28107:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "28107:9:2" + } + ], + "name": "_set721Route", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5530, + "mutability": "mutable", + "name": "_newRoute", + "nodeType": "VariableDeclaration", + "scope": 5540, + "src": "28075:23:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28075:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "28074:25:2" + }, + "returnParameters": { + "id": 5534, + "nodeType": "ParameterList", + "parameters": [], + "src": "28117:0:2" + }, + "scope": 5767, + "src": "28053:111:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5560, + "nodeType": "Block", + "src": "28606:149:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 5552, + "name": "metadataBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4161, + "src": "28679:12:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "id": 5553, + "name": "metadata1155Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4163, + "src": "28693:17:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "arguments": [ + { + "id": 5555, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5543, + "src": "28722:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5554, + "name": "_uint2str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5736, + "src": "28712:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 5556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28712:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 5550, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "28662:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "28662:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28662:70:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28637:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 5548, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28637:6:2", + "typeDescriptions": {} + } + }, + "id": 5558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28637:110:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 5547, + "id": 5559, + "nodeType": "Return", + "src": "28617:130:2" + } + ] + }, + "documentation": { + "id": 5541, + "nodeType": "StructuredDocumentation", + "src": "28172:359:2", + "text": " @notice A distinct Uniform Resource Identifier (URI) for a given token.\n @dev ERC-1155\n URIs are defined in RFC 3986. The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".\n @param _tokenId The ID of the token\n @return Full URI string for metadata of the _tokenId" + }, + "functionSelector": "0e89341c", + "id": 5561, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uri", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5543, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5561, + "src": "28550:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5542, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28550:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "28549:18:2" + }, + "returnParameters": { + "id": 5547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5546, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5561, + "src": "28591:13:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5545, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28591:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "28590:15:2" + }, + "scope": 5767, + "src": "28537:218:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5569, + "nodeType": "Block", + "src": "28939:47:2", + "statements": [ + { + "expression": { + "hexValue": "426f736f6e20536d61727420566f7563686572", + "id": 5567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28957:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e159fcbda7d26910aa4ad3595e63d436153de29c702fb8bd7431625d83ad332c", + "typeString": "literal_string \"Boson Smart Voucher\"" + }, + "value": "Boson Smart Voucher" + }, + "functionReturnParameters": 5566, + "id": 5568, + "nodeType": "Return", + "src": "28950:28:2" + } + ] + }, + "documentation": { + "id": 5562, + "nodeType": "StructuredDocumentation", + "src": "28763:110:2", + "text": " @notice A descriptive name for a collection of NFTs in this contract\n @dev ERC-721" + }, + "functionSelector": "06fdde03", + "id": 5570, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5563, + "nodeType": "ParameterList", + "parameters": [], + "src": "28892:2:2" + }, + "returnParameters": { + "id": 5566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5565, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 5570, + "src": "28918:19:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5564, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28918:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "28917:21:2" + }, + "scope": 5767, + "src": "28879:107:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5578, + "nodeType": "Block", + "src": "29159:31:2", + "statements": [ + { + "expression": { + "hexValue": "425356", + "id": 5576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29177:5:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_461172c92cee5274f34826f70861578ee76ece078643ef285832ecdd4c053844", + "typeString": "literal_string \"BSV\"" + }, + "value": "BSV" + }, + "functionReturnParameters": 5575, + "id": 5577, + "nodeType": "Return", + "src": "29170:12:2" + } + ] + }, + "documentation": { + "id": 5571, + "nodeType": "StructuredDocumentation", + "src": "28994:95:2", + "text": " @notice An abbreviated name for NFTs in this contract\n @dev ERC-721" + }, + "functionSelector": "95d89b41", + "id": 5579, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5572, + "nodeType": "ParameterList", + "parameters": [], + "src": "29110:2:2" + }, + "returnParameters": { + "id": 5575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5574, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 5579, + "src": "29136:21:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5573, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29136:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "29135:23:2" + }, + "scope": 5767, + "src": "29095:95:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5611, + "nodeType": "Block", + "src": "29596:215:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 5588, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "29615:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 5590, + "indexExpression": { + "id": 5589, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5582, + "src": "29625:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29615:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29646:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29638:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29638:7:2", + "typeDescriptions": {} + } + }, + "id": 5594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29638:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "29615:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f4944", + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29650:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b52f3514e43e374c92e7204127699761905777b31513f628693a3c35ef97334d", + "typeString": "literal_string \"INVALID_ID\"" + }, + "value": "INVALID_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b52f3514e43e374c92e7204127699761905777b31513f628693a3c35ef97334d", + "typeString": "literal_string \"INVALID_ID\"" + } + ], + "id": 5587, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29607:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29607:56:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5598, + "nodeType": "ExpressionStatement", + "src": "29607:56:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 5603, + "name": "metadataBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4161, + "src": "29736:12:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "id": 5604, + "name": "metadata721Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4165, + "src": "29750:16:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "arguments": [ + { + "id": 5606, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5582, + "src": "29778:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5605, + "name": "_uint2str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5736, + "src": "29768:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 5607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29768:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 5601, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "29719:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "29719:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29719:69:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29694:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 5599, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29694:6:2", + "typeDescriptions": {} + } + }, + "id": 5609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29694:109:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 5586, + "id": 5610, + "nodeType": "Return", + "src": "29674:129:2" + } + ] + }, + "documentation": { + "id": 5580, + "nodeType": "StructuredDocumentation", + "src": "29198:318:2", + "text": " @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n @dev ERC-721\n Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC 3986. The URI may point to a JSON file that conforms to the \"ERC721 Metadata JSON Schema\".\n @param _tokenId ID of the token" + }, + "functionSelector": "c87b56dd", + "id": 5612, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5583, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5582, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5612, + "src": "29540:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29540:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29539:18:2" + }, + "returnParameters": { + "id": 5586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5585, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5612, + "src": "29581:13:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5584, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29581:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "29580:15:2" + }, + "scope": 5767, + "src": "29522:289:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5633, + "nodeType": "Block", + "src": "30208:135:2", + "statements": [ + { + "expression": { + "id": 5625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5623, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "30219:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5624, + "name": "_voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5615, + "src": "30242:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30219:44:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5626, + "nodeType": "ExpressionStatement", + "src": "30219:44:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5628, + "name": "_voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5615, + "src": "30301:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 5629, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "30324:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "30324:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5627, + "name": "LogVoucherKernelSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4171, + "src": "30281:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 5631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30281:54:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5632, + "nodeType": "EmitStatement", + "src": "30276:59:2" + } + ] + }, + "documentation": { + "id": 5613, + "nodeType": "StructuredDocumentation", + "src": "29893:156:2", + "text": " @notice Set the address of the VoucherKernel contract\n @param _voucherKernelAddress The address of the Voucher Kernel contract" + }, + "functionSelector": "d95be43a", + "id": 5634, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5618, + "modifierName": { + "id": 5617, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "30146:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30146:9:2" + }, + { + "arguments": [ + { + "id": 5620, + "name": "_voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5615, + "src": "30180:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 5621, + "modifierName": { + "id": 5619, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4227, + "src": "30165:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "30165:37:2" + } + ], + "name": "setVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5615, + "mutability": "mutable", + "name": "_voucherKernelAddress", + "nodeType": "VariableDeclaration", + "scope": 5634, + "src": "30088:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5614, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30088:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "30087:31:2" + }, + "returnParameters": { + "id": 5622, + "nodeType": "ParameterList", + "parameters": [], + "src": "30208:0:2" + }, + "scope": 5767, + "src": "30055:288:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5655, + "nodeType": "Block", + "src": "30614:109:2", + "statements": [ + { + "expression": { + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5645, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "30625:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5646, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "30642:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30625:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5648, + "nodeType": "ExpressionStatement", + "src": "30625:32:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5650, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "30687:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 5651, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "30704:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "30704:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5649, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4177, + "src": "30673:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 5653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30673:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5654, + "nodeType": "EmitStatement", + "src": "30668:47:2" + } + ] + }, + "documentation": { + "id": 5635, + "nodeType": "StructuredDocumentation", + "src": "30351:122:2", + "text": " @notice Set the address of the cashier contract\n @param _cashierAddress The Cashier contract" + }, + "functionSelector": "c099a7c4", + "id": 5656, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5640, + "modifierName": { + "id": 5639, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "30558:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30558:9:2" + }, + { + "arguments": [ + { + "id": 5642, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "30592:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 5643, + "modifierName": { + "id": 5641, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4227, + "src": "30577:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "30577:31:2" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5637, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 5656, + "src": "30506:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5636, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30506:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "30505:25:2" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [], + "src": "30614:0:2" + }, + "scope": 5767, + "src": "30479:244:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5735, + "nodeType": "Block", + "src": "31077:416:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5664, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31092:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31098:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31092:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5670, + "nodeType": "IfStatement", + "src": "31088:50:2", + "trueBody": { + "id": 5669, + "nodeType": "Block", + "src": "31101:37:2", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 5667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31123:3:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "functionReturnParameters": 5663, + "id": 5668, + "nodeType": "Return", + "src": "31116:10:2" + } + ] + } + }, + { + "assignments": [ + 5672 + ], + "declarations": [ + { + "constant": false, + "id": 5672, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31148:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31148:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5674, + "initialValue": { + "id": 5673, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31160:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31148:14:2" + }, + { + "assignments": [ + 5676 + ], + "declarations": [ + { + "constant": false, + "id": 5676, + "mutability": "mutable", + "name": "len", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31173:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31173:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5677, + "nodeType": "VariableDeclarationStatement", + "src": "31173:11:2" + }, + { + "body": { + "id": 5688, + "nodeType": "Block", + "src": "31210:54:2", + "statements": [ + { + "expression": { + "id": 5682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "31225:5:2", + "subExpression": { + "id": 5681, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5676, + "src": "31225:3:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5683, + "nodeType": "ExpressionStatement", + "src": "31225:5:2" + }, + { + "expression": { + "id": 5686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5684, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5672, + "src": "31245:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 5685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31250:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "31245:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5687, + "nodeType": "ExpressionStatement", + "src": "31245:7:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5678, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5672, + "src": "31202:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31207:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31202:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5689, + "nodeType": "WhileStatement", + "src": "31195:69:2" + }, + { + "assignments": [ + 5691 + ], + "declarations": [ + { + "constant": false, + "id": 5691, + "mutability": "mutable", + "name": "bstr", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31274:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5690, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31274:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 5696, + "initialValue": { + "arguments": [ + { + "id": 5694, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5676, + "src": "31304:3:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "31294:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 5692, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31298:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 5695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31294:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31274:34:2" + }, + { + "assignments": [ + 5698 + ], + "declarations": [ + { + "constant": false, + "id": 5698, + "mutability": "mutable", + "name": "k", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31319:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5697, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31319:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5702, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5699, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5676, + "src": "31331:3:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 5700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31337:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "31331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31319:19:2" + }, + { + "body": { + "id": 5728, + "nodeType": "Block", + "src": "31365:91:2", + "statements": [ + { + "expression": { + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 5706, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5691, + "src": "31380:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5709, + "indexExpression": { + "id": 5708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "31385:3:2", + "subExpression": { + "id": 5707, + "name": "k", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "31385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "31380:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3438", + "id": 5714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31405:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5715, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31411:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "3130", + "id": 5716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31416:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "31411:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5718, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31410:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31405:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31399:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 5712, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "31399:5:2", + "typeDescriptions": {} + } + }, + "id": 5720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31399:21:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 5711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31392:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 5710, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "31392:6:2", + "typeDescriptions": {} + } + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31392:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "31380:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 5723, + "nodeType": "ExpressionStatement", + "src": "31380:41:2" + }, + { + "expression": { + "id": 5726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5724, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31436:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 5725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31442:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "31436:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5727, + "nodeType": "ExpressionStatement", + "src": "31436:8:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5703, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31356:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31362:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31356:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5729, + "nodeType": "WhileStatement", + "src": "31349:107:2" + }, + { + "expression": { + "arguments": [ + { + "id": 5732, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5691, + "src": "31480:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31473:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 5730, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "31473:6:2", + "typeDescriptions": {} + } + }, + "id": 5733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31473:12:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 5663, + "id": 5734, + "nodeType": "Return", + "src": "31466:19:2" + } + ] + }, + "documentation": { + "id": 5657, + "nodeType": "StructuredDocumentation", + "src": "30731:225:2", + "text": " @notice Convert UINT to string\n Thank you, Oraclize (aka Provable)!\n https://github.com/provable-things/ethereum-api/blob/master/provableAPI_0.5.sol\n @param _i uint parameter" + }, + "id": 5736, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_uint2str", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5659, + "mutability": "mutable", + "name": "_i", + "nodeType": "VariableDeclaration", + "scope": 5736, + "src": "30981:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30981:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30980:12:2" + }, + "returnParameters": { + "id": 5663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5662, + "mutability": "mutable", + "name": "_uintAsString", + "nodeType": "VariableDeclaration", + "scope": 5736, + "src": "31043:27:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5661, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "31043:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "31042:29:2" + }, + "scope": 5767, + "src": "30962:531:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8943 + ], + "body": { + "id": 5745, + "nodeType": "Block", + "src": "31700:31:2", + "statements": [ + { + "expression": { + "id": 5743, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "31718:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5742, + "id": 5744, + "nodeType": "Return", + "src": "31711:12:2" + } + ] + }, + "documentation": { + "id": 5737, + "nodeType": "StructuredDocumentation", + "src": "31501:88:2", + "text": " @notice Get the contract owner\n @return Address of the owner" + }, + "functionSelector": "893d20e8", + "id": 5746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOwner", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5739, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31659:8:2" + }, + "parameters": { + "id": 5738, + "nodeType": "ParameterList", + "parameters": [], + "src": "31612:2:2" + }, + "returnParameters": { + "id": 5742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5741, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5746, + "src": "31686:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31686:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "31685:9:2" + }, + "scope": 5767, + "src": "31595:136:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8949 + ], + "body": { + "id": 5755, + "nodeType": "Block", + "src": "31987:46:2", + "statements": [ + { + "expression": { + "id": 5753, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "32005:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5752, + "id": 5754, + "nodeType": "Return", + "src": "31998:27:2" + } + ] + }, + "documentation": { + "id": 5747, + "nodeType": "StructuredDocumentation", + "src": "31739:122:2", + "text": " @notice Get the address of Voucher Kernel contract\n @return Address of Voucher Kernel contract" + }, + "functionSelector": "e3f5d2d5", + "id": 5756, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5749, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31946:8:2" + }, + "parameters": { + "id": 5748, + "nodeType": "ParameterList", + "parameters": [], + "src": "31899:2:2" + }, + "returnParameters": { + "id": 5752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5751, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5756, + "src": "31973:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5750, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31973:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "31972:9:2" + }, + "scope": 5767, + "src": "31867:166:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8955 + ], + "body": { + "id": 5765, + "nodeType": "Block", + "src": "32268:40:2", + "statements": [ + { + "expression": { + "id": 5763, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "32286:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5762, + "id": 5764, + "nodeType": "Return", + "src": "32279:21:2" + } + ] + }, + "documentation": { + "id": 5757, + "nodeType": "StructuredDocumentation", + "src": "32041:107:2", + "text": " @notice Get the address of Cashier contract\n @return Address of Cashier address" + }, + "functionSelector": "f9d93099", + "id": 5766, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5759, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32227:8:2" + }, + "parameters": { + "id": 5758, + "nodeType": "ParameterList", + "parameters": [], + "src": "32180:2:2" + }, + "returnParameters": { + "id": 5762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5761, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5766, + "src": "32254:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32254:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "32253:9:2" + }, + "scope": 5767, + "src": "32154:154:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 5768, + "src": "679:31638:2" + } + ], + "src": "49:32270:2" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/ERC1155ERC721.sol", + "exportedSymbols": { + "ERC1155ERC721": [ + 5767 + ] + }, + "id": 5768, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4107, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:2" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4108, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 12500, + "src": "75:51:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 4109, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 13087, + "src": "128:51:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 4110, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8895, + "src": "183:35:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155TokenReceiver.sol", + "file": "./interfaces/IERC1155TokenReceiver.sol", + "id": 4111, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8995, + "src": "220:48:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 4112, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 9232, + "src": "270:34:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 4113, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 9250, + "src": "306:47:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 4114, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8957, + "src": "355:41:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 4115, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 9644, + "src": "398:41:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol", + "file": "./interfaces/ICashier.sol", + "id": 4116, + "nodeType": "ImportDirective", + "scope": 5768, + "sourceUnit": 8785, + "src": "441:35:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4118, + "name": "IERC1155", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8894, + "src": "705:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 4119, + "nodeType": "InheritanceSpecifier", + "src": "705:8:2" + }, + { + "baseName": { + "id": 4120, + "name": "IERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9231, + "src": "715:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 4121, + "nodeType": "InheritanceSpecifier", + "src": "715:7:2" + }, + { + "baseName": { + "id": 4122, + "name": "IERC1155ERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8956, + "src": "724:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 4123, + "nodeType": "InheritanceSpecifier", + "src": "724:14:2" + } + ], + "contractDependencies": [ + 8894, + 8956, + 9006, + 9231 + ], + "contractKind": "contract", + "documentation": { + "id": 4117, + "nodeType": "StructuredDocumentation", + "src": "527:150:2", + "text": " @title Multi-token contract, implementing ERC-1155 and ERC-721 hybrid\n Inspired by: https://github.com/pixowl/sandbox-smart-contracts" + }, + "fullyImplemented": true, + "id": 5767, + "linearizedBaseContracts": [ + 5767, + 8956, + 9231, + 9006, + 8894 + ], + "name": "ERC1155ERC721", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4126, + "libraryName": { + "id": 4124, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "752:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "746:27:2", + "typeName": { + "id": 4125, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "765:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 4129, + "libraryName": { + "id": 4127, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "785:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "779:26:2", + "typeName": { + "id": 4128, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "797:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "constant": false, + "id": 4131, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "833:21:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4130, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "833:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4133, + "mutability": "mutable", + "name": "voucherKernelAddress", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "878:36:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4132, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "878:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4135, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "961:30:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "961:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4141, + "mutability": "mutable", + "name": "balances", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1071:64:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + }, + "typeName": { + "id": 4140, + "keyType": { + "id": 4136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1079:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1071:47:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + }, + "valueType": { + "id": 4139, + "keyType": { + "id": 4137, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1098:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1090:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4138, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1109:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4145, + "mutability": "mutable", + "name": "balance721", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1196:46:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4144, + "keyType": { + "id": 4142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1204:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1196:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1215:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4149, + "mutability": "mutable", + "name": "owners721", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1249:45:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 4148, + "keyType": { + "id": 4146, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1257:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1249:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 4147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4153, + "mutability": "mutable", + "name": "operator721", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1301:47:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 4152, + "keyType": { + "id": 4150, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1309:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1301:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 4151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1320:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4159, + "mutability": "mutable", + "name": "operatorApprovals", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1399:70:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "typeName": { + "id": 4158, + "keyType": { + "id": 4154, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1407:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1399:44:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "valueType": { + "id": 4157, + "keyType": { + "id": 4155, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1426:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1418:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 4156, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1437:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4161, + "mutability": "mutable", + "name": "metadataBase", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1611:28:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4160, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1611:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4163, + "mutability": "mutable", + "name": "metadata1155Route", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1646:33:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4162, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1646:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4165, + "mutability": "mutable", + "name": "metadata721Route", + "nodeType": "VariableDeclaration", + "scope": 5767, + "src": "1686:32:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 4164, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1686:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "anonymous": false, + "id": 4171, + "name": "LogVoucherKernelSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 4170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4167, + "indexed": false, + "mutability": "mutable", + "name": "_newVoucherKernel", + "nodeType": "VariableDeclaration", + "scope": 4171, + "src": "1981:25:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1981:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4169, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 4171, + "src": "2008:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2008:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1980:49:2" + }, + "src": "1955:75:2" + }, + { + "anonymous": false, + "id": 4177, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 4176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4173, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 4177, + "src": "2056:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2056:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4175, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 4177, + "src": "2077:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2077:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2055:43:2" + }, + "src": "2036:63:2" + }, + { + "body": { + "id": 4188, + "nodeType": "Block", + "src": "2128:161:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4180, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2147:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2147:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4182, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "2161:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2147:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4f", + "id": 4184, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2168:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", + "typeString": "literal_string \"UNAUTHORIZED_O\"" + }, + "value": "UNAUTHORIZED_O" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", + "typeString": "literal_string \"UNAUTHORIZED_O\"" + } + ], + "id": 4179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2139:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2139:46:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4186, + "nodeType": "ExpressionStatement", + "src": "2139:46:2" + }, + { + "id": 4187, + "nodeType": "PlaceholderStatement", + "src": "2280:1:2" + } + ] + }, + "id": 4189, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 4178, + "nodeType": "ParameterList", + "parameters": [], + "src": "2125:2:2" + }, + "src": "2107:182:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4210, + "nodeType": "Block", + "src": "2330:387:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4192, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "2363:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4194, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2387:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4193, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2387:7:2", + "typeDescriptions": {} + } + }, + "id": 4196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2387:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2363:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f564f55434845524b45524e454c", + "id": 4198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2412:27:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35e7845fb5a39bd1c4191f758dba933d1bfe9e3c864842e431e6d5dc4068475", + "typeString": "literal_string \"UNSPECIFIED_VOUCHERKERNEL\"" + }, + "value": "UNSPECIFIED_VOUCHERKERNEL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35e7845fb5a39bd1c4191f758dba933d1bfe9e3c864842e431e6d5dc4068475", + "typeString": "literal_string \"UNSPECIFIED_VOUCHERKERNEL\"" + } + ], + "id": 4191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2341:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2341:109:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4200, + "nodeType": "ExpressionStatement", + "src": "2341:109:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4202, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2559:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2559:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4204, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "2573:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2559:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f564b", + "id": 4206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2595:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a2f0c2140d117207ed920dcb303a59a4da759cc226fe941427b02f3b235dfa27", + "typeString": "literal_string \"UNAUTHORIZED_VK\"" + }, + "value": "UNAUTHORIZED_VK" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a2f0c2140d117207ed920dcb303a59a4da759cc226fe941427b02f3b235dfa27", + "typeString": "literal_string \"UNAUTHORIZED_VK\"" + } + ], + "id": 4201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2551:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:62:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4208, + "nodeType": "ExpressionStatement", + "src": "2551:62:2" + }, + { + "id": 4209, + "nodeType": "PlaceholderStatement", + "src": "2708:1:2" + } + ] + }, + "id": 4211, + "name": "onlyFromVoucherKernel", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 4190, + "nodeType": "ParameterList", + "parameters": [], + "src": "2327:2:2" + }, + "src": "2297:420:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4226, + "nodeType": "Block", + "src": "2767:78:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4216, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4213, + "src": "2786:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2806:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2798:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4217, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2798:7:2", + "typeDescriptions": {} + } + }, + "id": 4220, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2798:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2786:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5a45524f5f41444452455353", + "id": 4222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:14:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_71869b3729b99fadce3ee30cb1aa2a0d639e6a2d24158c1ae1ae0059e81b72af", + "typeString": "literal_string \"ZERO_ADDRESS\"" + }, + "value": "ZERO_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_71869b3729b99fadce3ee30cb1aa2a0d639e6a2d24158c1ae1ae0059e81b72af", + "typeString": "literal_string \"ZERO_ADDRESS\"" + } + ], + "id": 4215, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2778:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2778:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4224, + "nodeType": "ExpressionStatement", + "src": "2778:47:2" + }, + { + "id": 4225, + "nodeType": "PlaceholderStatement", + "src": "2836:1:2" + } + ] + }, + "id": 4227, + "name": "notZeroAddress", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 4214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4213, + "mutability": "mutable", + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 4227, + "src": "2749:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4212, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2749:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2748:18:2" + }, + "src": "2725:120:2", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4235, + "nodeType": "Block", + "src": "2867:37:2", + "statements": [ + { + "expression": { + "id": 4233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 4230, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "2878:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 4231, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2886:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2886:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2878:18:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4234, + "nodeType": "ExpressionStatement", + "src": "2878:18:2" + } + ] + }, + "id": 4236, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4228, + "nodeType": "ParameterList", + "parameters": [], + "src": "2864:2:2" + }, + "returnParameters": { + "id": 4229, + "nodeType": "ParameterList", + "parameters": [], + "src": "2867:0:2" + }, + "scope": 5767, + "src": "2853:51:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8836 + ], + "body": { + "id": 4348, + "nodeType": "Block", + "src": "3532:1212:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4252, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "3551:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3566:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3558:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3558:7:2", + "typeDescriptions": {} + } + }, + "id": 4256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3558:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3551:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3570:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4251, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3543:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3543:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4260, + "nodeType": "ExpressionStatement", + "src": "3543:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4262, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "3715:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4263, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3724:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3724:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3715:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4266, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "3738:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4268, + "indexExpression": { + "id": 4267, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "3756:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3738:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4271, + "indexExpression": { + "expression": { + "id": 4269, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3763:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3763:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3738:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "74727565", + "id": 4272, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3778:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3738:44:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3715:67:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f5354", + "id": 4275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3797:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ca5f8e7eb56d1b2f73830c4befc9c07536bf1cee80cce74bda91161d1c20d898", + "typeString": "literal_string \"UNAUTHORIZED_ST\"" + }, + "value": "UNAUTHORIZED_ST" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ca5f8e7eb56d1b2f73830c4befc9c07536bf1cee80cce74bda91161d1c20d898", + "typeString": "literal_string \"UNAUTHORIZED_ST\"" + } + ], + "id": 4261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3693:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3693:132:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4277, + "nodeType": "ExpressionStatement", + "src": "3693:132:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4279, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "3929:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4281, + "indexExpression": { + "id": 4280, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "3938:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3929:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4283, + "indexExpression": { + "id": 4282, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "3948:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3929:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4284, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "3958:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3929:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4951", + "id": 4286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3966:4:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + }, + "value": "IQ" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + } + ], + "id": 4278, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3921:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3921:50:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4288, + "nodeType": "ExpressionStatement", + "src": "3921:50:2" + }, + { + "expression": { + "id": 4302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4289, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4093:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4292, + "indexExpression": { + "id": 4290, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4102:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4093:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4293, + "indexExpression": { + "id": 4291, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4112:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4093:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4300, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4151:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4294, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4121:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4296, + "indexExpression": { + "id": 4295, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4130:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4121:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4298, + "indexExpression": { + "id": 4297, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4140:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4121:25:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "4121:29:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4121:37:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4093:65:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4303, + "nodeType": "ExpressionStatement", + "src": "4093:65:2" + }, + { + "expression": { + "id": 4317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4304, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4169:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4307, + "indexExpression": { + "id": 4305, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4178:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4169:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4308, + "indexExpression": { + "id": 4306, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4188:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4169:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 4311, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "4206:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4313, + "indexExpression": { + "id": 4312, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4215:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4206:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4315, + "indexExpression": { + "id": 4314, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4225:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4206:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4309, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4195:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "4195:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4195:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4169:61:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4318, + "nodeType": "ExpressionStatement", + "src": "4169:61:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4323, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4300:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4324, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4320:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4325, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4338:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4326, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4361:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4320, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "4252:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4319, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "4243:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 4321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 4322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 8737, + "src": "4243:42:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256) external" + } + }, + "id": 4327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4243:135:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4328, + "nodeType": "ExpressionStatement", + "src": "4243:135:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 4330, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4411:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4411:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4332, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4423:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4333, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4430:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4334, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4435:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4335, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4445:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4329, + "name": "TransferSingle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "4396:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 4336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4396:56:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4337, + "nodeType": "EmitStatement", + "src": "4391:61:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 4339, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4613:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4613:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4341, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4239, + "src": "4638:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4342, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4241, + "src": "4658:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4343, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4243, + "src": "4676:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4344, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "4699:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4345, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4247, + "src": "4720:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 4338, + "name": "_doSafeTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4794, + "src": "4568:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256,bytes memory)" + } + }, + "id": 4346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4568:168:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4347, + "nodeType": "ExpressionStatement", + "src": "4568:168:2" + } + ] + }, + "documentation": { + "id": 4237, + "nodeType": "StructuredDocumentation", + "src": "2912:434:2", + "text": " @notice Transfers amount of _tokenId from-to addresses with safety call.\n If _to is a smart contract, will call onERC1155Received\n @dev ERC-1155\n @param _from Source address\n @param _to Destination address\n @param _tokenId ID of the token\n @param _value Transfer amount\n @param _data Additional data forwarded to onERC1155Received if _to is a contract" + }, + "functionSelector": "f242432a", + "id": 4349, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4249, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3523:8:2" + }, + "parameters": { + "id": 4248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4239, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3388:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4238, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3388:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4241, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3412:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3412:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4243, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3434:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3434:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4245, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3461:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3461:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4247, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4349, + "src": "3486:20:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4246, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3486:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "3377:136:2" + }, + "returnParameters": { + "id": 4250, + "nodeType": "ParameterList", + "parameters": [], + "src": "3532:0:2" + }, + "scope": 5767, + "src": "3352:1392:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9186 + ], + "body": { + "id": 4367, + "nodeType": "Block", + "src": "5539:61:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4361, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4352, + "src": "5567:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4362, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "5574:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4363, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4356, + "src": "5579:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 4364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5589:2:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 4360, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4368, + 4412 + ], + "referencedDeclaration": 4412, + "src": "5550:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 4365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5550:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4366, + "nodeType": "ExpressionStatement", + "src": "5550:42:2" + } + ] + }, + "documentation": { + "id": 4350, + "nodeType": "StructuredDocumentation", + "src": "4752:659:2", + "text": " @notice Safely transfers the ownership of a given token ID to another address\n If the target address is a contract, it must implement `onERC721Received`,\n which is called upon a safe transfer, and return the magic value\n `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n the transfer is reverted.\n Requires the msg.sender to be the owner, approved, or operator\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred" + }, + "functionSelector": "42842e0e", + "id": 4368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4358, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5530:8:2" + }, + "parameters": { + "id": 4357, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4352, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4368, + "src": "5453:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5453:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4354, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4368, + "src": "5477:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4353, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5477:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4356, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4368, + "src": "5499:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4355, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5499:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5442:80:2" + }, + "returnParameters": { + "id": 4359, + "nodeType": "ParameterList", + "parameters": [], + "src": "5539:0:2" + }, + "scope": 5767, + "src": "5417:183:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9176 + ], + "body": { + "id": 4411, + "nodeType": "Block", + "src": "6298:514:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4382, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "6322:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4383, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6329:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4384, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4375, + "src": "6334:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4381, + "name": "transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4447 + ], + "referencedDeclaration": 4447, + "src": "6309:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6309:34:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4386, + "nodeType": "ExpressionStatement", + "src": "6309:34:2" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4387, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6360:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "6360:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6360:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4410, + "nodeType": "IfStatement", + "src": "6356:449:2", + "trueBody": { + "id": 4409, + "nodeType": "Block", + "src": "6378:427:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 4405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4395, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "6483:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4396, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6511:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4397, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4375, + "src": "6537:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4398, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4377, + "src": "6568:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 4392, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6439:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4391, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "6419:19:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 4393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6419:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "6419:41:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6419:173:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 4401, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "6616:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4400, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "6596:19:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 4402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6596:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 4403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "6596:41:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "6596:50:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "6419:227:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 4406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6665:29:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 4390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6393:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6393:316:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4408, + "nodeType": "ExpressionStatement", + "src": "6393:316:2" + } + ] + } + } + ] + }, + "documentation": { + "id": 4369, + "nodeType": "StructuredDocumentation", + "src": "5608:533:2", + "text": " @notice Safely transfers the ownership of a given token ID to another address\n If the target address is a contract, it must implement `onERC721Received`\n Requires the msg.sender to be the owner, approved, or operator\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred\n @param _data bytes data to send along with a safe transfer check" + }, + "functionSelector": "b88d4fde", + "id": 4412, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4379, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6289:8:2" + }, + "parameters": { + "id": 4378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4371, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6183:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6183:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4373, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6207:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4372, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6207:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4375, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6229:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4374, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6229:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4377, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4412, + "src": "6256:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4376, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "6256:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "6172:109:2" + }, + "returnParameters": { + "id": 4380, + "nodeType": "ParameterList", + "parameters": [], + "src": "6298:0:2" + }, + "scope": 5767, + "src": "6147:665:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9196 + ], + "body": { + "id": 4446, + "nodeType": "Block", + "src": "7404:310:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 4424, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "7437:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4426, + "indexExpression": { + "id": 4425, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "7449:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7437:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4427, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7462:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7462:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7437:35:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4431, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "7501:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4430, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4908 + ], + "referencedDeclaration": 4908, + "src": "7493:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 4432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7493:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4433, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7514:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7514:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7493:31:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7437:87:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f545f4f574e45525f4e4f525f415050524f564544", + "id": 4437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7539:24:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6c1ef0880797d80cfb5d03f0706d17419220d72dedb8d29675f3cf2fe13f3aba", + "typeString": "literal_string \"NOT_OWNER_NOR_APPROVED\"" + }, + "value": "NOT_OWNER_NOR_APPROVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6c1ef0880797d80cfb5d03f0706d17419220d72dedb8d29675f3cf2fe13f3aba", + "typeString": "literal_string \"NOT_OWNER_NOR_APPROVED\"" + } + ], + "id": 4423, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7415:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7415:159:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4439, + "nodeType": "ExpressionStatement", + "src": "7415:159:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4441, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4415, + "src": "7685:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4442, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4417, + "src": "7692:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4443, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "7697:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4440, + "name": "_transferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4527, + "src": "7671:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7671:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4445, + "nodeType": "ExpressionStatement", + "src": "7671:35:2" + } + ] + }, + "documentation": { + "id": 4413, + "nodeType": "StructuredDocumentation", + "src": "6820:460:2", + "text": " @notice Transfers the ownership of a given token ID to another address.\n Usage of this method is discouraged, use `safeTransferFrom` whenever possible.\n Requires the msg.sender to be the owner, approved, or operator.\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred" + }, + "functionSelector": "23b872dd", + "id": 4447, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4421, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7395:8:2" + }, + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "7318:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4414, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7318:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4417, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "7342:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4416, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7342:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4447, + "src": "7364:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4418, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7364:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7307:80:2" + }, + "returnParameters": { + "id": 4422, + "nodeType": "ParameterList", + "parameters": [], + "src": "7404:0:2" + }, + "scope": 5767, + "src": "7286:428:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 4526, + "nodeType": "Block", + "src": "8237:733:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4459, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8264:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4458, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4908 + ], + "referencedDeclaration": 4908, + "src": "8256:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 4460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8256:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4461, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8277:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8256:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f54", + "id": 4463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8284:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a346341f54e0d0a651e2d90fa5e8663272f9e42fbfd9680c5e5644c341fa6ca4", + "typeString": "literal_string \"UNAUTHORIZED_T\"" + }, + "value": "UNAUTHORIZED_T" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a346341f54e0d0a651e2d90fa5e8663272f9e42fbfd9680c5e5644c341fa6ca4", + "typeString": "literal_string \"UNAUTHORIZED_T\"" + } + ], + "id": 4457, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8248:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8248:53:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4465, + "nodeType": "ExpressionStatement", + "src": "8248:53:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4467, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8404:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8419:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8411:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8411:7:2", + "typeDescriptions": {} + } + }, + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8411:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8404:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8423:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4466, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8396:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8396:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4475, + "nodeType": "ExpressionStatement", + "src": "8396:49:2" + }, + { + "expression": { + "id": 4483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4476, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "8548:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4478, + "indexExpression": { + "id": 4477, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8560:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8548:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 4481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8580:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8572:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8572:7:2", + "typeDescriptions": {} + } + }, + "id": 4482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8572:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8548:34:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4484, + "nodeType": "ExpressionStatement", + "src": "8548:34:2" + }, + { + "expression": { + "id": 4488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "8595:19:2", + "subExpression": { + "baseExpression": { + "id": 4485, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "8595:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4487, + "indexExpression": { + "id": 4486, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8606:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8595:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4489, + "nodeType": "ExpressionStatement", + "src": "8595:19:2" + }, + { + "expression": { + "id": 4493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8625:17:2", + "subExpression": { + "baseExpression": { + "id": 4490, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "8625:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4492, + "indexExpression": { + "id": 4491, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8636:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8625:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4494, + "nodeType": "ExpressionStatement", + "src": "8625:17:2" + }, + { + "expression": { + "id": 4499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4495, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "8655:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4497, + "indexExpression": { + "id": 4496, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8665:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8655:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4498, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8677:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "8655:25:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4500, + "nodeType": "ExpressionStatement", + "src": "8655:25:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4506, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8760:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4503, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "8716:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4502, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "8701:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 4504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8701:36:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 4505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isVoucherTransferable", + "nodeType": "MemberAccess", + "referencedDeclaration": 9574, + "src": "8701:58:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view external returns (bool)" + } + }, + "id": 4507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8701:68:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "46554e44535f52454c4541534544", + "id": 4508, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8771:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_934bfe8ea9e27d246dfc9d0083a676a42c03dee49dfbc9a3462184e5c60a4d6a", + "typeString": "literal_string \"FUNDS_RELEASED\"" + }, + "value": "FUNDS_RELEASED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_934bfe8ea9e27d246dfc9d0083a676a42c03dee49dfbc9a3462184e5c60a4d6a", + "typeString": "literal_string \"FUNDS_RELEASED\"" + } + ], + "id": 4501, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8693:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8693:95:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4510, + "nodeType": "ExpressionStatement", + "src": "8693:95:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4515, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8857:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4516, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8877:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4517, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8895:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4512, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "8810:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4511, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "8801:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 4513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8801:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 4514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 8725, + "src": "8801:41:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256) external" + } + }, + "id": 4518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8801:113:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4519, + "nodeType": "ExpressionStatement", + "src": "8801:113:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4521, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4450, + "src": "8941:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4522, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4452, + "src": "8948:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4523, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4454, + "src": "8953:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4520, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9139, + "src": "8932:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8932:30:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4525, + "nodeType": "EmitStatement", + "src": "8927:35:2" + } + ] + }, + "documentation": { + "id": 4448, + "nodeType": "StructuredDocumentation", + "src": "7722:397:2", + "text": " @notice Internal function to transfer ownership of a given token ID to another address.\n As opposed to transferFrom, this imposes no restrictions on msg.sender.\n @dev ERC-721\n @param _from current owner of the token\n @param _to address to receive the ownership of the given token ID\n @param _tokenId uint256 ID of the token to be transferred" + }, + "id": 4527, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4455, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4450, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "8158:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4449, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8158:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4452, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "8182:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8182:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4454, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4527, + "src": "8204:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8204:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8147:80:2" + }, + "returnParameters": { + "id": 4456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8237:0:2" + }, + "scope": 5767, + "src": "8125:845:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9204 + ], + "body": { + "id": 4576, + "nodeType": "Block", + "src": "9491:658:2", + "statements": [ + { + "assignments": [ + 4537 + ], + "declarations": [ + { + "constant": false, + "id": 4537, + "mutability": "mutable", + "name": "tokenOwner", + "nodeType": "VariableDeclaration", + "scope": 4576, + "src": "9502:18:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4536, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9502:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4541, + "initialValue": { + "arguments": [ + { + "id": 4539, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "9531:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4538, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4908 + ], + "referencedDeclaration": 4908, + "src": "9523:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 4540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9523:17:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9502:38:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4543, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "9559:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 4544, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "9566:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9559:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "524544554e44414e545f43414c4c", + "id": 4546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9578:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + }, + "value": "REDUNDANT_CALL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + } + ], + "id": 4542, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9551:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9551:44:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4548, + "nodeType": "ExpressionStatement", + "src": "9551:44:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4550, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9728:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9728:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4552, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "9742:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "9728:24:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "baseExpression": { + "baseExpression": { + "id": 4554, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "9773:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4556, + "indexExpression": { + "id": 4555, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "9791:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9773:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4559, + "indexExpression": { + "expression": { + "id": 4557, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9803:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "9803:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9773:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "9728:86:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f41", + "id": 4561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9869:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b109989dc87862f05ce512959ee04fbc39856c04777748c77fbf8d55b7a8c011", + "typeString": "literal_string \"UNAUTHORIZED_A\"" + }, + "value": "UNAUTHORIZED_A" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b109989dc87862f05ce512959ee04fbc39856c04777748c77fbf8d55b7a8c011", + "typeString": "literal_string \"UNAUTHORIZED_A\"" + } + ], + "id": 4549, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9706:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9706:190:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4563, + "nodeType": "ExpressionStatement", + "src": "9706:190:2" + }, + { + "expression": { + "id": 4568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4564, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "10063:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4566, + "indexExpression": { + "id": 4565, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "10075:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10063:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4567, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "10087:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "10063:27:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4569, + "nodeType": "ExpressionStatement", + "src": "10063:27:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4571, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4537, + "src": "10115:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4572, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4530, + "src": "10127:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4573, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4532, + "src": "10132:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4570, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9148, + "src": "10106:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 4574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10106:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4575, + "nodeType": "EmitStatement", + "src": "10101:40:2" + } + ] + }, + "documentation": { + "id": 4528, + "nodeType": "StructuredDocumentation", + "src": "8978:443:2", + "text": " @notice Approves another address to transfer the given token ID\n The zero address indicates there is no approved address.\n There can only be one approved address per token at a given time.\n Can only be called by the token owner or an approved operator.\n @dev ERC-721\n @param _to address to be approved for the given token ID\n @param _tokenId uint256 ID of the token to be approved" + }, + "functionSelector": "095ea7b3", + "id": 4577, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4534, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9482:8:2" + }, + "parameters": { + "id": 4533, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4530, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "9444:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9444:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4532, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "9457:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4531, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9457:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9443:31:2" + }, + "returnParameters": { + "id": 4535, + "nodeType": "ParameterList", + "parameters": [], + "src": "9491:0:2" + }, + "scope": 5767, + "src": "9427:722:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9220 + ], + "body": { + "id": 4602, + "nodeType": "Block", + "src": "10586:187:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 4587, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "10619:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4589, + "indexExpression": { + "id": 4588, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4580, + "src": "10629:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10619:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10650:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4591, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10642:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10642:7:2", + "typeDescriptions": {} + } + }, + "id": 4593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10642:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "10619:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e", + "id": 4595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10667:46:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9291e0f44949204f2e9b40e6be090924979d6047b2365868f4e9f027722eb89d", + "typeString": "literal_string \"ERC721: approved query for nonexistent token\"" + }, + "value": "ERC721: approved query for nonexistent token" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9291e0f44949204f2e9b40e6be090924979d6047b2365868f4e9f027722eb89d", + "typeString": "literal_string \"ERC721: approved query for nonexistent token\"" + } + ], + "id": 4586, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10597:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10597:127:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4597, + "nodeType": "ExpressionStatement", + "src": "10597:127:2" + }, + { + "expression": { + "baseExpression": { + "id": 4598, + "name": "operator721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4153, + "src": "10744:11:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4600, + "indexExpression": { + "id": 4599, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4580, + "src": "10756:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10744:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4585, + "id": 4601, + "nodeType": "Return", + "src": "10737:28:2" + } + ] + }, + "documentation": { + "id": 4578, + "nodeType": "StructuredDocumentation", + "src": "10157:304:2", + "text": " @notice Gets the approved address for a token ID, or zero if no address set\n Reverts if the token ID does not exist.\n @dev ERC-721\n @param _tokenId uint256 ID of the token to query the approval of\n @return address currently approved for the given token ID" + }, + "functionSelector": "081812fc", + "id": 4603, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4582, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10545:8:2" + }, + "parameters": { + "id": 4581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4580, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4603, + "src": "10488:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10488:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "10487:18:2" + }, + "returnParameters": { + "id": 4585, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4584, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4603, + "src": "10572:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4583, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10572:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10571:9:2" + }, + "scope": 5767, + "src": "10467:306:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8852 + ], + "body": { + "id": 4751, + "nodeType": "Block", + "src": "11462:1581:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4621, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "11481:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11496:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11488:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11488:7:2", + "typeDescriptions": {} + } + }, + "id": 4625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11488:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "11481:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4627, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11500:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4620, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11473:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11473:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4629, + "nodeType": "ExpressionStatement", + "src": "11473:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4631, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "11631:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11631:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4633, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "11651:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "11651:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11631:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 4636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11667:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 4630, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11623:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11623:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4638, + "nodeType": "ExpressionStatement", + "src": "11623:71:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4640, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "11818:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4641, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11827:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11827:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "11818:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4644, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "11841:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4646, + "indexExpression": { + "id": 4645, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "11859:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11841:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4649, + "indexExpression": { + "expression": { + "id": 4647, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "11866:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "11866:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11841:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "74727565", + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11881:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "11841:44:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11818:67:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f5342", + "id": 4653, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11900:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_184887f256bf91e0eafcb177f95f3c8e3b254b2c7e9eb81c480965f351bfe007", + "typeString": "literal_string \"UNAUTHORIZED_SB\"" + }, + "value": "UNAUTHORIZED_SB" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_184887f256bf91e0eafcb177f95f3c8e3b254b2c7e9eb81c480965f351bfe007", + "typeString": "literal_string \"UNAUTHORIZED_SB\"" + } + ], + "id": 4639, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11796:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11796:132:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4655, + "nodeType": "ExpressionStatement", + "src": "11796:132:2" + }, + { + "body": { + "id": 4730, + "nodeType": "Block", + "src": "12072:598:2", + "statements": [ + { + "assignments": [ + 4668 + ], + "declarations": [ + { + "constant": false, + "id": 4668, + "mutability": "mutable", + "name": "tokenId", + "nodeType": "VariableDeclaration", + "scope": 4730, + "src": "12087:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4667, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12087:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4672, + "initialValue": { + "baseExpression": { + "id": 4669, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12105:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4671, + "indexExpression": { + "id": 4670, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12115:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12105:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12087:30:2" + }, + { + "assignments": [ + 4674 + ], + "declarations": [ + { + "constant": false, + "id": 4674, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 4730, + "src": "12132:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12132:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4678, + "initialValue": { + "baseExpression": { + "id": 4675, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "12148:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4677, + "indexExpression": { + "id": 4676, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12156:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12148:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12132:26:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 4680, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12183:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4682, + "indexExpression": { + "id": 4681, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12192:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12183:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4684, + "indexExpression": { + "id": 4683, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12201:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12183:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4685, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12211:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12183:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4951", + "id": 4687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12218:4:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + }, + "value": "IQ" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_22d91386a9995275181c49d152369de4e03defb3d586bdcc67bdac0de68777de", + "typeString": "literal_string \"IQ\"" + } + ], + "id": 4679, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12175:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12175:48:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4689, + "nodeType": "ExpressionStatement", + "src": "12175:48:2" + }, + { + "expression": { + "id": 4703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4690, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12353:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4693, + "indexExpression": { + "id": 4691, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12362:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12353:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4694, + "indexExpression": { + "id": 4692, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12371:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12353:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4701, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12409:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4695, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12380:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4697, + "indexExpression": { + "id": 4696, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12389:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12380:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4699, + "indexExpression": { + "id": 4698, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12398:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12380:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "12380:28:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12380:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12353:62:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4704, + "nodeType": "ExpressionStatement", + "src": "12353:62:2" + }, + { + "expression": { + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4705, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12430:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4708, + "indexExpression": { + "id": 4706, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12439:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12430:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4709, + "indexExpression": { + "id": 4707, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12448:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12430:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 4712, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "12465:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4714, + "indexExpression": { + "id": 4713, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12474:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12465:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4716, + "indexExpression": { + "id": 4715, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12483:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12465:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 4710, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12455:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "12455:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12455:33:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12430:58:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4719, + "nodeType": "ExpressionStatement", + "src": "12430:58:2" + }, + { + "expression": { + "arguments": [ + { + "id": 4724, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12566:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4725, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12590:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4726, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "12612:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4727, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "12638:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 4721, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "12514:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4720, + "name": "ICashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8784, + "src": "12505:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICashier_$8784_$", + "typeString": "type(contract ICashier)" + } + }, + "id": 4722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12505:24:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 4723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 8737, + "src": "12505:42:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256) external" + } + }, + "id": 4728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12505:153:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4729, + "nodeType": "ExpressionStatement", + "src": "12505:153:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4660, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12045:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 4661, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12049:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "12049:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12045:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4731, + "initializationExpression": { + "assignments": [ + 4657 + ], + "declarations": [ + { + "constant": false, + "id": 4657, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 4731, + "src": "12030:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4656, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12030:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4659, + "initialValue": { + "hexValue": "30", + "id": 4658, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12042:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "12030:13:2" + }, + "loopExpression": { + "expression": { + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "12067:3:2", + "subExpression": { + "id": 4664, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4657, + "src": "12069:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4666, + "nodeType": "ExpressionStatement", + "src": "12067:3:2" + }, + "nodeType": "ForStatement", + "src": "12025:645:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 4733, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12701:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12701:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4735, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12713:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4736, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12720:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4737, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12725:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 4738, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "12736:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + ], + "id": 4732, + "name": "TransferBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8815, + "src": "12687:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12687:57:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4740, + "nodeType": "EmitStatement", + "src": "12682:62:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 4742, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "12910:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "12910:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 4744, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "12935:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4745, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4608, + "src": "12955:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4746, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4611, + "src": "12973:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 4747, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4614, + "src": "12997:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + { + "id": 4748, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4616, + "src": "13019:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + }, + { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + ], + "id": 4741, + "name": "_doSafeBatchTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4838, + "src": "12860:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" + } + }, + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12860:175:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4750, + "nodeType": "ExpressionStatement", + "src": "12860:175:2" + } + ] + }, + "documentation": { + "id": 4604, + "nodeType": "StructuredDocumentation", + "src": "10781:466:2", + "text": "@notice Transfers amount of _tokenId from-to addresses with safety call.\nIf _to is a smart contract, will call onERC1155BatchReceived\n@dev ERC-1155\n@param _from Source address\n@param _to Destination address\n@param _tokenIds array of token IDs\n@param _values array of transfer amounts\n@param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "functionSelector": "2eb2c2d6", + "id": 4752, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeBatchTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4618, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11453:8:2" + }, + "parameters": { + "id": 4617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4606, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11294:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4605, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11294:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4608, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11318:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4607, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11318:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4611, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11340:28:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4609, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11340:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4610, + "nodeType": "ArrayTypeName", + "src": "11340:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4614, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11379:26:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4612, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11379:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4613, + "nodeType": "ArrayTypeName", + "src": "11379:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4616, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4752, + "src": "11416:20:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4615, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "11416:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "11283:160:2" + }, + "returnParameters": { + "id": 4619, + "nodeType": "ParameterList", + "parameters": [], + "src": "11462:0:2" + }, + "scope": 5767, + "src": "11253:1790:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 4793, + "nodeType": "Block", + "src": "13637:492:2", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4768, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4759, + "src": "13652:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "13652:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13652:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4792, + "nodeType": "IfStatement", + "src": "13648:474:2", + "trueBody": { + "id": 4791, + "nodeType": "Block", + "src": "13670:452:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 4787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4776, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4755, + "src": "13777:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4777, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4757, + "src": "13809:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4778, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "13837:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4779, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "13868:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4780, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "13897:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 4773, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4759, + "src": "13732:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4772, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "13711:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13711:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 8975, + "src": "13711:43:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13711:210:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 4783, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4759, + "src": "13946:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4782, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "13925:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13925:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 8975, + "src": "13925:43:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "13925:52:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "13711:266:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f545f535550504f52544544", + "id": 4788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13996:15:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + }, + "value": "NOT_SUPPORTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + } + ], + "id": 4771, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13685:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13685:341:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4790, + "nodeType": "ExpressionStatement", + "src": "13685:341:2" + } + ] + } + } + ] + }, + "documentation": { + "id": 4753, + "nodeType": "StructuredDocumentation", + "src": "13051:369:2", + "text": " @notice Check successful transfer if recipient is a contract\n @dev ERC-1155\n @param _operator The operator of the transfer\n @param _from Address of sender\n @param _to Address of recipient\n @param _tokenId ID of the token\n @param _value Value transferred\n @param _data Optional data" + }, + "id": 4794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_doSafeTransferAcceptanceCheck", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4755, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13476:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4754, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13476:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4757, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13504:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4756, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13504:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4759, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13528:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4758, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13528:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4761, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13550:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4760, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13550:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4763, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13577:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4762, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13577:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4765, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4794, + "src": "13602:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4764, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "13602:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "13465:162:2" + }, + "returnParameters": { + "id": 4767, + "nodeType": "ParameterList", + "parameters": [], + "src": "13637:0:2" + }, + "scope": 5767, + "src": "13426:703:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4837, + "nodeType": "Block", + "src": "14765:504:2", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4812, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4801, + "src": "14780:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14780:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4814, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14780:16:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4836, + "nodeType": "IfStatement", + "src": "14776:486:2", + "trueBody": { + "id": 4835, + "nodeType": "Block", + "src": "14798:464:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4820, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4797, + "src": "14910:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4821, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4799, + "src": "14942:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4822, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4804, + "src": "14970:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 4823, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4807, + "src": "15002:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 4824, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4809, + "src": "15032:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 4817, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4801, + "src": "14860:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4816, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "14839:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14839:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155BatchReceived", + "nodeType": "MemberAccess", + "referencedDeclaration": 8993, + "src": "14839:48:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)" + } + }, + "id": 4825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14839:217:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 4827, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4801, + "src": "15081:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4826, + "name": "ERC1155TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8994, + "src": "15060:20:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC1155TokenReceiver_$8994_$", + "typeString": "type(contract ERC1155TokenReceiver)" + } + }, + "id": 4828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15060:25:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC1155TokenReceiver_$8994", + "typeString": "contract ERC1155TokenReceiver" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC1155BatchReceived", + "nodeType": "MemberAccess", + "referencedDeclaration": 8993, + "src": "15060:48:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256[] memory,uint256[] memory,bytes memory) external returns (bytes4)" + } + }, + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "15060:57:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "14839:278:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4e4f545f535550504f52544544", + "id": 4832, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15136:15:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + }, + "value": "NOT_SUPPORTED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e2a8e7139f3bc1b76f03a9ab4d7a5e5329d0cc7d7a0c99dcd453eb8f41b24b0b", + "typeString": "literal_string \"NOT_SUPPORTED\"" + } + ], + "id": 4815, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14813:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14813:353:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4834, + "nodeType": "ExpressionStatement", + "src": "14813:353:2" + } + ] + } + } + ] + }, + "documentation": { + "id": 4795, + "nodeType": "StructuredDocumentation", + "src": "14137:386:2", + "text": " @notice Check successful transfer if recipient is a contract\n @dev ERC-1155\n @param _operator The operator of the transfer\n @param _from Address of sender\n @param _to Address of recipient\n @param _tokenIds Array of IDs of tokens\n @param _values Array of values transferred\n @param _data Optional data" + }, + "id": 4838, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_doSafeBatchTransferAcceptanceCheck", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4797, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14584:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4796, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14584:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4799, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14612:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4798, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14612:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4801, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14636:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4800, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14636:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4804, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14658:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14658:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4803, + "nodeType": "ArrayTypeName", + "src": "14658:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4807, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14695:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4805, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14695:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4806, + "nodeType": "ArrayTypeName", + "src": "14695:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4809, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 4838, + "src": "14730:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4808, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "14730:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "14573:182:2" + }, + "returnParameters": { + "id": 4811, + "nodeType": "ParameterList", + "parameters": [], + "src": "14765:0:2" + }, + "scope": 5767, + "src": "14529:740:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8862 + ], + "body": { + "id": 4855, + "nodeType": "Block", + "src": "15643:54:2", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4849, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "15661:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4851, + "indexExpression": { + "id": 4850, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4843, + "src": "15670:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15661:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4853, + "indexExpression": { + "id": 4852, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4841, + "src": "15680:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15661:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4848, + "id": 4854, + "nodeType": "Return", + "src": "15654:35:2" + } + ] + }, + "documentation": { + "id": 4839, + "nodeType": "StructuredDocumentation", + "src": "15277:223:2", + "text": "@notice Get the balance of tokens of an account\n@dev ERC-1155\n@param _account The address of the token holder\n@param _tokenId ID of the token\n@return balance" + }, + "functionSelector": "00fdd58e", + "id": 4856, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4845, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15602:8:2" + }, + "parameters": { + "id": 4844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4841, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "15525:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4840, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15525:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4843, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "15543:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4842, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15543:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15524:36:2" + }, + "returnParameters": { + "id": 4848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4847, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "15629:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15629:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15628:9:2" + }, + "scope": 5767, + "src": "15506:191:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9156 + ], + "body": { + "id": 4879, + "nodeType": "Block", + "src": "15987:199:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4866, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4859, + "src": "16006:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16024:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4868, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16016:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16016:7:2", + "typeDescriptions": {} + } + }, + "id": 4870, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16016:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "16006:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16028:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 4865, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15998:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15998:52:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4874, + "nodeType": "ExpressionStatement", + "src": "15998:52:2" + }, + { + "expression": { + "baseExpression": { + "id": 4875, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "16160:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4877, + "indexExpression": { + "id": 4876, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4859, + "src": "16171:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16160:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4864, + "id": 4878, + "nodeType": "Return", + "src": "16153:25:2" + } + ] + }, + "documentation": { + "id": 4857, + "nodeType": "StructuredDocumentation", + "src": "15705:202:2", + "text": "@notice Count all NFTs assigned to an owner\n @dev ERC-721\n @param _owner An address for whom to query the balance\n @return The number of NFTs owned by `_owner`, possibly zero" + }, + "functionSelector": "70a08231", + "id": 4880, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4861, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "15960:8:2" + }, + "parameters": { + "id": 4860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4859, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 4880, + "src": "15932:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15932:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "15931:16:2" + }, + "returnParameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4880, + "src": "15978:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15978:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "15977:9:2" + }, + "scope": 5767, + "src": "15913:273:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9164 + ], + "body": { + "id": 4907, + "nodeType": "Block", + "src": "16511:242:2", + "statements": [ + { + "assignments": [ + 4890 + ], + "declarations": [ + { + "constant": false, + "id": 4890, + "mutability": "mutable", + "name": "tokenOwner", + "nodeType": "VariableDeclaration", + "scope": 4907, + "src": "16522:18:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4889, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16522:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 4894, + "initialValue": { + "baseExpression": { + "id": 4891, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "16543:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 4893, + "indexExpression": { + "id": 4892, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4883, + "src": "16553:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16543:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16522:40:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4896, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4890, + "src": "16581:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16603:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "16595:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16595:7:2", + "typeDescriptions": {} + } + }, + "id": 4900, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16595:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "16581:24:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e444546494e45445f4f574e4552", + "id": 4902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16607:17:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_665a82e24970e95450234db0a05e4b37f2a03b4524d96a2fb7fddd76a7ed30de", + "typeString": "literal_string \"UNDEFINED_OWNER\"" + }, + "value": "UNDEFINED_OWNER" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_665a82e24970e95450234db0a05e4b37f2a03b4524d96a2fb7fddd76a7ed30de", + "typeString": "literal_string \"UNDEFINED_OWNER\"" + } + ], + "id": 4895, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16573:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16573:52:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4904, + "nodeType": "ExpressionStatement", + "src": "16573:52:2" + }, + { + "expression": { + "id": 4905, + "name": "tokenOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4890, + "src": "16735:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4888, + "id": 4906, + "nodeType": "Return", + "src": "16728:17:2" + } + ] + }, + "documentation": { + "id": 4881, + "nodeType": "StructuredDocumentation", + "src": "16194:237:2", + "text": " @notice Gets the owner of the specified token ID.\n @dev ERC-721\n @param _tokenId uint256 ID of the token to query the owner of\n @return address currently marked as the owner of the given token ID" + }, + "functionSelector": "6352211e", + "id": 4908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4885, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "16484:8:2" + }, + "parameters": { + "id": 4884, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4883, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 4908, + "src": "16454:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16454:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16453:18:2" + }, + "returnParameters": { + "id": 4888, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4887, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4908, + "src": "16502:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4886, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16502:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "16501:9:2" + }, + "scope": 5767, + "src": "16437:316:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8875 + ], + "body": { + "id": 4972, + "nodeType": "Block", + "src": "17157:469:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4923, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17190:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17190:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 4925, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "17210:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17210:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17190:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17241:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 4922, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "17168:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17168:110:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4930, + "nodeType": "ExpressionStatement", + "src": "17168:110:2" + }, + { + "assignments": [ + 4935 + ], + "declarations": [ + { + "constant": false, + "id": 4935, + "mutability": "mutable", + "name": "batchBalances", + "nodeType": "VariableDeclaration", + "scope": 4972, + "src": "17380:30:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4933, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17380:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4934, + "nodeType": "ArrayTypeName", + "src": "17380:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "id": 4942, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 4939, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17427:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17427:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4938, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "17413:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 4936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17417:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4937, + "nodeType": "ArrayTypeName", + "src": "17417:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 4941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17413:31:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17380:64:2" + }, + { + "body": { + "id": 4968, + "nodeType": "Block", + "src": "17504:82:2", + "statements": [ + { + "expression": { + "id": 4966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 4954, + "name": "batchBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "17519:13:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 4956, + "indexExpression": { + "id": 4955, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17533:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17519:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4957, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "17538:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 4961, + "indexExpression": { + "baseExpression": { + "id": 4958, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4915, + "src": "17547:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[] calldata" + } + }, + "id": 4960, + "indexExpression": { + "id": 4959, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17557:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17547:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17538:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4965, + "indexExpression": { + "baseExpression": { + "id": 4962, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17561:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4964, + "indexExpression": { + "id": 4963, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17571:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17561:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17538:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17519:55:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4967, + "nodeType": "ExpressionStatement", + "src": "17519:55:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4947, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17477:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 4948, + "name": "_accounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4912, + "src": "17481:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 4949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "17481:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17477:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4969, + "initializationExpression": { + "assignments": [ + 4944 + ], + "declarations": [ + { + "constant": false, + "id": 4944, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 4969, + "src": "17462:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17462:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4946, + "initialValue": { + "hexValue": "30", + "id": 4945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17474:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "17462:13:2" + }, + "loopExpression": { + "expression": { + "id": 4952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "17499:3:2", + "subExpression": { + "id": 4951, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4944, + "src": "17501:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4953, + "nodeType": "ExpressionStatement", + "src": "17499:3:2" + }, + "nodeType": "ForStatement", + "src": "17457:129:2" + }, + { + "expression": { + "id": 4970, + "name": "batchBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4935, + "src": "17605:13:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "functionReturnParameters": 4921, + "id": 4971, + "nodeType": "Return", + "src": "17598:20:2" + } + ] + }, + "documentation": { + "id": 4909, + "nodeType": "StructuredDocumentation", + "src": "16761:231:2", + "text": "@notice Get the balance of account-token pairs.\n@dev ERC-1155\n@param _accounts The addresses of the token holders\n@param _tokenIds IDs of the tokens\n@return balances" + }, + "functionSelector": "4e1273f4", + "id": 4973, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOfBatch", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4917, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17121:8:2" + }, + "parameters": { + "id": 4916, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4912, + "mutability": "mutable", + "name": "_accounts", + "nodeType": "VariableDeclaration", + "scope": 4973, + "src": "17032:28:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4910, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17032:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4911, + "nodeType": "ArrayTypeName", + "src": "17032:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4915, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 4973, + "src": "17071:28:2", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4913, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17071:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4914, + "nodeType": "ArrayTypeName", + "src": "17071:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "17021:85:2" + }, + "returnParameters": { + "id": 4921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4920, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4973, + "src": "17139:16:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 4918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17139:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4919, + "nodeType": "ArrayTypeName", + "src": "17139:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "17138:18:2" + }, + "scope": 5767, + "src": "16998:628:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8883, + 9212 + ], + "body": { + "id": 5008, + "nodeType": "Block", + "src": "18023:292:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4985, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18042:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18042:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 4987, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4976, + "src": "18056:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "18042:23:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "524544554e44414e545f43414c4c", + "id": 4989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18067:16:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + }, + "value": "REDUNDANT_CALL" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0d6a83cea74c93af9d0ecf0d695b181905be0ac705b9f5c24f75ac5424c53e2", + "typeString": "literal_string \"REDUNDANT_CALL\"" + } + ], + "id": 4984, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "18034:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18034:50:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4991, + "nodeType": "ExpressionStatement", + "src": "18034:50:2" + }, + { + "expression": { + "id": 4999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 4992, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "18193:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 4996, + "indexExpression": { + "expression": { + "id": 4993, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18211:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18211:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18193:29:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 4997, + "indexExpression": { + "id": 4995, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4976, + "src": "18223:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18193:40:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4998, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4978, + "src": "18236:8:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18193:51:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5000, + "nodeType": "ExpressionStatement", + "src": "18193:51:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5002, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "18275:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "18275:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5004, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4976, + "src": "18287:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5005, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4978, + "src": "18298:8:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 5001, + "name": "ApprovalForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8937, + "src": "18260:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,address,bool)" + } + }, + "id": 5006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18260:47:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5007, + "nodeType": "EmitStatement", + "src": "18255:52:2" + } + ] + }, + "documentation": { + "id": 4974, + "nodeType": "StructuredDocumentation", + "src": "17634:262:2", + "text": " @notice Approves or unapproves the operator.\n will revert if the caller attempts to approve itself as it is redundant\n @dev ERC-1155 & ERC-721\n @param _operator to (un)approve\n @param _approve flag to set or unset" + }, + "functionSelector": "a22cb465", + "id": 5009, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4982, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 4980, + "name": "IERC1155", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8894, + "src": "17999:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + { + "id": 4981, + "name": "IERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9231, + "src": "18009:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + } + ], + "src": "17990:27:2" + }, + "parameters": { + "id": 4979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4976, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "17929:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4975, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17929:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4978, + "mutability": "mutable", + "name": "_approve", + "nodeType": "VariableDeclaration", + "scope": 5009, + "src": "17948:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4977, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "17948:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "17928:34:2" + }, + "returnParameters": { + "id": 4983, + "nodeType": "ParameterList", + "parameters": [], + "src": "18023:0:2" + }, + "scope": 5767, + "src": "17902:413:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8893, + 9230 + ], + "body": { + "id": 5028, + "nodeType": "Block", + "src": "18765:64:2", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5022, + "name": "operatorApprovals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4159, + "src": "18783:17:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 5024, + "indexExpression": { + "id": 5023, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "18801:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18783:27:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 5026, + "indexExpression": { + "id": 5025, + "name": "_operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5014, + "src": "18811:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18783:38:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5021, + "id": 5027, + "nodeType": "Return", + "src": "18776:45:2" + } + ] + }, + "documentation": { + "id": 5010, + "nodeType": "StructuredDocumentation", + "src": "18323:277:2", + "text": "@notice Gets approval status of an operator for a given account.\n@dev ERC-1155 & ERC-721\n@param _account token holder\n@param _operator operator to check\n@return True if the operator is approved, false if not" + }, + "functionSelector": "e985e9c5", + "id": 5029, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5018, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 5016, + "name": "IERC1155", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8894, + "src": "18717:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + { + "id": 5017, + "name": "IERC721", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9231, + "src": "18727:7:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + } + ], + "src": "18708:27:2" + }, + "parameters": { + "id": 5015, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5012, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5029, + "src": "18632:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5011, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18632:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5014, + "mutability": "mutable", + "name": "_operator", + "nodeType": "VariableDeclaration", + "scope": 5029, + "src": "18650:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "18650:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "18631:37:2" + }, + "returnParameters": { + "id": 5021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5029, + "src": "18754:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5019, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18754:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18753:6:2" + }, + "scope": 5767, + "src": "18606:223:2", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9005 + ], + "body": { + "id": 5058, + "nodeType": "Block", + "src": "19155:385:2", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5038, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19244:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783031666663396137", + "id": 5039, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19260:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_33540519_by_1", + "typeString": "int_const 33540519" + }, + "value": "0x01ffc9a7" + }, + "src": "19244:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5041, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19297:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30786439623637613236", + "id": 5042, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19313:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_3652614694_by_1", + "typeString": "int_const 3652614694" + }, + "value": "0xd9b67a26" + }, + "src": "19297:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:79:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5045, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19351:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783830616335386364", + "id": 5046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19367:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_2158778573_by_1", + "typeString": "int_const 2158778573" + }, + "value": "0x80ac58cd" + }, + "src": "19351:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:133:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5049, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19404:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783562356531333966", + "id": 5050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19420:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1532892063_by_1", + "typeString": "int_const 1532892063" + }, + "value": "0x5b5e139f" + }, + "src": "19404:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:186:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5053, + "name": "_interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5032, + "src": "19476:12:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30783065383933343163", + "id": 5054, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19492:10:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_243872796_by_1", + "typeString": "int_const 243872796" + }, + "value": "0x0e89341c" + }, + "src": "19476:26:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "19244:258:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5037, + "id": 5057, + "nodeType": "Return", + "src": "19166:336:2" + } + ] + }, + "documentation": { + "id": 5030, + "nodeType": "StructuredDocumentation", + "src": "18837:185:2", + "text": " @notice Returns true if this contract implements the interface defined by _interfaceId_.\n This function call must use less than 30 000 gas. ATM not enforced." + }, + "functionSelector": "01ffc9a7", + "id": 5059, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5034, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19117:8:2" + }, + "parameters": { + "id": 5033, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5032, + "mutability": "mutable", + "name": "_interfaceId", + "nodeType": "VariableDeclaration", + "scope": 5059, + "src": "19055:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 5031, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "19055:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "19054:21:2" + }, + "returnParameters": { + "id": 5037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5036, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5059, + "src": "19144:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5035, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "19144:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "19143:6:2" + }, + "scope": 5767, + "src": "19028:512:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8908 + ], + "body": { + "id": 5081, + "nodeType": "Block", + "src": "20227:54:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5075, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5062, + "src": "20244:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5076, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5064, + "src": "20249:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5077, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5066, + "src": "20259:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5078, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5068, + "src": "20267:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5074, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5145, + 5217 + ], + "referencedDeclaration": 5145, + "src": "20238:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory)" + } + }, + "id": 5079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20238:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5080, + "nodeType": "ExpressionStatement", + "src": "20238:35:2" + } + ] + }, + "documentation": { + "id": 5060, + "nodeType": "StructuredDocumentation", + "src": "19631:428:2", + "text": " @notice Mint an amount of a desired token\n Currently no restrictions as to who is allowed to mint - so, it is public.\n @dev ERC-1155\n @param _to owner of the minted token\n @param _tokenId ID of the token to be minted\n @param _value Amount of the token to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "functionSelector": "731133e9", + "id": 5082, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5072, + "modifierName": { + "id": 5071, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "20205:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20205:21:2" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5070, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20196:8:2" + }, + "parameters": { + "id": 5069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5062, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20089:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20089:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5064, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20111:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5063, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20111:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5066, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20138:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20138:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5068, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5082, + "src": "20163:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5067, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20163:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "20078:110:2" + }, + "returnParameters": { + "id": 5073, + "nodeType": "ParameterList", + "parameters": [], + "src": "20227:0:2" + }, + "scope": 5767, + "src": "20065:216:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5144, + "nodeType": "Block", + "src": "20795:487:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5095, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "20814:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5098, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20829:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "20821:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5096, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20821:7:2", + "typeDescriptions": {} + } + }, + "id": 5099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20821:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "20814:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20833:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5094, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20806:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20806:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5103, + "nodeType": "ExpressionStatement", + "src": "20806:49:2" + }, + { + "expression": { + "id": 5117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5104, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "20950:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5107, + "indexExpression": { + "id": 5105, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "20959:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20950:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5108, + "indexExpression": { + "id": 5106, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "20969:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20950:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 5115, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5089, + "src": "21004:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5109, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "20976:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5111, + "indexExpression": { + "id": 5110, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "20985:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20976:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5113, + "indexExpression": { + "id": 5112, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "20995:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20976:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "20976:27:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20976:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20950:61:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5118, + "nodeType": "ExpressionStatement", + "src": "20950:61:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21042:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21042:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21062:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21054:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21054:7:2", + "typeDescriptions": {} + } + }, + "id": 5125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21054:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5126, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "21066:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5127, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "21071:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5128, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5089, + "src": "21081:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5119, + "name": "TransferSingle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "21027:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21027:61:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5130, + "nodeType": "EmitStatement", + "src": "21022:66:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5132, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "21146:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "21146:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21179:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "21171:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21171:7:2", + "typeDescriptions": {} + } + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21171:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5138, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5085, + "src": "21196:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5139, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "21214:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5140, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5089, + "src": "21237:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5141, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5091, + "src": "21258:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5131, + "name": "_doSafeTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4794, + "src": "21101:30:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256,bytes memory)" + } + }, + "id": 5142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21101:173:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5143, + "nodeType": "ExpressionStatement", + "src": "21101:173:2" + } + ] + }, + "documentation": { + "id": 5083, + "nodeType": "StructuredDocumentation", + "src": "20289:366:2", + "text": " @notice Internal function to mint an amount of a desired token\n @dev ERC-1155\n @param _to owner of the minted token\n @param _tokenId ID of the token to be minted\n @param _value Amount of the token to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "id": 5145, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5092, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5085, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20686:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5084, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20686:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5087, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20708:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20708:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5089, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20735:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5088, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20735:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5091, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5145, + "src": "20760:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5090, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "20760:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "20675:110:2" + }, + "returnParameters": { + "id": 5093, + "nodeType": "ParameterList", + "parameters": [], + "src": "20795:0:2" + }, + "scope": 5767, + "src": "20661:621:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8928 + ], + "body": { + "id": 5165, + "nodeType": "Block", + "src": "21693:59:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5159, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5148, + "src": "21710:2:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5160, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5150, + "src": "21714:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5158, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 5145, + 5217 + ], + "referencedDeclaration": 5217, + "src": "21704:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 5161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21704:18:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5162, + "nodeType": "ExpressionStatement", + "src": "21704:18:2" + }, + { + "expression": { + "hexValue": "74727565", + "id": 5163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21740:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 5157, + "id": 5164, + "nodeType": "Return", + "src": "21733:11:2" + } + ] + }, + "documentation": { + "id": 5146, + "nodeType": "StructuredDocumentation", + "src": "21290:260:2", + "text": " @notice Function to mint tokens.\n @dev ERC-721\n @param to The address that will receive the minted tokens.\n @param tokenId The token id to mint.\n @return A boolean that indicates if the operation was successful." + }, + "functionSelector": "40c10f19", + "id": 5166, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5154, + "modifierName": { + "id": 5153, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "21642:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21642:21:2" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5152, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21624:8:2" + }, + "parameters": { + "id": 5151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5148, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 5166, + "src": "21570:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5147, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21570:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5150, + "mutability": "mutable", + "name": "tokenId", + "nodeType": "VariableDeclaration", + "scope": 5166, + "src": "21582:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5149, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21582:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "21569:29:2" + }, + "returnParameters": { + "id": 5157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5156, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5166, + "src": "21682:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "21682:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "21681:6:2" + }, + "scope": 5767, + "src": "21556:196:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5216, + "nodeType": "Block", + "src": "22086:399:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5175, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22105:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5178, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22120:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5177, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22112:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5176, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22112:7:2", + "typeDescriptions": {} + } + }, + "id": 5179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22112:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "22105:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22124:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5174, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22097:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22097:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5183, + "nodeType": "ExpressionStatement", + "src": "22097:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 5185, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "22269:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 5187, + "indexExpression": { + "id": 5186, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5171, + "src": "22279:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22269:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22300:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22292:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5188, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22292:7:2", + "typeDescriptions": {} + } + }, + "id": 5191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22292:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "22269:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4552433732313a20746f6b656e20616c7265616479206d696e746564", + "id": 5193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22317:30:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57", + "typeString": "literal_string \"ERC721: token already minted\"" + }, + "value": "ERC721: token already minted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2a63ce106ef95058ed21fd07c42a10f11dc5c32ac13a4e847923f7759f635d57", + "typeString": "literal_string \"ERC721: token already minted\"" + } + ], + "id": 5184, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22247:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22247:111:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5195, + "nodeType": "ExpressionStatement", + "src": "22247:111:2" + }, + { + "expression": { + "id": 5200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 5196, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "22371:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 5198, + "indexExpression": { + "id": 5197, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5171, + "src": "22381:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "22371:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5199, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22393:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "22371:25:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5201, + "nodeType": "ExpressionStatement", + "src": "22371:25:2" + }, + { + "expression": { + "id": 5205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "22407:17:2", + "subExpression": { + "baseExpression": { + "id": 5202, + "name": "balance721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4145, + "src": "22407:10:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5204, + "indexExpression": { + "id": 5203, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22418:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "22407:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5206, + "nodeType": "ExpressionStatement", + "src": "22407:17:2" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 5210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22459:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "22451:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22451:7:2", + "typeDescriptions": {} + } + }, + "id": 5211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22451:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5212, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "22463:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5213, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5171, + "src": "22468:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5207, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9139, + "src": "22442:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 5214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22442:35:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5215, + "nodeType": "EmitStatement", + "src": "22437:40:2" + } + ] + }, + "documentation": { + "id": 5167, + "nodeType": "StructuredDocumentation", + "src": "21760:265:2", + "text": " @notice Internal function to mint a new token.\n Reverts if the given token ID already exists.\n @dev ERC-721\n @param _to The address that will own the minted token\n @param _tokenId uint256 ID of the token to be minted" + }, + "id": 5217, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5217, + "src": "22046:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22046:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5171, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5217, + "src": "22059:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5170, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22059:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "22045:31:2" + }, + "returnParameters": { + "id": 5173, + "nodeType": "ParameterList", + "parameters": [], + "src": "22086:0:2" + }, + "scope": 5767, + "src": "22031:454:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5240, + "nodeType": "Block", + "src": "23104:98:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5234, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5220, + "src": "23163:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5235, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5223, + "src": "23168:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5236, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5226, + "src": "23179:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5237, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5228, + "src": "23188:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5233, + "name": "_mintBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "23152:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256[] memory,uint256[] memory,bytes memory)" + } + }, + "id": 5238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23152:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5239, + "nodeType": "ExpressionStatement", + "src": "23152:42:2" + } + ] + }, + "documentation": { + "id": 5218, + "nodeType": "StructuredDocumentation", + "src": "22493:427:2", + "text": " @notice Batch minting of tokens\n Currently no restrictions as to who is allowed to mint - so, it is public.\n @dev ERC-1155\n @param _to The address that will own the minted token\n @param _tokenIds IDs of the tokens to be minted\n @param _values Amounts of the tokens to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "functionSelector": "1f7fdffa", + "id": 5241, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5231, + "modifierName": { + "id": 5230, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "23082:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "23082:21:2" + } + ], + "name": "mintBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5220, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "22955:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5219, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22955:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5223, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "22977:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5221, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "22977:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5222, + "nodeType": "ArrayTypeName", + "src": "22977:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5226, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "23014:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23014:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5225, + "nodeType": "ArrayTypeName", + "src": "23014:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5228, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5241, + "src": "23049:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5227, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "23049:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "22944:130:2" + }, + "returnParameters": { + "id": 5232, + "nodeType": "ParameterList", + "parameters": [], + "src": "23104:0:2" + }, + "scope": 5767, + "src": "22926:276:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5333, + "nodeType": "Block", + "src": "23742:795:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5256, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "23761:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23776:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5258, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "23768:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23768:7:2", + "typeDescriptions": {} + } + }, + "id": 5260, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23768:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "23761:17:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23780:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5255, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23753:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23753:49:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5264, + "nodeType": "ExpressionStatement", + "src": "23753:49:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5266, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "23911:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "23911:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 5268, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "23931:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "23931:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23911:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23947:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 5265, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23903:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23903:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5273, + "nodeType": "ExpressionStatement", + "src": "23903:71:2" + }, + { + "body": { + "id": 5306, + "nodeType": "Block", + "src": "24125:132:2", + "statements": [ + { + "expression": { + "id": 5304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5285, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "24140:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5290, + "indexExpression": { + "baseExpression": { + "id": 5286, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24149:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5288, + "indexExpression": { + "id": 5287, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24159:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24149:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24140:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5291, + "indexExpression": { + "id": 5289, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24163:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24140:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 5296, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "24203:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5300, + "indexExpression": { + "baseExpression": { + "id": 5297, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24212:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5299, + "indexExpression": { + "id": 5298, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24222:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24212:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24203:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5302, + "indexExpression": { + "id": 5301, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24226:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24203:27:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 5292, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24170:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5294, + "indexExpression": { + "id": 5293, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24178:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24170:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "24170:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24170:75:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24140:105:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5305, + "nodeType": "ExpressionStatement", + "src": "24140:105:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5278, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24098:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5279, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24102:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "24102:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24098:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5307, + "initializationExpression": { + "assignments": [ + 5275 + ], + "declarations": [ + { + "constant": false, + "id": 5275, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 5307, + "src": "24083:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24083:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5277, + "initialValue": { + "hexValue": "30", + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24095:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "24083:13:2" + }, + "loopExpression": { + "expression": { + "id": 5283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "24120:3:2", + "subExpression": { + "id": 5282, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5275, + "src": "24120:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5284, + "nodeType": "ExpressionStatement", + "src": "24120:3:2" + }, + "nodeType": "ForStatement", + "src": "24078:179:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5309, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24288:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "24288:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24308:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24300:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24300:7:2", + "typeDescriptions": {} + } + }, + "id": 5314, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24300:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5315, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24312:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5316, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24317:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5317, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24328:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 5308, + "name": "TransferBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8815, + "src": "24274:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" + } + }, + "id": 5318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24274:62:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5319, + "nodeType": "EmitStatement", + "src": "24269:67:2" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 5321, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "24399:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "24399:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24432:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "24424:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5323, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24424:7:2", + "typeDescriptions": {} + } + }, + "id": 5326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24424:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5327, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5244, + "src": "24449:3:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5328, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "24467:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5329, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5250, + "src": "24491:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5330, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5252, + "src": "24513:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5320, + "name": "_doSafeBatchTransferAcceptanceCheck", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4838, + "src": "24349:35:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory,bytes memory)" + } + }, + "id": 5331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24349:180:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5332, + "nodeType": "ExpressionStatement", + "src": "24349:180:2" + } + ] + }, + "documentation": { + "id": 5242, + "nodeType": "StructuredDocumentation", + "src": "23210:367:2", + "text": " @notice Internal function for batch minting of tokens\\\n @dev ERC-1155\n @param _to The address that will own the minted token\n @param _tokenIds IDs of the tokens to be minted\n @param _values Amounts of the tokens to be minted\n @param _data Additional data forwarded to onERC1155BatchReceived if _to is a contract" + }, + "id": 5334, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mintBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5244, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23613:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "23613:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5247, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23635:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23635:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5246, + "nodeType": "ArrayTypeName", + "src": "23635:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5250, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23672:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5248, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "23672:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5249, + "nodeType": "ArrayTypeName", + "src": "23672:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5252, + "mutability": "mutable", + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 5334, + "src": "23707:18:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5251, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "23707:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "23602:130:2" + }, + "returnParameters": { + "id": 5254, + "nodeType": "ParameterList", + "parameters": [], + "src": "23742:0:2" + }, + "scope": 5767, + "src": "23583:954:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8918 + ], + "body": { + "id": 5353, + "nodeType": "Block", + "src": "24922:52:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5348, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5337, + "src": "24939:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5349, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5339, + "src": "24949:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5350, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5341, + "src": "24959:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5347, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5402, + "src": "24933:5:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24933:33:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5352, + "nodeType": "ExpressionStatement", + "src": "24933:33:2" + } + ] + }, + "documentation": { + "id": 5335, + "nodeType": "StructuredDocumentation", + "src": "24545:233:2", + "text": " @notice Burn an amount of tokens with the given ID\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenId ID of the token\n @param _value Amount of the token" + }, + "functionSelector": "f5298aca", + "id": 5354, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5345, + "modifierName": { + "id": 5344, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "24900:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "24900:21:2" + } + ], + "name": "burn", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5343, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "24891:8:2" + }, + "parameters": { + "id": 5342, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5337, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "24808:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24808:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5339, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "24835:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24835:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5341, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5354, + "src": "24862:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5340, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "24862:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "24797:86:2" + }, + "returnParameters": { + "id": 5346, + "nodeType": "ParameterList", + "parameters": [], + "src": "24922:0:2" + }, + "scope": 5767, + "src": "24784:190:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5401, + "nodeType": "Block", + "src": "25331:343:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5365, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25350:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25370:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25362:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25362:7:2", + "typeDescriptions": {} + } + }, + "id": 5369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25362:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "25350:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25374:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5364, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "25342:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25342:54:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5373, + "nodeType": "ExpressionStatement", + "src": "25342:54:2" + }, + { + "expression": { + "id": 5387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5374, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "25513:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5377, + "indexExpression": { + "id": 5375, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5359, + "src": "25522:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25513:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5378, + "indexExpression": { + "id": 5376, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25532:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "25513:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 5385, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5361, + "src": "25577:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5379, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "25544:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5381, + "indexExpression": { + "id": 5380, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5359, + "src": "25553:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25544:18:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5383, + "indexExpression": { + "id": 5382, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25563:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25544:28:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "25544:32:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25544:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25513:71:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5388, + "nodeType": "ExpressionStatement", + "src": "25513:71:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5390, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "25615:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "25615:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5392, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5357, + "src": "25627:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25645:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "25637:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25637:7:2", + "typeDescriptions": {} + } + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25637:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5397, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5359, + "src": "25649:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5398, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5361, + "src": "25659:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5389, + "name": "TransferSingle", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8800, + "src": "25600:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256,uint256)" + } + }, + "id": 5399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25600:66:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5400, + "nodeType": "EmitStatement", + "src": "25595:71:2" + } + ] + }, + "documentation": { + "id": 5355, + "nodeType": "StructuredDocumentation", + "src": "24982:233:2", + "text": " @notice Burn an amount of tokens with the given ID\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenId ID of the token\n @param _value Amount of the token" + }, + "id": 5402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5357, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "25246:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5356, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25246:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5359, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "25273:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25273:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5361, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "25300:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25300:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "25235:86:2" + }, + "returnParameters": { + "id": 5363, + "nodeType": "ParameterList", + "parameters": [], + "src": "25331:0:2" + }, + "scope": 5767, + "src": "25221:453:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5422, + "nodeType": "Block", + "src": "26195:59:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5417, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5405, + "src": "26217:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5418, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5408, + "src": "26227:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5419, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5411, + "src": "26238:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 5416, + "name": "_burnBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5501, + "src": "26206:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,uint256[] memory,uint256[] memory)" + } + }, + "id": 5420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26206:40:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5421, + "nodeType": "ExpressionStatement", + "src": "26206:40:2" + } + ] + }, + "documentation": { + "id": 5403, + "nodeType": "StructuredDocumentation", + "src": "25812:223:2", + "text": " @notice Batch burn an amounts of tokens\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenIds IDs of the tokens\n @param _values Amounts of the tokens" + }, + "functionSelector": "6b20c454", + "id": 5423, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5414, + "modifierName": { + "id": 5413, + "name": "onlyFromVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4211, + "src": "26173:21:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "26173:21:2" + } + ], + "name": "burnBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5405, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5423, + "src": "26070:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26070:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5408, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5423, + "src": "26097:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26097:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5407, + "nodeType": "ArrayTypeName", + "src": "26097:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5411, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5423, + "src": "26134:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5409, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26134:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5410, + "nodeType": "ArrayTypeName", + "src": "26134:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "26059:106:2" + }, + "returnParameters": { + "id": 5415, + "nodeType": "ParameterList", + "parameters": [], + "src": "26195:0:2" + }, + "scope": 5767, + "src": "26041:213:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5500, + "nodeType": "Block", + "src": "26647:684:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5436, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "26666:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5439, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26686:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "26678:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5437, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26678:7:2", + "typeDescriptions": {} + } + }, + "id": 5440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26678:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "26666:22:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 5442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26690:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 5435, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26658:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26658:54:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5444, + "nodeType": "ExpressionStatement", + "src": "26658:54:2" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5446, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "26821:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "26821:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 5448, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5432, + "src": "26841:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "26841:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26821:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4d49534d4154434845445f41525241595f4c454e47544853", + "id": 5451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26857:26:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + }, + "value": "MISMATCHED_ARRAY_LENGTHS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3fbe6a490df3b7db0fb1a57d6e1fdff049469e1fbdbebd21965303daf0836a7c", + "typeString": "literal_string \"MISMATCHED_ARRAY_LENGTHS\"" + } + ], + "id": 5445, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26813:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26813:71:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5453, + "nodeType": "ExpressionStatement", + "src": "26813:71:2" + }, + { + "body": { + "id": 5486, + "nodeType": "Block", + "src": "27035:128:2", + "statements": [ + { + "expression": { + "id": 5484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 5465, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "27050:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5470, + "indexExpression": { + "baseExpression": { + "id": 5466, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27059:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5468, + "indexExpression": { + "id": 5467, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27069:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27059:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27050:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5471, + "indexExpression": { + "id": 5469, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "27073:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "27050:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 5480, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5432, + "src": "27140:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5482, + "indexExpression": { + "id": 5481, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27148:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27140:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 5472, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4141, + "src": "27085:8:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(address => uint256))" + } + }, + "id": 5476, + "indexExpression": { + "baseExpression": { + "id": 5473, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27094:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5475, + "indexExpression": { + "id": 5474, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27104:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27094:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27085:22:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5478, + "indexExpression": { + "id": 5477, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "27108:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27085:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "27085:54:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27085:66:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27050:101:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5485, + "nodeType": "ExpressionStatement", + "src": "27050:101:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5458, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27008:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5459, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27012:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 5460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "27012:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27008:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5487, + "initializationExpression": { + "assignments": [ + 5455 + ], + "declarations": [ + { + "constant": false, + "id": 5455, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 5487, + "src": "26993:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5454, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26993:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5457, + "initialValue": { + "hexValue": "30", + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27005:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "26993:13:2" + }, + "loopExpression": { + "expression": { + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "27030:3:2", + "subExpression": { + "id": 5462, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "27030:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5464, + "nodeType": "ExpressionStatement", + "src": "27030:3:2" + }, + "nodeType": "ForStatement", + "src": "26988:175:2" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 5489, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "27208:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "27208:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5491, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "27233:8:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 5494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27264:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "27256:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5492, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27256:7:2", + "typeDescriptions": {} + } + }, + "id": 5495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27256:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 5496, + "name": "_tokenIds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5429, + "src": "27281:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "id": 5497, + "name": "_values", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5432, + "src": "27305:7:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "id": 5488, + "name": "TransferBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8815, + "src": "27180:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address,address,address,uint256[] memory,uint256[] memory)" + } + }, + "id": 5498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27180:143:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5499, + "nodeType": "EmitStatement", + "src": "27175:148:2" + } + ] + }, + "documentation": { + "id": 5424, + "nodeType": "StructuredDocumentation", + "src": "26262:244:2", + "text": " @notice Internal function to batch burn an amounts of tokens\n @dev ERC-1155\n @param _account Account which owns the token\n @param _tokenIds IDs of the tokens\n @param _values Amounts of the tokens" + }, + "id": 5501, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnBatch", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 5501, + "src": "26542:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26542:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5429, + "mutability": "mutable", + "name": "_tokenIds", + "nodeType": "VariableDeclaration", + "scope": 5501, + "src": "26569:26:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5427, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26569:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5428, + "nodeType": "ArrayTypeName", + "src": "26569:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5432, + "mutability": "mutable", + "name": "_values", + "nodeType": "VariableDeclaration", + "scope": 5501, + "src": "26606:24:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 5430, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "26606:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5431, + "nodeType": "ArrayTypeName", + "src": "26606:9:2", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "visibility": "internal" + } + ], + "src": "26531:106:2" + }, + "returnParameters": { + "id": 5434, + "nodeType": "ParameterList", + "parameters": [], + "src": "26647:0:2" + }, + "scope": 5767, + "src": "26512:819:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5513, + "nodeType": "Block", + "src": "27619:42:2", + "statements": [ + { + "expression": { + "id": 5511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5509, + "name": "metadataBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4161, + "src": "27630:12:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5510, + "name": "_newBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5504, + "src": "27645:8:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "27630:23:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5512, + "nodeType": "ExpressionStatement", + "src": "27630:23:2" + } + ] + }, + "documentation": { + "id": 5502, + "nodeType": "StructuredDocumentation", + "src": "27427:119:2", + "text": " @notice Setting the URL prefix for tokens metadata\n @param _newBase New prefix to be used" + }, + "functionSelector": "38b6db2e", + "id": 5514, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5507, + "modifierName": { + "id": 5506, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "27609:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27609:9:2" + } + ], + "name": "_setMetadataBase", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5505, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5504, + "mutability": "mutable", + "name": "_newBase", + "nodeType": "VariableDeclaration", + "scope": 5514, + "src": "27578:22:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5503, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27578:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "27577:24:2" + }, + "returnParameters": { + "id": 5508, + "nodeType": "ParameterList", + "parameters": [], + "src": "27619:0:2" + }, + "scope": 5767, + "src": "27552:109:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5526, + "nodeType": "Block", + "src": "27866:48:2", + "statements": [ + { + "expression": { + "id": 5524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5522, + "name": "metadata1155Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4163, + "src": "27877:17:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5523, + "name": "_newRoute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "27897:9:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "27877:29:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5525, + "nodeType": "ExpressionStatement", + "src": "27877:29:2" + } + ] + }, + "documentation": { + "id": 5515, + "nodeType": "StructuredDocumentation", + "src": "27669:126:2", + "text": " @notice Setting the URL route for ERC1155 tokens metadata\n @param _newRoute New route to be used" + }, + "functionSelector": "bb499440", + "id": 5527, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5520, + "modifierName": { + "id": 5519, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "27856:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27856:9:2" + } + ], + "name": "_set1155Route", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "_newRoute", + "nodeType": "VariableDeclaration", + "scope": 5527, + "src": "27824:23:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5516, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "27824:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "27823:25:2" + }, + "returnParameters": { + "id": 5521, + "nodeType": "ParameterList", + "parameters": [], + "src": "27866:0:2" + }, + "scope": 5767, + "src": "27801:113:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5539, + "nodeType": "Block", + "src": "28117:47:2", + "statements": [ + { + "expression": { + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5535, + "name": "metadata721Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4165, + "src": "28128:16:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5536, + "name": "_newRoute", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5530, + "src": "28147:9:2", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "28128:28:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 5538, + "nodeType": "ExpressionStatement", + "src": "28128:28:2" + } + ] + }, + "documentation": { + "id": 5528, + "nodeType": "StructuredDocumentation", + "src": "27922:125:2", + "text": " @notice Setting the URL route for ERC721 tokens metadata\n @param _newRoute New route to be used" + }, + "functionSelector": "7d64afde", + "id": 5540, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5533, + "modifierName": { + "id": 5532, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "28107:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "28107:9:2" + } + ], + "name": "_set721Route", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5530, + "mutability": "mutable", + "name": "_newRoute", + "nodeType": "VariableDeclaration", + "scope": 5540, + "src": "28075:23:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28075:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "28074:25:2" + }, + "returnParameters": { + "id": 5534, + "nodeType": "ParameterList", + "parameters": [], + "src": "28117:0:2" + }, + "scope": 5767, + "src": "28053:111:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 5560, + "nodeType": "Block", + "src": "28606:149:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 5552, + "name": "metadataBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4161, + "src": "28679:12:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "id": 5553, + "name": "metadata1155Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4163, + "src": "28693:17:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "arguments": [ + { + "id": 5555, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5543, + "src": "28722:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5554, + "name": "_uint2str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5736, + "src": "28712:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 5556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28712:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 5550, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "28662:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "28662:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28662:70:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "28637:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 5548, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28637:6:2", + "typeDescriptions": {} + } + }, + "id": 5558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28637:110:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 5547, + "id": 5559, + "nodeType": "Return", + "src": "28617:130:2" + } + ] + }, + "documentation": { + "id": 5541, + "nodeType": "StructuredDocumentation", + "src": "28172:359:2", + "text": " @notice A distinct Uniform Resource Identifier (URI) for a given token.\n @dev ERC-1155\n URIs are defined in RFC 3986. The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".\n @param _tokenId The ID of the token\n @return Full URI string for metadata of the _tokenId" + }, + "functionSelector": "0e89341c", + "id": 5561, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uri", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5543, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5561, + "src": "28550:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5542, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "28550:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "28549:18:2" + }, + "returnParameters": { + "id": 5547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5546, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5561, + "src": "28591:13:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5545, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28591:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "28590:15:2" + }, + "scope": 5767, + "src": "28537:218:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5569, + "nodeType": "Block", + "src": "28939:47:2", + "statements": [ + { + "expression": { + "hexValue": "426f736f6e20536d61727420566f7563686572", + "id": 5567, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28957:21:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e159fcbda7d26910aa4ad3595e63d436153de29c702fb8bd7431625d83ad332c", + "typeString": "literal_string \"Boson Smart Voucher\"" + }, + "value": "Boson Smart Voucher" + }, + "functionReturnParameters": 5566, + "id": 5568, + "nodeType": "Return", + "src": "28950:28:2" + } + ] + }, + "documentation": { + "id": 5562, + "nodeType": "StructuredDocumentation", + "src": "28763:110:2", + "text": " @notice A descriptive name for a collection of NFTs in this contract\n @dev ERC-721" + }, + "functionSelector": "06fdde03", + "id": 5570, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5563, + "nodeType": "ParameterList", + "parameters": [], + "src": "28892:2:2" + }, + "returnParameters": { + "id": 5566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5565, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 5570, + "src": "28918:19:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5564, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "28918:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "28917:21:2" + }, + "scope": 5767, + "src": "28879:107:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5578, + "nodeType": "Block", + "src": "29159:31:2", + "statements": [ + { + "expression": { + "hexValue": "425356", + "id": 5576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29177:5:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_461172c92cee5274f34826f70861578ee76ece078643ef285832ecdd4c053844", + "typeString": "literal_string \"BSV\"" + }, + "value": "BSV" + }, + "functionReturnParameters": 5575, + "id": 5577, + "nodeType": "Return", + "src": "29170:12:2" + } + ] + }, + "documentation": { + "id": 5571, + "nodeType": "StructuredDocumentation", + "src": "28994:95:2", + "text": " @notice An abbreviated name for NFTs in this contract\n @dev ERC-721" + }, + "functionSelector": "95d89b41", + "id": 5579, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5572, + "nodeType": "ParameterList", + "parameters": [], + "src": "29110:2:2" + }, + "returnParameters": { + "id": 5575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5574, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 5579, + "src": "29136:21:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5573, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29136:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "29135:23:2" + }, + "scope": 5767, + "src": "29095:95:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5611, + "nodeType": "Block", + "src": "29596:215:2", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 5595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 5588, + "name": "owners721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4149, + "src": "29615:9:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 5590, + "indexExpression": { + "id": 5589, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5582, + "src": "29625:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29615:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 5593, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29646:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 5592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29638:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29638:7:2", + "typeDescriptions": {} + } + }, + "id": 5594, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29638:10:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "29615:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f4944", + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29650:12:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b52f3514e43e374c92e7204127699761905777b31513f628693a3c35ef97334d", + "typeString": "literal_string \"INVALID_ID\"" + }, + "value": "INVALID_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b52f3514e43e374c92e7204127699761905777b31513f628693a3c35ef97334d", + "typeString": "literal_string \"INVALID_ID\"" + } + ], + "id": 5587, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29607:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29607:56:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5598, + "nodeType": "ExpressionStatement", + "src": "29607:56:2" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 5603, + "name": "metadataBase", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4161, + "src": "29736:12:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "id": 5604, + "name": "metadata721Route", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4165, + "src": "29750:16:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "arguments": [ + { + "id": 5606, + "name": "_tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5582, + "src": "29778:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5605, + "name": "_uint2str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5736, + "src": "29768:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 5607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29768:19:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 5601, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "29719:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "29719:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29719:69:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29694:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 5599, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29694:6:2", + "typeDescriptions": {} + } + }, + "id": 5609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29694:109:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 5586, + "id": 5610, + "nodeType": "Return", + "src": "29674:129:2" + } + ] + }, + "documentation": { + "id": 5580, + "nodeType": "StructuredDocumentation", + "src": "29198:318:2", + "text": " @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n @dev ERC-721\n Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC 3986. The URI may point to a JSON file that conforms to the \"ERC721 Metadata JSON Schema\".\n @param _tokenId ID of the token" + }, + "functionSelector": "c87b56dd", + "id": 5612, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5583, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5582, + "mutability": "mutable", + "name": "_tokenId", + "nodeType": "VariableDeclaration", + "scope": 5612, + "src": "29540:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5581, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29540:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29539:18:2" + }, + "returnParameters": { + "id": 5586, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5585, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5612, + "src": "29581:13:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5584, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "29581:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "29580:15:2" + }, + "scope": 5767, + "src": "29522:289:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5633, + "nodeType": "Block", + "src": "30208:135:2", + "statements": [ + { + "expression": { + "id": 5625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5623, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "30219:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5624, + "name": "_voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5615, + "src": "30242:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30219:44:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5626, + "nodeType": "ExpressionStatement", + "src": "30219:44:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5628, + "name": "_voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5615, + "src": "30301:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 5629, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "30324:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "30324:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5627, + "name": "LogVoucherKernelSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4171, + "src": "30281:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 5631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30281:54:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5632, + "nodeType": "EmitStatement", + "src": "30276:59:2" + } + ] + }, + "documentation": { + "id": 5613, + "nodeType": "StructuredDocumentation", + "src": "29893:156:2", + "text": " @notice Set the address of the VoucherKernel contract\n @param _voucherKernelAddress The address of the Voucher Kernel contract" + }, + "functionSelector": "d95be43a", + "id": 5634, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5618, + "modifierName": { + "id": 5617, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "30146:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30146:9:2" + }, + { + "arguments": [ + { + "id": 5620, + "name": "_voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5615, + "src": "30180:21:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 5621, + "modifierName": { + "id": 5619, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4227, + "src": "30165:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "30165:37:2" + } + ], + "name": "setVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5616, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5615, + "mutability": "mutable", + "name": "_voucherKernelAddress", + "nodeType": "VariableDeclaration", + "scope": 5634, + "src": "30088:29:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5614, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30088:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "30087:31:2" + }, + "returnParameters": { + "id": 5622, + "nodeType": "ParameterList", + "parameters": [], + "src": "30208:0:2" + }, + "scope": 5767, + "src": "30055:288:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5655, + "nodeType": "Block", + "src": "30614:109:2", + "statements": [ + { + "expression": { + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5645, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "30625:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5646, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "30642:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30625:32:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5648, + "nodeType": "ExpressionStatement", + "src": "30625:32:2" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5650, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "30687:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 5651, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "30704:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "30704:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 5649, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4177, + "src": "30673:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 5653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30673:42:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5654, + "nodeType": "EmitStatement", + "src": "30668:47:2" + } + ] + }, + "documentation": { + "id": 5635, + "nodeType": "StructuredDocumentation", + "src": "30351:122:2", + "text": " @notice Set the address of the cashier contract\n @param _cashierAddress The Cashier contract" + }, + "functionSelector": "c099a7c4", + "id": 5656, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 5640, + "modifierName": { + "id": 5639, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4189, + "src": "30558:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30558:9:2" + }, + { + "arguments": [ + { + "id": 5642, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5637, + "src": "30592:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 5643, + "modifierName": { + "id": 5641, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4227, + "src": "30577:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "30577:31:2" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5637, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 5656, + "src": "30506:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5636, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30506:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "30505:25:2" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [], + "src": "30614:0:2" + }, + "scope": 5767, + "src": "30479:244:2", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 5735, + "nodeType": "Block", + "src": "31077:416:2", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5664, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31092:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31098:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31092:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5670, + "nodeType": "IfStatement", + "src": "31088:50:2", + "trueBody": { + "id": 5669, + "nodeType": "Block", + "src": "31101:37:2", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 5667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31123:3:2", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "functionReturnParameters": 5663, + "id": 5668, + "nodeType": "Return", + "src": "31116:10:2" + } + ] + } + }, + { + "assignments": [ + 5672 + ], + "declarations": [ + { + "constant": false, + "id": 5672, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31148:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5671, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31148:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5674, + "initialValue": { + "id": 5673, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31160:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31148:14:2" + }, + { + "assignments": [ + 5676 + ], + "declarations": [ + { + "constant": false, + "id": 5676, + "mutability": "mutable", + "name": "len", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31173:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5675, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31173:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5677, + "nodeType": "VariableDeclarationStatement", + "src": "31173:11:2" + }, + { + "body": { + "id": 5688, + "nodeType": "Block", + "src": "31210:54:2", + "statements": [ + { + "expression": { + "id": 5682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "31225:5:2", + "subExpression": { + "id": 5681, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5676, + "src": "31225:3:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5683, + "nodeType": "ExpressionStatement", + "src": "31225:5:2" + }, + { + "expression": { + "id": 5686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5684, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5672, + "src": "31245:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 5685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31250:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "31245:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5687, + "nodeType": "ExpressionStatement", + "src": "31245:7:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5678, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5672, + "src": "31202:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31207:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31202:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5689, + "nodeType": "WhileStatement", + "src": "31195:69:2" + }, + { + "assignments": [ + 5691 + ], + "declarations": [ + { + "constant": false, + "id": 5691, + "mutability": "mutable", + "name": "bstr", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31274:17:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5690, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31274:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 5696, + "initialValue": { + "arguments": [ + { + "id": 5694, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5676, + "src": "31304:3:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5693, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "31294:9:2", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 5692, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "31298:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 5695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31294:14:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31274:34:2" + }, + { + "assignments": [ + 5698 + ], + "declarations": [ + { + "constant": false, + "id": 5698, + "mutability": "mutable", + "name": "k", + "nodeType": "VariableDeclaration", + "scope": 5735, + "src": "31319:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5697, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31319:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5702, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5699, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5676, + "src": "31331:3:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 5700, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31337:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "31331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31319:19:2" + }, + { + "body": { + "id": 5728, + "nodeType": "Block", + "src": "31365:91:2", + "statements": [ + { + "expression": { + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 5706, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5691, + "src": "31380:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5709, + "indexExpression": { + "id": 5708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "31385:3:2", + "subExpression": { + "id": 5707, + "name": "k", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "31385:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "31380:9:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3438", + "id": 5714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31405:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5715, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31411:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "3130", + "id": 5716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31416:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "31411:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5718, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "31410:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "31405:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31399:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 5712, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "31399:5:2", + "typeDescriptions": {} + } + }, + "id": 5720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31399:21:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 5711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31392:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 5710, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "31392:6:2", + "typeDescriptions": {} + } + }, + "id": 5721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31392:29:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "31380:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 5723, + "nodeType": "ExpressionStatement", + "src": "31380:41:2" + }, + { + "expression": { + "id": 5726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5724, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31436:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 5725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31442:2:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "31436:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5727, + "nodeType": "ExpressionStatement", + "src": "31436:8:2" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5703, + "name": "_i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5659, + "src": "31356:2:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 5704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31362:1:2", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31356:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5729, + "nodeType": "WhileStatement", + "src": "31349:107:2" + }, + { + "expression": { + "arguments": [ + { + "id": 5732, + "name": "bstr", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5691, + "src": "31480:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31473:6:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 5730, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "31473:6:2", + "typeDescriptions": {} + } + }, + "id": 5733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31473:12:2", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 5663, + "id": 5734, + "nodeType": "Return", + "src": "31466:19:2" + } + ] + }, + "documentation": { + "id": 5657, + "nodeType": "StructuredDocumentation", + "src": "30731:225:2", + "text": " @notice Convert UINT to string\n Thank you, Oraclize (aka Provable)!\n https://github.com/provable-things/ethereum-api/blob/master/provableAPI_0.5.sol\n @param _i uint parameter" + }, + "id": 5736, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_uint2str", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5659, + "mutability": "mutable", + "name": "_i", + "nodeType": "VariableDeclaration", + "scope": 5736, + "src": "30981:10:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30981:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30980:12:2" + }, + "returnParameters": { + "id": 5663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5662, + "mutability": "mutable", + "name": "_uintAsString", + "nodeType": "VariableDeclaration", + "scope": 5736, + "src": "31043:27:2", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 5661, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "31043:6:2", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "31042:29:2" + }, + "scope": 5767, + "src": "30962:531:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8943 + ], + "body": { + "id": 5745, + "nodeType": "Block", + "src": "31700:31:2", + "statements": [ + { + "expression": { + "id": 5743, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4131, + "src": "31718:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5742, + "id": 5744, + "nodeType": "Return", + "src": "31711:12:2" + } + ] + }, + "documentation": { + "id": 5737, + "nodeType": "StructuredDocumentation", + "src": "31501:88:2", + "text": " @notice Get the contract owner\n @return Address of the owner" + }, + "functionSelector": "893d20e8", + "id": 5746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOwner", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5739, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31659:8:2" + }, + "parameters": { + "id": 5738, + "nodeType": "ParameterList", + "parameters": [], + "src": "31612:2:2" + }, + "returnParameters": { + "id": 5742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5741, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5746, + "src": "31686:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5740, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31686:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "31685:9:2" + }, + "scope": 5767, + "src": "31595:136:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8949 + ], + "body": { + "id": 5755, + "nodeType": "Block", + "src": "31987:46:2", + "statements": [ + { + "expression": { + "id": 5753, + "name": "voucherKernelAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4133, + "src": "32005:20:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5752, + "id": 5754, + "nodeType": "Return", + "src": "31998:27:2" + } + ] + }, + "documentation": { + "id": 5747, + "nodeType": "StructuredDocumentation", + "src": "31739:122:2", + "text": " @notice Get the address of Voucher Kernel contract\n @return Address of Voucher Kernel contract" + }, + "functionSelector": "e3f5d2d5", + "id": 5756, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5749, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31946:8:2" + }, + "parameters": { + "id": 5748, + "nodeType": "ParameterList", + "parameters": [], + "src": "31899:2:2" + }, + "returnParameters": { + "id": 5752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5751, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5756, + "src": "31973:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5750, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31973:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "31972:9:2" + }, + "scope": 5767, + "src": "31867:166:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8955 + ], + "body": { + "id": 5765, + "nodeType": "Block", + "src": "32268:40:2", + "statements": [ + { + "expression": { + "id": 5763, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4135, + "src": "32286:14:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 5762, + "id": 5764, + "nodeType": "Return", + "src": "32279:21:2" + } + ] + }, + "documentation": { + "id": 5757, + "nodeType": "StructuredDocumentation", + "src": "32041:107:2", + "text": " @notice Get the address of Cashier contract\n @return Address of Cashier address" + }, + "functionSelector": "f9d93099", + "id": 5766, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 5759, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32227:8:2" + }, + "parameters": { + "id": 5758, + "nodeType": "ParameterList", + "parameters": [], + "src": "32180:2:2" + }, + "returnParameters": { + "id": 5762, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5761, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 5766, + "src": "32254:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32254:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "32253:9:2" + }, + "scope": 5767, + "src": "32154:154:2", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 5768, + "src": "679:31638:2" + } + ], + "src": "49:32270:2" + }, + "compiler": { + "name": "solc", + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0x94d4208cb05337821fef5da6205084b70818af988524d8a2609a53a1ac1033d1": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newVoucherKernel", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogVoucherKernelSet", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + "0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + "0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + } + }, + "links": {}, + "address": "0xC2A3E0789e34492c8fC1960F19dA54e0687a3123", + "transactionHash": "0x9639c299f5b86ae3688c9bcfcea6fb96def65657dc1bf90edbb9c139d1365c45" + }, + "5777": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + }, + "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event", + "signature": "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31" + }, + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0x94d4208cb05337821fef5da6205084b70818af988524d8a2609a53a1ac1033d1": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newVoucherKernel", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogVoucherKernelSet", + "type": "event", + "signature": "0x94d4208cb05337821fef5da6205084b70818af988524d8a2609a53a1ac1033d1" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + "0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event", + "signature": "0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb" + }, + "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event", + "signature": "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62" + }, + "0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event", + "signature": "0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event", + "signature": "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88" + } + }, + "links": {}, + "address": "0xC6fd7b3464Ffb6F3d9328aA77f836E698742B3ce", + "transactionHash": "0x7ffb9b3a2ca57fd01f5dec64d09befaa91ec7c599ed7c33fc2c0580d13db6093" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T13:30:32.936Z", + "devdoc": { + "kind": "dev", + "methods": { + "_set1155Route(string)": { + "params": { + "_newRoute": "New route to be used" + } + }, + "_set721Route(string)": { + "params": { + "_newRoute": "New route to be used" + } + }, + "_setMetadataBase(string)": { + "params": { + "_newBase": "New prefix to be used" + } + }, + "approve(address,uint256)": { + "details": "ERC-721", + "params": { + "_to": "address to be approved for the given token ID", + "_tokenId": "uint256 ID of the token to be approved" + } + }, + "balanceOf(address)": { + "details": "ERC-721", + "params": { + "_owner": "An address for whom to query the balance" + }, + "returns": { + "_0": "The number of NFTs owned by `_owner`, possibly zero" + } + }, + "balanceOf(address,uint256)": { + "details": "ERC-1155", + "params": { + "_account": "The address of the token holder", + "_tokenId": "ID of the token" + }, + "returns": { + "_0": "balance" + } + }, + "balanceOfBatch(address[],uint256[])": { + "details": "ERC-1155", + "params": { + "_accounts": "The addresses of the token holders", + "_tokenIds": "IDs of the tokens" + }, + "returns": { + "_0": "balances" + } + }, + "burn(address,uint256,uint256)": { + "details": "ERC-1155", + "params": { + "_account": "Account which owns the token", + "_tokenId": "ID of the token", + "_value": "Amount of the token" + } + }, + "burnBatch(address,uint256[],uint256[])": { + "details": "ERC-1155", + "params": { + "_account": "Account which owns the token", + "_tokenIds": "IDs of the tokens", + "_values": "Amounts of the tokens" + } + }, + "getApproved(uint256)": { + "details": "ERC-721", + "params": { + "_tokenId": "uint256 ID of the token to query the approval of" + }, + "returns": { + "_0": "address currently approved for the given token ID" + } + }, + "getCashierAddress()": { + "returns": { + "_0": "Address of Cashier address" + } + }, + "getOwner()": { + "returns": { + "_0": "Address of the owner" + } + }, + "getVoucherKernelAddress()": { + "returns": { + "_0": "Address of Voucher Kernel contract" + } + }, + "isApprovedForAll(address,address)": { + "details": "ERC-1155 & ERC-721", + "params": { + "_account": "token holder", + "_operator": "operator to check" + }, + "returns": { + "_0": "True if the operator is approved, false if not" + } + }, + "mint(address,uint256)": { + "details": "ERC-721", + "params": { + "to": "The address that will receive the minted tokens.", + "tokenId": "The token id to mint." + }, + "returns": { + "_0": "A boolean that indicates if the operation was successful." + } + }, + "mint(address,uint256,uint256,bytes)": { + "details": "ERC-1155", + "params": { + "_data": "Additional data forwarded to onERC1155BatchReceived if _to is a contract", + "_to": "owner of the minted token", + "_tokenId": "ID of the token to be minted", + "_value": "Amount of the token to be minted" + } + }, + "mintBatch(address,uint256[],uint256[],bytes)": { + "details": "ERC-1155", + "params": { + "_data": "Additional data forwarded to onERC1155BatchReceived if _to is a contract", + "_to": "The address that will own the minted token", + "_tokenIds": "IDs of the tokens to be minted", + "_values": "Amounts of the tokens to be minted" + } + }, + "name()": { + "details": "ERC-721" + }, + "ownerOf(uint256)": { + "details": "ERC-721", + "params": { + "_tokenId": "uint256 ID of the token to query the owner of" + }, + "returns": { + "_0": "address currently marked as the owner of the given token ID" + } + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "ERC-1155", + "params": { + "_data": "Additional data forwarded to onERC1155BatchReceived if _to is a contract", + "_from": "Source address", + "_to": "Destination address", + "_tokenIds": "array of token IDs", + "_values": "array of transfer amounts" + } + }, + "safeTransferFrom(address,address,uint256)": { + "details": "ERC-721", + "params": { + "_from": "current owner of the token", + "_to": "address to receive the ownership of the given token ID", + "_tokenId": "uint256 ID of the token to be transferred" + } + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "ERC-721", + "params": { + "_data": "bytes data to send along with a safe transfer check", + "_from": "current owner of the token", + "_to": "address to receive the ownership of the given token ID", + "_tokenId": "uint256 ID of the token to be transferred" + } + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "details": "ERC-1155", + "params": { + "_data": "Additional data forwarded to onERC1155Received if _to is a contract", + "_from": "Source address", + "_to": "Destination address", + "_tokenId": "ID of the token", + "_value": "Transfer amount" + } + }, + "setApprovalForAll(address,bool)": { + "details": "ERC-1155 & ERC-721", + "params": { + "_approve": "flag to set or unset", + "_operator": "to (un)approve" + } + }, + "setCashierAddress(address)": { + "params": { + "_cashierAddress": "The Cashier contract" + } + }, + "setVoucherKernelAddress(address)": { + "params": { + "_voucherKernelAddress": "The address of the Voucher Kernel contract" + } + }, + "symbol()": { + "details": "ERC-721" + }, + "tokenURI(uint256)": { + "details": "ERC-721 Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC 3986. The URI may point to a JSON file that conforms to the \"ERC721 Metadata JSON Schema\".", + "params": { + "_tokenId": "ID of the token" + } + }, + "transferFrom(address,address,uint256)": { + "details": "ERC-721", + "params": { + "_from": "current owner of the token", + "_to": "address to receive the ownership of the given token ID", + "_tokenId": "uint256 ID of the token to be transferred" + } + }, + "uri(uint256)": { + "details": "ERC-1155 URIs are defined in RFC 3986. The URI MUST point to a JSON file that conforms to the \"ERC-1155 Metadata URI JSON Schema\".", + "params": { + "_tokenId": "The ID of the token" + }, + "returns": { + "_0": "Full URI string for metadata of the _tokenId" + } + } + }, + "title": "Multi-token contract, implementing ERC-1155 and ERC-721 hybrid Inspired by: https://github.com/pixowl/sandbox-smart-contracts", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "_set1155Route(string)": { + "notice": "Setting the URL route for ERC1155 tokens metadata" + }, + "_set721Route(string)": { + "notice": "Setting the URL route for ERC721 tokens metadata" + }, + "_setMetadataBase(string)": { + "notice": "Setting the URL prefix for tokens metadata" + }, + "approve(address,uint256)": { + "notice": "Approves another address to transfer the given token ID The zero address indicates there is no approved address. There can only be one approved address per token at a given time. Can only be called by the token owner or an approved operator." + }, + "balanceOf(address)": { + "notice": "Count all NFTs assigned to an owner" + }, + "balanceOf(address,uint256)": { + "notice": "Get the balance of tokens of an account" + }, + "balanceOfBatch(address[],uint256[])": { + "notice": "Get the balance of account-token pairs." + }, + "burn(address,uint256,uint256)": { + "notice": "Burn an amount of tokens with the given ID" + }, + "burnBatch(address,uint256[],uint256[])": { + "notice": "Batch burn an amounts of tokens" + }, + "getApproved(uint256)": { + "notice": "Gets the approved address for a token ID, or zero if no address set Reverts if the token ID does not exist." + }, + "getCashierAddress()": { + "notice": "Get the address of Cashier contract" + }, + "getOwner()": { + "notice": "Get the contract owner" + }, + "getVoucherKernelAddress()": { + "notice": "Get the address of Voucher Kernel contract" + }, + "isApprovedForAll(address,address)": { + "notice": "Gets approval status of an operator for a given account." + }, + "mint(address,uint256)": { + "notice": "Function to mint tokens." + }, + "mint(address,uint256,uint256,bytes)": { + "notice": "Mint an amount of a desired token Currently no restrictions as to who is allowed to mint - so, it is public." + }, + "mintBatch(address,uint256[],uint256[],bytes)": { + "notice": "Batch minting of tokens Currently no restrictions as to who is allowed to mint - so, it is public." + }, + "name()": { + "notice": "A descriptive name for a collection of NFTs in this contract" + }, + "ownerOf(uint256)": { + "notice": "Gets the owner of the specified token ID." + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "notice": "Transfers amount of _tokenId from-to addresses with safety call. If _to is a smart contract, will call onERC1155BatchReceived" + }, + "safeTransferFrom(address,address,uint256)": { + "notice": "Safely transfers the ownership of a given token ID to another address If the target address is a contract, it must implement `onERC721Received`, which is called upon a safe transfer, and return the magic value `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise, the transfer is reverted. Requires the msg.sender to be the owner, approved, or operator" + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "notice": "Safely transfers the ownership of a given token ID to another address If the target address is a contract, it must implement `onERC721Received` Requires the msg.sender to be the owner, approved, or operator" + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "notice": "Transfers amount of _tokenId from-to addresses with safety call. If _to is a smart contract, will call onERC1155Received" + }, + "setApprovalForAll(address,bool)": { + "notice": "Approves or unapproves the operator. will revert if the caller attempts to approve itself as it is redundant" + }, + "setCashierAddress(address)": { + "notice": "Set the address of the cashier contract" + }, + "setVoucherKernelAddress(address)": { + "notice": "Set the address of the VoucherKernel contract" + }, + "supportsInterface(bytes4)": { + "notice": "Returns true if this contract implements the interface defined by _interfaceId_. This function call must use less than 30 000 gas. ATM not enforced." + }, + "symbol()": { + "notice": "An abbreviated name for NFTs in this contract" + }, + "tokenURI(uint256)": { + "notice": "A distinct Uniform Resource Identifier (URI) for a given asset." + }, + "transferFrom(address,address,uint256)": { + "notice": "Transfers the ownership of a given token ID to another address. Usage of this method is discouraged, use `safeTransferFrom` whenever possible. Requires the msg.sender to be the owner, approved, or operator." + }, + "uri(uint256)": { + "notice": "A distinct Uniform Resource Identifier (URI) for a given token." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/functions/abis/VoucherKernel.json b/external/keepers/src/abis/VoucherKernel.json similarity index 58% rename from functions/abis/VoucherKernel.json rename to external/keepers/src/abis/VoucherKernel.json index bec70e28..ce42ce3c 100644 --- a/functions/abis/VoucherKernel.json +++ b/external/keepers/src/abis/VoucherKernel.json @@ -12,6 +12,25 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -137,9 +156,9 @@ }, { "indexed": true, - "internalType": "string", - "name": "_assetTitle", - "type": "string" + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" }, { "indexed": true, @@ -182,6 +201,49 @@ "name": "LogVoucherComplain", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -234,79 +296,72 @@ "type": "event" }, { - "inputs": [], - "name": "MASK_NF_INDEX", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "_tokenIdSupply", "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MASK_TYPE", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "LogVoucherSetFaultCancel", + "type": "event" }, { - "inputs": [], - "name": "TYPE_NF_BIT", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "accountSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "Paused", + "type": "event" }, { - "inputs": [], - "name": "cancelFaultPeriod", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "Unpaused", + "type": "event" }, { "inputs": [], - "name": "cashierAddress", + "name": "owner", "outputs": [ { "internalType": "address", @@ -315,153 +370,96 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [], - "name": "complainPeriod", + "name": "paused", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "ordersPromise", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "promiseKeys", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "promises", - "outputs": [ - { - "internalType": "bytes32", - "name": "promiseId", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "assetTitle", - "type": "string" - }, { "internalType": "address", - "name": "seller", + "name": "_seller", "type": "address" }, { "internalType": "uint256", - "name": "validFrom", + "name": "_validFrom", "type": "uint256" }, { "internalType": "uint256", - "name": "validTo", + "name": "_validTo", "type": "uint256" }, { "internalType": "uint256", - "name": "price", + "name": "_price", "type": "uint256" }, { "internalType": "uint256", - "name": "depositSe", + "name": "_depositSe", "type": "uint256" }, { "internalType": "uint256", - "name": "depositBu", + "name": "_depositBu", "type": "uint256" }, { "internalType": "uint256", - "name": "idx", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "typeCounters", - "outputs": [ - { - "internalType": "uint256", - "name": "", + "name": "_quantity", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "typeId", + "name": "createTokenSupplyID", "outputs": [ { "internalType": "uint256", @@ -469,142 +467,108 @@ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_tokenIdSupply", "type": "uint256" - } - ], - "name": "voucherIssuers", - "outputs": [ + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, { "internalType": "address", - "name": "", + "name": "_tokenPrice", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenDeposits", "type": "address" } ], - "stateMutability": "view", + "name": "createPaymentMethod", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_tokenIdSupply", "type": "uint256" - } - ], - "name": "vouchersStatus", - "outputs": [ - { - "internalType": "uint8", - "name": "status", - "type": "uint8" }, { - "internalType": "bool", - "name": "isPaymentReleased", - "type": "bool" + "internalType": "address", + "name": "_issuer", + "type": "address" }, { - "internalType": "bool", - "name": "isDepositsReleased", - "type": "bool" + "internalType": "address", + "name": "_holder", + "type": "address" }, { - "internalType": "uint256", - "name": "complainPeriodStart", - "type": "uint256" + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" }, { "internalType": "uint256", - "name": "cancelFaultPeriodStart", + "name": "_correlationId", "type": "uint256" } ], - "stateMutability": "view", + "name": "fillOrder", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_seller", + "name": "_issuer", "type": "address" }, - { - "internalType": "string", - "name": "_assetTitle", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_validFrom", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_validTo", - "type": "uint256" - }, { "internalType": "uint256", - "name": "_price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_depositSe", + "name": "_tokenIdSupply", "type": "uint256" }, { "internalType": "uint256", - "name": "_depositBu", + "name": "_qty", "type": "uint256" } ], - "name": "createAssetPromise", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], + "name": "burnSupplyOnPause", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "_seller", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_promiseId", - "type": "bytes32" - }, { "internalType": "uint256", - "name": "_quantity", + "name": "_tokenIdVoucher", "type": "uint256" - } - ], - "name": "createOrder", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_msgSender", + "type": "address" } ], + "name": "redeem", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -612,28 +576,35 @@ "inputs": [ { "internalType": "uint256", - "name": "_tokenIdSupply", + "name": "_tokenIdVoucher", "type": "uint256" }, { "internalType": "address", - "name": "_issuer", - "type": "address" - }, - { - "internalType": "address", - "name": "_holder", + "name": "_msgSender", "type": "address" } ], - "name": "fillOrder", - "outputs": [ + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_tokenIdVoucher", "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" } ], + "name": "complain", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -643,9 +614,14 @@ "internalType": "uint256", "name": "_tokenIdVoucher", "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" } ], - "name": "redeem", + "name": "cancelOrFault", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -654,12 +630,23 @@ "inputs": [ { "internalType": "uint256", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "cancelOrFaultVoucherSet", + "outputs": [ + { + "internalType": "uint256", + "name": "", "type": "uint256" } ], - "name": "refund", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -671,7 +658,7 @@ "type": "uint256" } ], - "name": "complain", + "name": "setPaymentReleased", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -684,7 +671,7 @@ "type": "uint256" } ], - "name": "cancelOrFault", + "name": "setDepositsReleased", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -697,7 +684,7 @@ "type": "uint256" } ], - "name": "setPaymentReleased", + "name": "triggerExpiration", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -710,7 +697,7 @@ "type": "uint256" } ], - "name": "setDepositsReleased", + "name": "triggerFinalizeVoucher", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -719,11 +706,16 @@ "inputs": [ { "internalType": "uint256", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "type": "uint256" + }, + { + "internalType": "address", + "name": "_newSeller", + "type": "address" } ], - "name": "triggerExpiration", + "name": "setSupplyHolderOnTransfer", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -731,12 +723,12 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_tokenIdVoucher", - "type": "uint256" + "internalType": "address", + "name": "_bosonRouterAddress", + "type": "address" } ], - "name": "triggerFinalizeVoucher", + "name": "setBosonRouterAddress", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -797,7 +789,8 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ @@ -816,7 +809,8 @@ } ], "stateMutability": "pure", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ @@ -835,17 +829,23 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ + { + "internalType": "uint256", + "name": "_tokenSupplyId", + "type": "uint256" + }, { "internalType": "address", - "name": "_account", + "name": "_owner", "type": "address" } ], - "name": "getTotalSupply", + "name": "getRemQtyForSupply", "outputs": [ { "internalType": "uint256", @@ -854,18 +854,54 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ { - "internalType": "bytes32", - "name": "_promiseId", - "type": "bytes32" + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" } ], - "name": "getPromiseDepositSe", + "name": "getBuyerOrderCosts", "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", @@ -873,7 +909,8 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ @@ -883,8 +920,58 @@ "type": "uint256" } ], - "name": "getOrderCosts", + "name": "getSellerDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSupplyHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_promiseKey", + "type": "bytes32" + } + ], + "name": "getPromiseData", "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", @@ -902,7 +989,8 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ @@ -928,10 +1016,21 @@ "internalType": "bool", "name": "", "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ @@ -941,7 +1040,7 @@ "type": "uint256" } ], - "name": "getVoucherIssuer", + "name": "getVoucherHolder", "outputs": [ { "internalType": "address", @@ -950,17 +1049,18 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ { "internalType": "uint256", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "type": "uint256" } ], - "name": "getVoucherHolder", + "name": "getVoucherPriceToken", "outputs": [ { "internalType": "address", @@ -969,89 +1069,360 @@ } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true }, { "inputs": [ { "internalType": "uint256", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "type": "uint256" } ], - "name": "isInValidityPeriod", + "name": "getVoucherDepositToken", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", - "type": "function" + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPaymentMethod", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isInValidityPeriod", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isVoucherTransferable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getBosonRouterAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCashierAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + } + ], + "name": "getTokenNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTypeId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getComplainPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCancelFaultPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getPromiseIdFromSupplyId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTokensContractAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true } ], - "bytecode": "0x608060405234801561001057600080fd5b5060405162005629380380620056298339818101604052602081101561003557600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062093a80600d8190555062093a80600e819055505061553d80620000ec6000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c80638da5cb5b1161013b578063d40ffcf8116100b8578063ebba1b291161007c578063ebba1b2914610bcf578063ec29c17d14610bfd578063ede8089714610c62578063f3223bed14610c90578063f75951ce14610cae5761023d565b8063d40ffcf814610aad578063d887b4e714610adb578063d905af5514610b2b578063db006a7514610b49578063e598d69714610b775761023d565b8063ae083814116100ff578063ae08381414610844578063ae4606fe146108b0578063bc0d753d14610932578063c099a7c414610974578063cc2f84cb146109b85761023d565b80638da5cb5b146107145780638f940f631461074857806399c849b8146107665780639a0271e1146107a85780639be905a1146107ec5761023d565b80634f755c3e116101c9578063765e0fb81161018d578063765e0fb81461063a57806376942aed146106685780637ed06c441461068657806381dc8119146106a45780638990834b146106e65761023d565b80634f755c3e1461051057806365c303bc1461054457806368da10ae1461057257806375549516146105ca57806375a83102146105f85761023d565b8063278ecde111610210578063278ecde114610326578063284f092314610354578063325a7a84146103825780633a2b95b9146103d957806346d07cb5146104b85761023d565b8063037700461461024257806316ed9e0e146102845780631af2a6a8146102c657806321d6f3a714610308575b600080fd5b61026e6004803603602081101561025857600080fd5b8101908080359060200190929190505050610d06565b6040518082815260200191505060405180910390f35b6102b06004803603602081101561029a57600080fd5b8101908080359060200190929190505050610d26565b6040518082815260200191505060405180910390f35b6102f2600480360360208110156102dc57600080fd5b8101908080359060200190929190505050610d47565b6040518082815260200191505060405180910390f35b610310610d89565b6040518082815260200191505060405180910390f35b6103526004803603602081101561033c57600080fd5b8101908080359060200190929190505050610dbf565b005b6103806004803603602081101561036a57600080fd5b8101908080359060200190929190505050611066565b005b6103ae6004803603602081101561039857600080fd5b8101908080359060200190929190505050611ac3565b604051808460ff16815260200183151581526020018215158152602001935050505060405180910390f35b6104a2600480360360e08110156103ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561042c57600080fd5b82018360208201111561043e57600080fd5b8035906020019184600183028401116401000000008311171561046057600080fd5b90919293919293908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050611b41565b6040518082815260200191505060405180910390f35b6104e4600480360360208110156104ce57600080fd5b81019080803590602001909291905050506120cb565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610518612108565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105706004803603602081101561055a57600080fd5b810190808035906020019092919050505061212e565b005b6105b46004803603602081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061255a565b6040518082815260200191505060405180910390f35b6105f6600480360360208110156105e057600080fd5b81019080803590602001909291905050506125a3565b005b6106246004803603602081101561060e57600080fd5b8101908080359060200190929190505050612814565b6040518082815260200191505060405180910390f35b6106666004803603602081101561065057600080fd5b810190808035906020019092919050505061282c565b005b610670612f99565b6040518082815260200191505060405180910390f35b61068e612f9f565b6040518082815260200191505060405180910390f35b6106d0600480360360208110156106ba57600080fd5b8101908080359060200190929190505050612fd9565b6040518082815260200191505060405180910390f35b610712600480360360208110156106fc57600080fd5b8101908080359060200190929190505050612ffa565b005b61071c61311c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610750613142565b6040518082815260200191505060405180910390f35b6107926004803603602081101561077c57600080fd5b8101908080359060200190929190505050613148565b6040518082815260200191505060405180910390f35b6107d4600480360360208110156107be57600080fd5b8101908080359060200190929190505050613160565b60405180821515815260200191505060405180910390f35b6108186004803603602081101561080257600080fd5b81019080803590602001909291905050506133cf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61089a6004803603606081101561085a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613402565b6040518082815260200191505060405180910390f35b61091c600480360360608110156108c657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613894565b6040518082815260200191505060405180910390f35b61095e6004803603602081101561094857600080fd5b8101908080359060200190929190505050613a3c565b6040518082815260200191505060405180910390f35b6109b66004803603602081101561098a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613af3565b005b6109e4600480360360208110156109ce57600080fd5b8101908080359060200190929190505050613d08565b604051808a8152602001806020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187815260200186815260200185815260200184815260200183815260200182810382528a818151815260200191508051906020019080838360005b83811015610a6a578082015181840152602081019050610a4f565b50505050905090810190601f168015610a975780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b610ad960048036036020811015610ac357600080fd5b8101908080359060200190929190505050613e0e565b005b610b0760048036036020811015610af157600080fd5b81019080803590602001909291905050506140ea565b60405180848152602001838152602001828152602001935050505060405180910390f35b610b33614159565b6040518082815260200191505060405180910390f35b610b7560048036036020811015610b5f57600080fd5b810190808035906020019092919050505061417d565b005b610bb960048036036020811015610b8d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506145be565b6040518082815260200191505060405180910390f35b610bfb60048036036020811015610be557600080fd5b81019080803590602001909291905050506145d6565b005b610c2960048036036020811015610c1357600080fd5b8101908080359060200190929190505050614847565b604051808660ff168152602001851515815260200184151581526020018381526020018281526020019550505050505060405180910390f35b610c8e60048036036020811015610c7857600080fd5b81019080803590602001909291905050506148a4565b005b610c986149c6565b6040518082815260200191505060405180910390f35b610cda60048036036020811015610cc457600080fd5b81019080803590602001909291905050506149cc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060036000838152602001908152602001600020600601549050919050565b60048181548110610d3357fe5b906000526020600020016000915090505481565b600060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff16901b82169050919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff1681565b803373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e4857600080fd5b505afa158015610e5c573d6000803e3d6000fd5b505050506040513d6020811015610e7257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610f0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5600000000000000000000000000000000000081525060200191505060405180910390fd5b610f386007600084815260200190815260200160002060000160009054906101000a900460ff16614a82565b610faa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e4150504c494341424c455f5354415455530000000000000000000000000081525060200191505060405180910390fd5b610fb382613160565b50426007600084815260200190815260200160002060010181905550610ffd6007600084815260200190815260200160002060000160009054906101000a900460ff166005614a9f565b6007600084815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff826040518082815260200191505060405180910390a15050565b803373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156110ef57600080fd5b505afa158015611103573d6000803e3d6000fd5b505050506040513d602081101561111957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146111b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5600000000000000000000000000000000000081525060200191505060405180910390fd5b6111e16007600084815260200190815260200160002060000160009054906101000a900460ff166003614ab6565b15611254576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f414c52454144595f434f4d504c41494e4544000000000000000000000000000081525060200191505060405180910390fd5b6112826007600084815260200190815260200160002060000160009054906101000a900460ff166001614ab6565b156112f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f46494e414c495a454400000000000000000000000000000081525060200191505060405180910390fd5b6112fd615405565b6003600061130a85613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113c75780601f1061139c576101008083540402835291602001916113c7565b820191906000526020600020905b8154815290600101906020018083116113aa57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090506114906007600085815260200190815260200160002060000160009054906101000a900460ff16614ad2565b806114c357506114c26007600085815260200190815260200160002060000160009054906101000a900460ff16614af9565b5b156116d7576114f66007600085815260200190815260200160002060000160009054906101000a900460ff166002614ab6565b61159357600e54600d546007600086815260200190815260200160002060010154010142111561158e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b611624565b600d54600760008581526020019081526020016000206001015401421115611623576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b5b42600760008581526020019081526020016000206002018190555061166d6007600085815260200190815260200160002060000160009054906101000a900460ff166003614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455836040518082815260200191505060405180910390a1611abe565b6117036007600085815260200190815260200160002060000160009054906101000a900460ff16614b20565b156118f3576117366007600085815260200190815260200160002060000160009054906101000a900460ff166002614ab6565b6117c157600e54600d54826080015101014211156117bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b611840565b600d5481608001510142111561183f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b5b4260076000858152602001908152602001600020600201819055506118896007600085815260200190815260200160002060000160009054906101000a900460ff166003614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455836040518082815260200191505060405180910390a1611abd565b6119216007600085815260200190815260200160002060000160009054906101000a900460ff166002614ab6565b15611a4e57600d546007600085815260200190815260200160002060010154014211156119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b6119e46007600085815260200190815260200160002060000160009054906101000a900460ff166003614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455836040518082815260200191505060405180910390a1611abc565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e4150504c494341424c455f5354415455530000000000000000000000000081525060200191505060405180910390fd5b5b5b505050565b60008060006007600085815260200190815260200160002060000160009054906101000a900460ff166007600086815260200190815260200160002060000160019054906101000a900460ff166007600087815260200190815260200160002060000160029054906101000a900460ff169250925092509193909250565b60008073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b84861115611d40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f494e56414c49445f56414c49444954595f46524f4d000000000000000000000081525060200191505060405180910390fd5b42851015611db6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e56414c49445f56414c49444954595f544f0000000000000000000000000081525060200191505060405180910390fd5b600088888888604051602001808585808284378083019250505083815260200182815260200194505050505060405160208183030381529060405280519060200120905060006004805490501115611eac57806004600360008481526020019081526020016000206008015481548110611e2c57fe5b90600052602060002001541415611eab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f50524f4d4953455f414c52454144595f4558495354530000000000000000000081525060200191505060405180910390fd5b5b6040518061012001604052808281526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018b73ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187815260200186815260200185815260200184815260200160048054905081525060036000838152602001908152602001600020600082015181600001556020820151816001019080519060200190611f8492919061546a565b5060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155610100820151816008015590505060048190806001815401808255809150506001900390600052602060002001600090919091909150553373ffffffffffffffffffffffffffffffffffffffff1689896040518083838082843780830192505050925050506040518091039020827f3ba1c1cdec933f731add8eb7757d3fd2f4dcce6c60617a395377917f3328c4b38a8a60016004805490500360405180848152602001838152602001828152602001935050505060405180910390a48091505098975050505050505050565b60006008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008114156121a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b60006007600083815260200190815260200160002060000160009054906101000a900460ff1690506121d8816001614ab6565b1561224b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f46494e414c495a454400000000000000000000000000000081525060200191505060405180910390fd5b6000612255615405565b6003600061226286613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561231f5780601f106122f45761010080835404028352916020019161231f565b820191906000526020600020905b81548152906001019060200180831161230257829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090506123c7836003614ab6565b15612411576123d7836002614ab6565b156123e5576001915061240c565b600e54600760008681526020019081526020016000206001015401421061240b57600191505b5b6124bf565b61241c836002614ab6565b80156124425750600d546007600086815260200190815260200160002060010154014210155b1561245057600191506124be565b61245983614ad2565b80612469575061246883614af9565b5b1561249957600d54600760008681526020019081526020016000206001015401421061249457600191505b6124bd565b6124a283614b20565b156124bc57600d5481608001510142106124bb57600191505b5b5b5b5b8115612554576124d0836001614a9f565b6007600086815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa8433604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b50505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612668576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461272b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b60008114156127a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b60016007600083815260200190815260200160002060000160016101000a81548160ff0219169083151502179055507ff570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554816000604051808381526020018281526020019250505060405180910390a150565b60066020528060005260406000206000915090505481565b3373ffffffffffffffffffffffffffffffffffffffff1661284c826120cb565b73ffffffffffffffffffffffffffffffffffffffff16146128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f554e415554484f52495a45445f434f460000000000000000000000000000000081525060200191505060405180910390fd5b60006007600083815260200190815260200160002060000160009054906101000a900460ff169050612908816002614ab6565b1561297b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f414c52454144595f43414e43454c4641554c540000000000000000000000000081525060200191505060405180910390fd5b612986816001614ab6565b156129f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f46494e414c495a454400000000000000000000000000000081525060200191505060405180910390fd5b612a01615405565b60036000612a0e85613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612acb5780601f10612aa057610100808354040283529160200191612acb565b820191906000526020600020905b815481529060010190602001808311612aae57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050612b73826006614ab6565b80612b855750612b84826005614ab6565b5b15612ce357612b95826003614ab6565b612c4d57600e54600d5460076000868152602001908152602001600020600101540101421115612c2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b426007600085815260200190815260200160002060010181905550612cde565b600e54600760008581526020019081526020016000206002015401421115612cdd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b5b612f24565b612cee826004614ab6565b15612e1f57612cfe826003614ab6565b612d8957600e54600d5482608001510101421115612d84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b612e1a565b600e54600760008581526020019081526020016000206002015401421115612e19576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b5b612f23565b612e2882614a82565b15612eb457600e54600d5482608001510101421115612eaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b612f22565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e4150504c494341424c455f5354415455530000000000000000000000000081525060200191505060405180910390fd5b5b5b612f2f826002614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709836040518082815260200191505060405180910390a1505050565b600e5481565b60807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff16901b81565b600060048281548110612fe857fe5b90600052602060002001549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146130bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4f00000000000000000000000000000000000081525060200191505060405180910390fd5b80600d819055507f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca8133604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b600b6020528060005260406000206000915090505481565b600061316a615405565b6003600061317785613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156132345780601f1061320957610100808354040283529160200191613234565b820191906000526020600020905b81548152906001019060200180831161321757829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050428160600151111561334b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f494e56414c49445f56414c49444954595f46524f4d000000000000000000000081525060200191505060405180910390fd5b42816080015110156133c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e56414c49445f56414c49444954595f544f0000000000000000000000000081525060200191505060405180910390fd5b6001915050919050565b60086020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156134c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461358b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415613604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f50524f4d4953450000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166003600085815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f554e415554484f52495a45445f434f000000000000000000000000000000000081525060200191505060405180910390fd5b60008211613751576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f494e56414c49445f5155414e544954590000000000000000000000000000000081525060200191505060405180910390fd5b600061375d6001614b47565b905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663731133e98683866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200180602001828103825260008152602001602001945050505050600060405180830381600087803b15801561380c57600080fd5b505af1158015613820573d6000803e3d6000fd5b5050505083600660008381526020019081526020016000208190555082600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550809150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561395a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613a1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b613a28848484614ba0565b613a33838386614f28565b90509392505050565b600080821415613ab4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b6000613abf83610d47565b9050600360006006600084815260200190815260200160002054815260200190815260200160002060000154915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613bb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4f00000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f414444524553530000000000000000000000000081525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b888133604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6003602052806000526040600020600091509050806000015490806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613dba5780601f10613d8f57610100808354040283529160200191613dba565b820191906000526020600020905b815481529060010190602001808311613d9d57829003601f168201915b5050505050908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040154908060050154908060060154908060070154908060080154905089565b6000811415613e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b613e8d615405565b60036000613e9a84613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613f575780601f10613f2c57610100808354040283529160200191613f57565b820191906000526020600020905b815481529060010190602001808311613f3a57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201548152602001600882015481525050905042816080015110801561402f575061402e6007600084815260200190815260200160002060000160009054906101000a900460ff16614a82565b5b156140e6576140626007600084815260200190815260200160002060000160009054906101000a900460ff166004614a9f565b6007600084815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67408233604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5050565b60008060008060066000868152602001908152602001600020549050600360008281526020019081526020016000206005015460036000838152602001908152602001600020600601546003600084815260200190815260200160002060070154935093509350509193909250565b7f800000000000000000000000000000000000000000000000000000000000000081565b803373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561420657600080fd5b505afa15801561421a573d6000803e3d6000fd5b505050506040513d602081101561423057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146142ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5600000000000000000000000000000000000081525060200191505060405180910390fd5b6142f66007600084815260200190815260200160002060000160009054906101000a900460ff16614a82565b614368576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f50524f43455353454400000000000000000000000000000081525060200191505060405180910390fd5b61437182613160565b5061437a615405565b6003600061438785613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156144445780601f1061441957610100808354040283529160200191614444565b820191906000526020600020905b81548152906001019060200180831161442757829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201548152602001600882015481525050905042600760008581526020019081526020016000206001018190555061452a6007600085815260200190815260200160002060000160009054906101000a900460ff166006614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c83338360000151604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050565b60056020528060005260406000206000915090505481565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561469b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461475e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b60008114156147d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b60016007600083815260200190815260200160002060000160026101000a81548160ff0219169083151502179055507ff570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554816001604051808381526020018281526020019250505060405180910390a150565b60076020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16908060000160029054906101000a900460ff16908060010154908060020154905085565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4f00000000000000000000000000000000000081525060200191505060405180910390fd5b80600e819055507fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f128133604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015614a4057600080fd5b505afa158015614a54573d6000803e3d6000fd5b505050506040513d6020811015614a6a57600080fd5b81019080805190602001909291905050509050919050565b6000614a9060006007614a9f565b60ff168260ff16149050919050565b60008160ff16600160ff16901b8317905092915050565b60006001808360ff168560ff16901c1660ff1614905092915050565b6000614aea614ae360006007614a9f565b6006614a9f565b60ff168260ff16149050919050565b6000614b11614b0a60006007614a9f565b6005614a9f565b60ff168260ff16149050919050565b6000614b38614b3160006007614a9f565b6004614a9f565b60ff168260ff16149050919050565b6000600c600081548092919060010191905055508115614b91576080600c54901b7f8000000000000000000000000000000000000000000000000000000000000000179050614b9b565b6080600c54901b90505b919050565b6000831415614c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b614c368173ffffffffffffffffffffffffffffffffffffffff166153f2565b15614d41578073ffffffffffffffffffffffffffffffffffffffff166301ffc9a763150b7a026040518263ffffffff1660e01b8152600401808260e01b815260200191505060206040518083038186803b158015614c9357600080fd5b505afa158015614ca7573d6000803e3d6000fd5b505050506040513d6020811015614cbd57600080fd5b8101908080519060200190929190505050614d40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f554e535550504f525445445f4552433732315f5245434549564544000000000081525060200191505060405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614de4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f414444524553530000000000000000000000000081525060200191505060405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e84866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060206040518083038186803b158015614e7557600080fd5b505afa158015614e89573d6000803e3d6000fd5b505050506040513d6020811015614e9f57600080fd5b810190808051906020019092919050505011614f23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f464645525f454d50545900000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b6000614f498373ffffffffffffffffffffffffffffffffffffffff166153f2565b156150e65763150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168373ffffffffffffffffffffffffffffffffffffffff1663150b7a028633866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200180602001828103825260008152602001602001945050505050602060405180830381600087803b15801561501857600080fd5b505af115801561502c573d6000803e3d6000fd5b505050506040513d602081101561504257600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146150e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f554e535550504f525445445f4552433732315f5245434549564544000000000081525060200191505060405180910390fd5b5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f5298aca858460016040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561518057600080fd5b505af1158015615194573d6000803e3d6000fd5b50505050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001900391905055506000600b6000848152602001908152602001600020600081546001019190508190558317905061523c6007600083815260200190815260200160002060000160009054906101000a900460ff166007614a9f565b6007600083815260200190815260200160002060000160006101000a81548160ff021916908360ff16021790555060006007600083815260200190815260200160002060000160016101000a81548160ff02191690831515021790555060006007600083815260200190815260200160002060000160026101000a81548160ff02191690831515021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561535957600080fd5b505af115801561536d573d6000803e3d6000fd5b505050506040513d602081101561538357600080fd5b810190808051906020019092919050505050846008600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550809150509392505050565b600080823b905060008111915050919050565b6040518061012001604052806000801916815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106154ab57805160ff19168380011785556154d9565b828001600101855582156154d9579182015b828111156154d85782518255916020019190600101906154bd565b5b5090506154e691906154ea565b5090565b5b808211156155035760008160009055506001016154eb565b509056fea2646970667358221220333a07f03626704332ea349041ffdeb7f089c116e34388d780a0926189377a6b64736f6c634300060c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061023d5760003560e01c80638da5cb5b1161013b578063d40ffcf8116100b8578063ebba1b291161007c578063ebba1b2914610bcf578063ec29c17d14610bfd578063ede8089714610c62578063f3223bed14610c90578063f75951ce14610cae5761023d565b8063d40ffcf814610aad578063d887b4e714610adb578063d905af5514610b2b578063db006a7514610b49578063e598d69714610b775761023d565b8063ae083814116100ff578063ae08381414610844578063ae4606fe146108b0578063bc0d753d14610932578063c099a7c414610974578063cc2f84cb146109b85761023d565b80638da5cb5b146107145780638f940f631461074857806399c849b8146107665780639a0271e1146107a85780639be905a1146107ec5761023d565b80634f755c3e116101c9578063765e0fb81161018d578063765e0fb81461063a57806376942aed146106685780637ed06c441461068657806381dc8119146106a45780638990834b146106e65761023d565b80634f755c3e1461051057806365c303bc1461054457806368da10ae1461057257806375549516146105ca57806375a83102146105f85761023d565b8063278ecde111610210578063278ecde114610326578063284f092314610354578063325a7a84146103825780633a2b95b9146103d957806346d07cb5146104b85761023d565b8063037700461461024257806316ed9e0e146102845780631af2a6a8146102c657806321d6f3a714610308575b600080fd5b61026e6004803603602081101561025857600080fd5b8101908080359060200190929190505050610d06565b6040518082815260200191505060405180910390f35b6102b06004803603602081101561029a57600080fd5b8101908080359060200190929190505050610d26565b6040518082815260200191505060405180910390f35b6102f2600480360360208110156102dc57600080fd5b8101908080359060200190929190505050610d47565b6040518082815260200191505060405180910390f35b610310610d89565b6040518082815260200191505060405180910390f35b6103526004803603602081101561033c57600080fd5b8101908080359060200190929190505050610dbf565b005b6103806004803603602081101561036a57600080fd5b8101908080359060200190929190505050611066565b005b6103ae6004803603602081101561039857600080fd5b8101908080359060200190929190505050611ac3565b604051808460ff16815260200183151581526020018215158152602001935050505060405180910390f35b6104a2600480360360e08110156103ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561042c57600080fd5b82018360208201111561043e57600080fd5b8035906020019184600183028401116401000000008311171561046057600080fd5b90919293919293908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050611b41565b6040518082815260200191505060405180910390f35b6104e4600480360360208110156104ce57600080fd5b81019080803590602001909291905050506120cb565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610518612108565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105706004803603602081101561055a57600080fd5b810190808035906020019092919050505061212e565b005b6105b46004803603602081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061255a565b6040518082815260200191505060405180910390f35b6105f6600480360360208110156105e057600080fd5b81019080803590602001909291905050506125a3565b005b6106246004803603602081101561060e57600080fd5b8101908080359060200190929190505050612814565b6040518082815260200191505060405180910390f35b6106666004803603602081101561065057600080fd5b810190808035906020019092919050505061282c565b005b610670612f99565b6040518082815260200191505060405180910390f35b61068e612f9f565b6040518082815260200191505060405180910390f35b6106d0600480360360208110156106ba57600080fd5b8101908080359060200190929190505050612fd9565b6040518082815260200191505060405180910390f35b610712600480360360208110156106fc57600080fd5b8101908080359060200190929190505050612ffa565b005b61071c61311c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610750613142565b6040518082815260200191505060405180910390f35b6107926004803603602081101561077c57600080fd5b8101908080359060200190929190505050613148565b6040518082815260200191505060405180910390f35b6107d4600480360360208110156107be57600080fd5b8101908080359060200190929190505050613160565b60405180821515815260200191505060405180910390f35b6108186004803603602081101561080257600080fd5b81019080803590602001909291905050506133cf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61089a6004803603606081101561085a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050613402565b6040518082815260200191505060405180910390f35b61091c600480360360608110156108c657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613894565b6040518082815260200191505060405180910390f35b61095e6004803603602081101561094857600080fd5b8101908080359060200190929190505050613a3c565b6040518082815260200191505060405180910390f35b6109b66004803603602081101561098a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613af3565b005b6109e4600480360360208110156109ce57600080fd5b8101908080359060200190929190505050613d08565b604051808a8152602001806020018973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187815260200186815260200185815260200184815260200183815260200182810382528a818151815260200191508051906020019080838360005b83811015610a6a578082015181840152602081019050610a4f565b50505050905090810190601f168015610a975780820380516001836020036101000a031916815260200191505b509a505050505050505050505060405180910390f35b610ad960048036036020811015610ac357600080fd5b8101908080359060200190929190505050613e0e565b005b610b0760048036036020811015610af157600080fd5b81019080803590602001909291905050506140ea565b60405180848152602001838152602001828152602001935050505060405180910390f35b610b33614159565b6040518082815260200191505060405180910390f35b610b7560048036036020811015610b5f57600080fd5b810190808035906020019092919050505061417d565b005b610bb960048036036020811015610b8d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506145be565b6040518082815260200191505060405180910390f35b610bfb60048036036020811015610be557600080fd5b81019080803590602001909291905050506145d6565b005b610c2960048036036020811015610c1357600080fd5b8101908080359060200190929190505050614847565b604051808660ff168152602001851515815260200184151581526020018381526020018281526020019550505050505060405180910390f35b610c8e60048036036020811015610c7857600080fd5b81019080803590602001909291905050506148a4565b005b610c986149c6565b6040518082815260200191505060405180910390f35b610cda60048036036020811015610cc457600080fd5b81019080803590602001909291905050506149cc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060036000838152602001908152602001600020600601549050919050565b60048181548110610d3357fe5b906000526020600020016000915090505481565b600060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff16901b82169050919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff1681565b803373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e4857600080fd5b505afa158015610e5c573d6000803e3d6000fd5b505050506040513d6020811015610e7257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610f0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5600000000000000000000000000000000000081525060200191505060405180910390fd5b610f386007600084815260200190815260200160002060000160009054906101000a900460ff16614a82565b610faa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e4150504c494341424c455f5354415455530000000000000000000000000081525060200191505060405180910390fd5b610fb382613160565b50426007600084815260200190815260200160002060010181905550610ffd6007600084815260200190815260200160002060000160009054906101000a900460ff166005614a9f565b6007600084815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff826040518082815260200191505060405180910390a15050565b803373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156110ef57600080fd5b505afa158015611103573d6000803e3d6000fd5b505050506040513d602081101561111957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146111b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5600000000000000000000000000000000000081525060200191505060405180910390fd5b6111e16007600084815260200190815260200160002060000160009054906101000a900460ff166003614ab6565b15611254576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f414c52454144595f434f4d504c41494e4544000000000000000000000000000081525060200191505060405180910390fd5b6112826007600084815260200190815260200160002060000160009054906101000a900460ff166001614ab6565b156112f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f46494e414c495a454400000000000000000000000000000081525060200191505060405180910390fd5b6112fd615405565b6003600061130a85613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113c75780601f1061139c576101008083540402835291602001916113c7565b820191906000526020600020905b8154815290600101906020018083116113aa57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090506114906007600085815260200190815260200160002060000160009054906101000a900460ff16614ad2565b806114c357506114c26007600085815260200190815260200160002060000160009054906101000a900460ff16614af9565b5b156116d7576114f66007600085815260200190815260200160002060000160009054906101000a900460ff166002614ab6565b61159357600e54600d546007600086815260200190815260200160002060010154010142111561158e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b611624565b600d54600760008581526020019081526020016000206001015401421115611623576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b5b42600760008581526020019081526020016000206002018190555061166d6007600085815260200190815260200160002060000160009054906101000a900460ff166003614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455836040518082815260200191505060405180910390a1611abe565b6117036007600085815260200190815260200160002060000160009054906101000a900460ff16614b20565b156118f3576117366007600085815260200190815260200160002060000160009054906101000a900460ff166002614ab6565b6117c157600e54600d54826080015101014211156117bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b611840565b600d5481608001510142111561183f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b5b4260076000858152602001908152602001600020600201819055506118896007600085815260200190815260200160002060000160009054906101000a900460ff166003614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455836040518082815260200191505060405180910390a1611abd565b6119216007600085815260200190815260200160002060000160009054906101000a900460ff166002614ab6565b15611a4e57600d546007600085815260200190815260200160002060010154014211156119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f434f4d504c41494e504552494f445f455850495245440000000000000000000081525060200191505060405180910390fd5b6119e46007600085815260200190815260200160002060000160009054906101000a900460ff166003614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455836040518082815260200191505060405180910390a1611abc565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e4150504c494341424c455f5354415455530000000000000000000000000081525060200191505060405180910390fd5b5b5b505050565b60008060006007600085815260200190815260200160002060000160009054906101000a900460ff166007600086815260200190815260200160002060000160019054906101000a900460ff166007600087815260200190815260200160002060000160029054906101000a900460ff169250925092509193909250565b60008073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b84861115611d40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f494e56414c49445f56414c49444954595f46524f4d000000000000000000000081525060200191505060405180910390fd5b42851015611db6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e56414c49445f56414c49444954595f544f0000000000000000000000000081525060200191505060405180910390fd5b600088888888604051602001808585808284378083019250505083815260200182815260200194505050505060405160208183030381529060405280519060200120905060006004805490501115611eac57806004600360008481526020019081526020016000206008015481548110611e2c57fe5b90600052602060002001541415611eab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f50524f4d4953455f414c52454144595f4558495354530000000000000000000081525060200191505060405180910390fd5b5b6040518061012001604052808281526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505081526020018b73ffffffffffffffffffffffffffffffffffffffff16815260200188815260200187815260200186815260200185815260200184815260200160048054905081525060036000838152602001908152602001600020600082015181600001556020820151816001019080519060200190611f8492919061546a565b5060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155610100820151816008015590505060048190806001815401808255809150506001900390600052602060002001600090919091909150553373ffffffffffffffffffffffffffffffffffffffff1689896040518083838082843780830192505050925050506040518091039020827f3ba1c1cdec933f731add8eb7757d3fd2f4dcce6c60617a395377917f3328c4b38a8a60016004805490500360405180848152602001838152602001828152602001935050505060405180910390a48091505098975050505050505050565b60006008600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008114156121a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b60006007600083815260200190815260200160002060000160009054906101000a900460ff1690506121d8816001614ab6565b1561224b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f46494e414c495a454400000000000000000000000000000081525060200191505060405180910390fd5b6000612255615405565b6003600061226286613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561231f5780601f106122f45761010080835404028352916020019161231f565b820191906000526020600020905b81548152906001019060200180831161230257829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090506123c7836003614ab6565b15612411576123d7836002614ab6565b156123e5576001915061240c565b600e54600760008681526020019081526020016000206001015401421061240b57600191505b5b6124bf565b61241c836002614ab6565b80156124425750600d546007600086815260200190815260200160002060010154014210155b1561245057600191506124be565b61245983614ad2565b80612469575061246883614af9565b5b1561249957600d54600760008681526020019081526020016000206001015401421061249457600191505b6124bd565b6124a283614b20565b156124bc57600d5481608001510142106124bb57600191505b5b5b5b5b8115612554576124d0836001614a9f565b6007600086815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa8433604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b50505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612668576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461272b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b60008114156127a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b60016007600083815260200190815260200160002060000160016101000a81548160ff0219169083151502179055507ff570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554816000604051808381526020018281526020019250505060405180910390a150565b60066020528060005260406000206000915090505481565b3373ffffffffffffffffffffffffffffffffffffffff1661284c826120cb565b73ffffffffffffffffffffffffffffffffffffffff16146128d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f554e415554484f52495a45445f434f460000000000000000000000000000000081525060200191505060405180910390fd5b60006007600083815260200190815260200160002060000160009054906101000a900460ff169050612908816002614ab6565b1561297b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f414c52454144595f43414e43454c4641554c540000000000000000000000000081525060200191505060405180910390fd5b612986816001614ab6565b156129f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f46494e414c495a454400000000000000000000000000000081525060200191505060405180910390fd5b612a01615405565b60036000612a0e85613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612acb5780601f10612aa057610100808354040283529160200191612acb565b820191906000526020600020905b815481529060010190602001808311612aae57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050612b73826006614ab6565b80612b855750612b84826005614ab6565b5b15612ce357612b95826003614ab6565b612c4d57600e54600d5460076000868152602001908152602001600020600101540101421115612c2d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b426007600085815260200190815260200160002060010181905550612cde565b600e54600760008581526020019081526020016000206002015401421115612cdd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b5b612f24565b612cee826004614ab6565b15612e1f57612cfe826003614ab6565b612d8957600e54600d5482608001510101421115612d84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b612e1a565b600e54600760008581526020019081526020016000206002015401421115612e19576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b5b612f23565b612e2882614a82565b15612eb457600e54600d5482608001510101421115612eaf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f434f46504552494f445f4558504952454400000000000000000000000000000081525060200191505060405180910390fd5b612f22565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e4150504c494341424c455f5354415455530000000000000000000000000081525060200191505060405180910390fd5b5b5b612f2f826002614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709836040518082815260200191505060405180910390a1505050565b600e5481565b60807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff16901b81565b600060048281548110612fe857fe5b90600052602060002001549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146130bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4f00000000000000000000000000000000000081525060200191505060405180910390fd5b80600d819055507f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca8133604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b600b6020528060005260406000206000915090505481565b600061316a615405565b6003600061317785613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156132345780601f1061320957610100808354040283529160200191613234565b820191906000526020600020905b81548152906001019060200180831161321757829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050428160600151111561334b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f494e56414c49445f56414c49444954595f46524f4d000000000000000000000081525060200191505060405180910390fd5b42816080015110156133c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f494e56414c49445f56414c49444954595f544f0000000000000000000000000081525060200191505060405180910390fd5b6001915050919050565b60086020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156134c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461358b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b6000801b831415613604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f50524f4d4953450000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166003600085815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f554e415554484f52495a45445f434f000000000000000000000000000000000081525060200191505060405180910390fd5b60008211613751576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f494e56414c49445f5155414e544954590000000000000000000000000000000081525060200191505060405180910390fd5b600061375d6001614b47565b905060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663731133e98683866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200180602001828103825260008152602001602001945050505050600060405180830381600087803b15801561380c57600080fd5b505af1158015613820573d6000803e3d6000fd5b5050505083600660008381526020019081526020016000208190555082600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550809150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561395a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613a1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b613a28848484614ba0565b613a33838386614f28565b90509392505050565b600080821415613ab4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b6000613abf83610d47565b9050600360006006600084815260200190815260200160002054815260200190815260200160002060000154915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613bb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4f00000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f414444524553530000000000000000000000000081525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b888133604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6003602052806000526040600020600091509050806000015490806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613dba5780601f10613d8f57610100808354040283529160200191613dba565b820191906000526020600020905b815481529060010190602001808311613d9d57829003601f168201915b5050505050908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040154908060050154908060060154908060070154908060080154905089565b6000811415613e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b613e8d615405565b60036000613e9a84613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613f575780601f10613f2c57610100808354040283529160200191613f57565b820191906000526020600020905b815481529060010190602001808311613f3a57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201548152602001600882015481525050905042816080015110801561402f575061402e6007600084815260200190815260200160002060000160009054906101000a900460ff16614a82565b5b156140e6576140626007600084815260200190815260200160002060000160009054906101000a900460ff166004614a9f565b6007600084815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67408233604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5050565b60008060008060066000868152602001908152602001600020549050600360008281526020019081526020016000206005015460036000838152602001908152602001600020600601546003600084815260200190815260200160002060070154935093509350509193909250565b7f800000000000000000000000000000000000000000000000000000000000000081565b803373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561420657600080fd5b505afa15801561421a573d6000803e3d6000fd5b505050506040513d602081101561423057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16146142ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5600000000000000000000000000000000000081525060200191505060405180910390fd5b6142f66007600084815260200190815260200160002060000160009054906101000a900460ff16614a82565b614368576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f414c52454144595f50524f43455353454400000000000000000000000000000081525060200191505060405180910390fd5b61437182613160565b5061437a615405565b6003600061438785613a3c565b81526020019081526020016000206040518061012001604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156144445780601f1061441957610100808354040283529160200191614444565b820191906000526020600020905b81548152906001019060200180831161442757829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201548152602001600882015481525050905042600760008581526020019081526020016000206001018190555061452a6007600085815260200190815260200160002060000160009054906101000a900460ff166006614a9f565b6007600085815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055507f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c83338360000151604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050565b60056020528060005260406000206000915090505481565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561469b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f434153484945520000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461475e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4300000000000000000000000000000000000081525060200191505060405180910390fd5b60008114156147d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b60016007600083815260200190815260200160002060000160026101000a81548160ff0219169083151502179055507ff570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554816001604051808381526020018281526020019250505060405180910390a150565b60076020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16908060000160029054906101000a900460ff16908060010154908060020154905085565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f4f00000000000000000000000000000000000081525060200191505060405180910390fd5b80600e819055507fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f128133604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015614a4057600080fd5b505afa158015614a54573d6000803e3d6000fd5b505050506040513d6020811015614a6a57600080fd5b81019080805190602001909291905050509050919050565b6000614a9060006007614a9f565b60ff168260ff16149050919050565b60008160ff16600160ff16901b8317905092915050565b60006001808360ff168560ff16901c1660ff1614905092915050565b6000614aea614ae360006007614a9f565b6006614a9f565b60ff168260ff16149050919050565b6000614b11614b0a60006007614a9f565b6005614a9f565b60ff168260ff16149050919050565b6000614b38614b3160006007614a9f565b6004614a9f565b60ff168260ff16149050919050565b6000600c600081548092919060010191905055508115614b91576080600c54901b7f8000000000000000000000000000000000000000000000000000000000000000179050614b9b565b6080600c54901b90505b919050565b6000831415614c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b614c368173ffffffffffffffffffffffffffffffffffffffff166153f2565b15614d41578073ffffffffffffffffffffffffffffffffffffffff166301ffc9a763150b7a026040518263ffffffff1660e01b8152600401808260e01b815260200191505060206040518083038186803b158015614c9357600080fd5b505afa158015614ca7573d6000803e3d6000fd5b505050506040513d6020811015614cbd57600080fd5b8101908080519060200190929190505050614d40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f554e535550504f525445445f4552433732315f5245434549564544000000000081525060200191505060405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614de4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f414444524553530000000000000000000000000081525060200191505060405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e84866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060206040518083038186803b158015614e7557600080fd5b505afa158015614e89573d6000803e3d6000fd5b505050506040513d6020811015614e9f57600080fd5b810190808051906020019092919050505011614f23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f464645525f454d50545900000000000000000000000000000000000000000081525060200191505060405180910390fd5b505050565b6000614f498373ffffffffffffffffffffffffffffffffffffffff166153f2565b156150e65763150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168373ffffffffffffffffffffffffffffffffffffffff1663150b7a028633866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200180602001828103825260008152602001602001945050505050602060405180830381600087803b15801561501857600080fd5b505af115801561502c573d6000803e3d6000fd5b505050506040513d602081101561504257600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146150e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f554e535550504f525445445f4552433732315f5245434549564544000000000081525060200191505060405180910390fd5b5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f5298aca858460016040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561518057600080fd5b505af1158015615194573d6000803e3d6000fd5b50505050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001900391905055506000600b6000848152602001908152602001600020600081546001019190508190558317905061523c6007600083815260200190815260200160002060000160009054906101000a900460ff166007614a9f565b6007600083815260200190815260200160002060000160006101000a81548160ff021916908360ff16021790555060006007600083815260200190815260200160002060000160016101000a81548160ff02191690831515021790555060006007600083815260200190815260200160002060000160026101000a81548160ff02191690831515021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561535957600080fd5b505af115801561536d573d6000803e3d6000fd5b505050506040513d602081101561538357600080fd5b810190808051906020019092919050505050846008600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550809150509392505050565b600080823b905060008111915050919050565b6040518061012001604052806000801916815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106154ab57805160ff19168380011785556154d9565b828001600101855582156154d9579182015b828111156154d85782518255916020019190600101906154bd565b5b5090506154e691906154ea565b5090565b5b808211156155035760008160009055506001016154eb565b509056fea2646970667358221220333a07f03626704332ea349041ffdeb7f089c116e34388d780a0926189377a6b64736f6c634300060c0033", - "sourceMap": "790:33854:8:-:0;;;7091:420;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7214:10;7206:5;;:18;;;;;;;;;;;;;;;;;;7265:15;7234:14;;:47;;;;;;;;;;;;;;;;;;7454:10;7437:14;:27;;;;7494:10;7474:17;:30;;;;7091:420;790:33854;;;;;;", - "deployedSourceMap": "790:33854:8:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32142:155;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2114:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;30865:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3248:51;;;:::i;:::-;;;;;;;;;;;;;;;;;;;17148:751;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;18026:3312;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;33031:278;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8045:1728;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;33493:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1943:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;26538:2138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;31822:139;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;24568:379;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2207:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21523:2794;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4753:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2877:63;;;:::i;:::-;;;;;;;;;;;;;;;;;;;30535:128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;29553:217;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1890:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3982:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2768:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;34038:595;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2423:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;10167:924;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;11432:318;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;31215:412;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;28911:377;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2022:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25662:691;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;32537:291;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3623:46;;;:::i;:::-;;;;;;;;;;;;;;;;;;;15553:1396;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2153:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;25096:381;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2324:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30048:235;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4670:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;33833:164;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;32142:155;32228:7;32259:8;:20;32268:10;32259:20;;;;;;;;;;;:30;;;32251:39;;32142:155;;;:::o;2114:28::-;;;;;;;;;;;;;;;;;;;;;;;;;:::o;30865:158::-;30959:7;2937:3;2929:2;2913:20;;:27;;30989:15;:27;30982:34;;30865:158;;;:::o;3248:51::-;3296:2;3248:51;;;:::o;17148:751::-;17231:15;6948:10;6905:53;;:14;;;;;;;;;;:22;;;6928:15;6905:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:53;;;6897:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17270:56:::1;17287:14;:31;17302:15;17287:31;;;;;;;;;;;:38;;;;;;;;;;;;17270:16;:56::i;:::-;17262:88;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;17500:35;17519:15;17500:18;:35::i;:::-;;17707:15;17653:14;:31;17668:15;17653:31;;;;;;;;;;;:51;;:69;;;;17773:60;17783:14;:31;17798:15;17783:31;;;;;;;;;;;:38;;;;;;;;;;;;340:1:9;17773:9:8;:60::i;:::-;17732:14;:31;17747:15;17732:31;;;;;;;;;;;:38;;;:101;;;;;;;;;;;;;;;;;;17857:35;17876:15;17857:35;;;;;;;;;;;;;;;;;;17148:751:::0;;:::o;18026:3312::-;18111:15;6948:10;6905:53;;:14;;;;;;;;;;:22;;;6928:15;6905:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:53;;;6897:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18151:61:::1;18160:14;:31;18175:15;18160:31;;;;;;;;;;;:38;;;;;;;;;;;;428:1:9;18151:8:8;:61::i;:::-;18150:62;18142:93;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;18336:58;18345:14;:31;18360:15;18345:31;;;;;;;;;;;:38;;;;;;;;;;;;518:1:9;18336:8:8;:58::i;:::-;18335:59;18327:89;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;18565:23;;:::i;:::-;18591:8;:52;18600:42;18626:15;18600:25;:42::i;:::-;18591:52;;;;;;;;;;;18565:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;18701:63;18725:14;:31;18740:15;18725:31;;;;;;;;;;;:38;;;;;;;;;;;;18701:23;:63::i;:::-;:142;;;;18788:55;18804:14;:31;18819:15;18804:31;;;;;;;;;;;:38;;;;;;;;;;;;18788:15;:55::i;:::-;18701:142;18697:2626;;;18864:64;18873:14;:31;18888:15;18873:31;;;;;;;;;;;:38;;;;;;;;;;;;476:1:9;18864:8:8;:64::i;:::-;18859:563;;19046:17;;19029:14;;18975;:31;18990:15;18975:31;;;;;;;;;;;:51;;;:68;:88;18956:15;:107;;18948:142;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;18859:563;;;19288:14;;19234;:31;19249:15;19234:31;;;;;;;;;;;:51;;;:68;19215:15;:87;;19207:122;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;18859:563;19505:15;19448:14;:31;19463:15;19448:31;;;;;;;;;;;:54;;:72;;;;19575:62;19585:14;:31;19600:15;19585:31;;;;;;;;;;;:38;;;;;;;;;;;;428:1:9;19575:9:8;:62::i;:::-;19534:14;:31;19549:15;19534:31;;;;;;;;;;;:38;;;:103;;;;;;;;;;;;;;;;;;19669:35;19688:15;19669:35;;;;;;;;;;;;;;;;;;18697:2626;;;19759:54;19774:14;:31;19789:15;19774:31;;;;;;;;;;;:38;;;;;;;;;;;;19759:14;:54::i;:::-;19755:1568;;;19834:64;19843:14;:31;19858:15;19843:31;;;;;;;;;;;:38;;;;;;;;;;;;476:1:9;19834:8:8;:64::i;:::-;19829:493;;19981:17;;19964:14;;19945:8;:16;;;:33;:53;19926:15;:72;;19918:107;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;19829:493;;;20188:14;;20169:8;:16;;;:33;20150:15;:52;;20142:87;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;19829:493;20405:15;20348:14;:31;20363:15;20348:31;;;;;;;;;;;:54;;:72;;;;20475:62;20485:14;:31;20500:15;20485:31;;;;;;;;;;;:38;;;;;;;;;;;;428:1:9;20475:9:8;:62::i;:::-;20434:14;:31;20449:15;20434:31;;;;;;;;;;;:38;;;:103;;;;;;;;;;;;;;;;;;20569:35;20588:15;20569:35;;;;;;;;;;;;;;;;;;19755:1568;;;20661:64;20670:14;:31;20685:15;20670:31;;;;;;;;;;;:38;;;;;;;;;;;;476:1:9;20661:8:8;:64::i;:::-;20657:666;;;20822:14;;20768;:31;20783:15;20768:31;;;;;;;;;;;:51;;;:68;20749:15;:87;;20741:122;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;21011:62;21021:14;:31;21036:15;21021:31;;;;;;;;;;;:38;;;;;;;;;;;;428:1:9;21011:9:8;:62::i;:::-;20970:14;:31;20985:15;20970:31;;;;;;;;;;;:38;;;:103;;;;;;;;;;;;;;;;;;21105:35;21124:15;21105:35;;;;;;;;;;;;;;;;;;20657:666;;;21184:29;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;20657:666;19755:1568;18697:2626;7073:1;18026:3312:::0;;:::o;33031:278::-;33119:5;33126:4;33132;33160:14;:31;33175:15;33160:31;;;;;;;;;;;:38;;;;;;;;;;;;33200:14;:31;33215:15;33200:31;;;;;;;;;;;:49;;;;;;;;;;;;33251:14;:31;33266:15;33251:31;;;;;;;;;;;:50;;;;;;;;;;;;33152:150;;;;;;33031:278;;;;;:::o;8045:1728::-;8436:7;6510:1;6484:28;;:14;;;;;;;;;;;:28;;;;6476:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6659:14;;;;;;;;;;;6645:28;;:10;:28;;;6637:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8490:8:::1;8476:10;:22;;8468:56;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;8640:15;8628:8;:27;;8620:59;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;8783:11;8837;;8850:10;8862:8;8820:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8810:62;;;;;;8804:68;;8916:1;8895:11;:18;;;;:22;8891:125;;;8975:3;8941:11;8953:8;:13;8962:3;8953:13;;;;;;;;;;;:17;;;8941:30;;;;;;;;;;;;;;;;:37;;8933:72;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;8891:125;9050:442;;;;;;;;9083:3;9050:442;;;;9112:11;;9050:442;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9145:7;9050:442;;;;;;9206:10;9050:442;;;;9239:8;9050:442;;;;9268:6;9050:442;;;;9299:10;9050:442;;;;9334:10;9050:442;;;;9463:11;:18;;;;9050:442;;::::0;9034:8:::1;:13;9043:3;9034:13;;;;;;;;;;;:458;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9511:11;9528:3;9511:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9592:10;9556:181;;9579:11;;9556:181;;;;;;;;;;;;;;;;;;;;;;;;;;;9574:3;9556:181;9604:10;9616:8;9735:1;9714:11;:18;;;;:22;9556:181;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9763:3;9756:10;;;8045:1728:::0;;;;;;;;;;:::o;33493:156::-;33581:7;33611:14;:31;33626:15;33611:31;;;;;;;;;;;;;;;;;;;;;33604:38;;33493:156;;;:::o;1943:29::-;;;;;;;;;;;;;:::o;26538:2138::-;26653:1;26634:15;:20;;26626:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26783:13;26799:14;:31;26814:15;26799:31;;;;;;;;;;;:38;;;;;;;;;;;;26783:54;;26865:27;26874:7;518:1:9;26865:8:8;:27::i;:::-;26864:28;26856:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27024:9;27043:23;;:::i;:::-;27069:8;:52;27078:42;27104:15;27078:25;:42::i;:::-;27069:52;;;;;;;;;;;27043:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27144:30;27153:7;428:1:9;27144:8:8;:30::i;:::-;27140:1319;;;27194:33;27203:7;476:1:9;27194:8:8;:33::i;:::-;27190:354;;;27303:4;27296:11;;27190:354;;;27422:17;;27368:14;:31;27383:15;27368:31;;;;;;;;;;;:51;;;:71;27349:15;:90;27345:199;;27525:4;27518:11;;27345:199;27190:354;27140:1319;;;27577:33;27586:7;476:1:9;27577:8:8;:33::i;:::-;:144;;;;;27707:14;;27653;:31;27668:15;27653:31;;;;;;;;;;;:51;;;:68;27634:15;:87;;27577:144;27573:886;;;27820:4;27813:11;;27573:886;;;27858:32;27882:7;27858:23;:32::i;:::-;:80;;;;27914:24;27930:7;27914:15;:24::i;:::-;27858:80;27854:605;;;28125:14;;28071;:31;28086:15;28071:31;;;;;;;;;;;:51;;;:68;28052:15;:87;28048:137;;28166:4;28159:11;;28048:137;27854:605;;;28218:23;28233:7;28218:14;:23::i;:::-;28214:245;;;28376:14;;28357:8;:16;;;:33;28338:15;:52;28334:102;;28417:4;28410:11;;28334:102;28214:245;27854:605;27573:886;27140:1319;28481:4;28477:182;;;28542:28;28552:7;518:1:9;28542:9:8;:28::i;:::-;28501:14;:31;28516:15;28501:31;;;;;;;;;;;:38;;;:69;;;;;;;;;;;;;;;;;;28589:47;28608:15;28625:10;28589:47;;;;;;;;;;;;;;;;;;;;;;;;;;28477:182;26538:2138;;;;:::o;31822:139::-;31901:7;31931:13;:23;31945:8;31931:23;;;;;;;;;;;;;;;;31924:30;;31822:139;;;:::o;24568:379::-;6510:1;6484:28;;:14;;;;;;;;;;;:28;;;;6476:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6659:14;;;;;;;;;;;6645:28;;:10;:28;;;6637:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24703:1:::1;24684:15;:20;;24676:47;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;24876:4;24824:14;:31;24839:15;24824:31;;;;;;;;;;;:49;;;:56;;;;;;;;;;;;;;;;;;24904:36;24921:15;24938:1;24904:36;;;;;;;;;;;;;;;;;;;;;;;;24568:379:::0;:::o;2207:48::-;;;;;;;;;;;;;;;;;:::o;21523:2794::-;21647:10;21610:47;;:33;21627:15;21610:16;:33::i;:::-;:47;;;21602:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21782:13;21798:14;:31;21813:15;21798:31;;;;;;;;;;;:38;;;;;;;;;;;;21782:54;;21864:33;21873:7;476:1:9;21864:8:8;:33::i;:::-;21863:34;21855:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22022:27;22031:7;518:1:9;22022:8:8;:27::i;:::-;22021:28;22013:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22172:23;;:::i;:::-;22198:8;:52;22207:42;22233:15;22207:25;:42::i;:::-;22198:52;;;;;;;;;;;22172:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22273:28;22282:7;297:1:9;22273:8:8;:28::i;:::-;:60;;;;22305:28;22314:7;340:1:9;22305:8:8;:28::i;:::-;22273:60;22269:1881;;;22393:30;22402:7;428:1:9;22393:8:8;:30::i;:::-;22388:670;;22541:17;;22524:14;;22470;:31;22485:15;22470:31;;;;;;;;;;;:51;;;:68;:88;22451:15;:107;;22443:137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22742:15;22688:14;:31;22703:15;22688:31;;;;;;;;;;;:51;;:69;;;;22388:670;;;22914:17;;22857:14;:31;22872:15;22857:31;;;;;;;;;;;:54;;;:74;22838:15;:93;;22830:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22388:670;22269:1881;;;23091:28;23100:7;383:1:9;23091:8:8;:28::i;:::-;23087:1063;;;23165:30;23174:7;428:1:9;23165:8:8;:30::i;:::-;23160:514;;23278:17;;23261:14;;23242:8;:16;;;:33;:53;23223:15;:72;;23215:102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23160:514;;;23530:17;;23473:14;:31;23488:15;23473:31;;;;;;;;;;;:54;;;:74;23454:15;:93;;23446:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23160:514;23087:1063;;;23707:25;23724:7;23707:16;:25::i;:::-;23703:447;;;23843:17;;23826:14;;23807:8;:16;;;:33;:53;23788:15;:72;;23780:102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23703:447;;;24011:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23703:447;23087:1063;22269:1881;24205:34;24215:7;476:1:9;24205:9:8;:34::i;:::-;24164:14;:31;24179:15;24164:31;;;;;;;;;;;:38;;;:75;;;;;;;;;;;;;;;;;;24263:38;24285:15;24263:38;;;;;;;;;;;;;;;;;;21523:2794;;;:::o;4753:32::-;;;;:::o;2877:63::-;2937:3;2929:2;2913:20;;:27;;2877:63;:::o;30535:128::-;30609:7;30639:11;30651:4;30639:17;;;;;;;;;;;;;;;;30632:24;;30535:128;;;:::o;29553:217::-;6301:5;;;;;;;;;;;6287:19;;:10;:19;;;6279:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29671:15:::1;29654:14;:32;;;;29710:53;29735:15;29752:10;29710:53;;;;;;;;;;;;;;;;;;;;;;;;;;29553:217:::0;:::o;1890:20::-;;;;;;;;;;;;;:::o;3982:21::-;;;;:::o;2768:48::-;;;;;;;;;;;;;;;;;:::o;34038:595::-;34128:4;34181:23;;:::i;:::-;34207:8;:52;34216:42;34242:15;34216:25;:42::i;:::-;34207:52;;;;;;;;;;;34181:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34299:15;34277:8;:18;;;:37;;34269:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34461:15;34441:8;:16;;;:35;;34433:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34621:4;34614:11;;;34038:595;;;:::o;2423:49::-;;;;;;;;;;;;;;;;;;;;;;:::o;10167:924::-;10303:7;6510:1;6484:28;;:14;;;;;;;;;;;:28;;;;6476:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6659:14;;;;;;;;;;;6645:28;;:10;:28;;;6637:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10356:1:::1;10348:10:::0;::::1;10334;:24;;10326:56;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;10523:7;10492:38;;:8;:20;10501:10;10492:20;;;;;;;;;;;:27;;;;;;;;;;;;:38;;;10484:66;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;10667:1;10655:9;:13;10647:42;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;10791:21;10815:23;10833:4;10815:17;:23::i;:::-;10791:47;;10890:14;::::0;::::1;;;;;;;;:19;;;10910:7;10919:13;10934:9;10890:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;10998:10;10967:13;:28;10981:13;10967:28;;;;;;;;;;;:41;;;;11044:9;11018:13;:22;11032:7;11018:22;;;;;;;;;;;;;;;;:35;;;;;;;;;;;11071:13;11064:20;;;10167:924:::0;;;;;:::o;11432:318::-;11567:7;6510:1;6484:28;;:14;;;;;;;;;;;:28;;;;6476:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6659:14;;;;;;;;;;;6645:28;;:10;:28;;;6637:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11607:52:::1;11626:14;11642:7;11651;11607:18;:52::i;:::-;11699:44;11710:7;11719;11728:14;11699:10;:44::i;:::-;11692:51;;11432:318:::0;;;;;:::o;31215:412::-;31312:7;31362:1;31343:15;:20;;31335:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31492:21;31516:39;31539:15;31516:22;:39::i;:::-;31492:63;;31572:8;:38;31581:13;:28;31595:13;31581:28;;;;;;;;;;;;31572:38;;;;;;;;;;;:48;;;31565:55;;;31215:412;;;:::o;28911:377::-;6301:5;;;;;;;;;;;6287:19;;:10;:19;;;6279:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29047:1:::1;29020:29;;:15;:29;;;;29012:61;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;29200:15;29183:14;;:32;;;;;;;;;;;;;;;;;;29239:42;29253:15;29270:10;29239:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;28911:377:::0;:::o;2022:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;25662:691::-;25772:1;25753:15;:20;;25745:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25902:23;;:::i;:::-;25928:8;:52;25937:42;25963:15;25937:25;:42::i;:::-;25928:52;;;;;;;;;;;25902:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26022:15;26003:8;:16;;;:34;:106;;;;;26053:56;26070:14;:31;26085:15;26070:31;;;;;;;;;;;:38;;;;;;;;;;;;26053:16;:56::i;:::-;26003:106;25999:346;;;26183:60;26193:14;:31;26208:15;26193:31;;;;;;;;;;;:38;;;;;;;;;;;;383:1:9;26183:9:8;:60::i;:::-;26142:14;:31;26157:15;26142:31;;;;;;;;;;;:38;;;:101;;;;;;;;;;;;;;;;;;26283:51;26306:15;26323:10;26283:51;;;;;;;;;;;;;;;;;;;;;;;;;;25999:346;25662:691;;:::o;32537:291::-;32621:7;32630;32639;32662:18;32683:13;:29;32697:14;32683:29;;;;;;;;;;;;32662:50;;32730:8;:20;32739:10;32730:20;;;;;;;;;;;:26;;;32758:8;:20;32767:10;32758:20;;;;;;;;;;;:30;;;32790:8;:20;32799:10;32790:20;;;;;;;;;;;:30;;;32722:99;;;;;;;32537:291;;;;;:::o;3623:46::-;3661:8;3623:46;:::o;15553:1396::-;15636:15;6948:10;6905:53;;:14;;;;;;;;;;:22;;;6928:15;6905:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:53;;;6897:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15913:56:::1;15930:14;:31;15945:15;15930:31;;;;;;;;;;;:38;;;;;;;;;;;;15913:16;:56::i;:::-;15905:86;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;16124:35;16143:15;16124:18;:35::i;:::-;;16169:23;;:::i;:::-;16195:8;:52;16204:42;16230:15;16204:25;:42::i;:::-;16195:52;;;;;;;;;;;16169:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;16725:15;16671:14;:31;16686:15;16671:31;;;;;;;;;;;:51;;:69;;;;16791:60;16801:14;:31;16816:15;16801:31;;;;;;;;;;;:38;;;;;;;;;;;;297:1:9;16791:9:8;:60::i;:::-;16750:14;:31;16765:15;16750:31;;;;;;;;;;;:38;;;:101;;;;;;;;;;;;;;;;;;16875:67;16894:15;16911:10;16923:8;:18;;;16875:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7073:1;15553:1396:::0;;:::o;2153:48::-;;;;;;;;;;;;;;;;;:::o;25096:381::-;6510:1;6484:28;;:14;;;;;;;;;;;:28;;;;6476:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6659:14;;;;;;;;;;;6645:28;;:10;:28;;;6637:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25232:1:::1;25213:15;:20;;25205:47;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;25406:4;25353:14;:31;25368:15;25353:31;;;;;;;;;;;:50;;;:57;;;;;;;;;;;;;;;;;;25434:36;25451:15;25468:1;25434:36;;;;;;;;;;;;;;;;;;;;;;;;25096:381:::0;:::o;2324:55::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;30048:235::-;6301:5;;;;;;;;;;;6287:19;;:10;:19;;;6279:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30175:18:::1;30155:17;:38;;;;30217:59;30245:18;30265:10;30217:59;;;;;;;;;;;;;;;;;;;;;;;;;;30048:235:::0;:::o;4670:29::-;;;;:::o;33833:164::-;33921:7;33951:14;;;;;;;;;;;:22;;;33974:15;33951:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33944:46;;33833:164;;;:::o;899:148:9:-;979:4;1017:23;1027:1;254;1017:9;:23::i;:::-;1006:34;;:7;:34;;;999:41;;899:148;;;:::o;1790:156::-;1883:5;1929:10;1922:17;;211:1;1922:17;;;;1912:7;:27;1905:34;;1790:156;;;;:::o;1631:144::-;1715:4;1767:1;211;1753:4;1742:15;;:7;:15;;;;:21;:26;;;1735:33;;1631:144;;;;:::o;1062:177::-;1149:4;1187:45;1197:23;1207:1;254;1197:9;:23::i;:::-;297:1;1187:9;:45::i;:::-;1176:56;;:7;:56;;;1169:63;;1062:177;;;:::o;1258:169::-;1337:4;1375:45;1385:23;1395:1;254;1385:9;:23::i;:::-;340:1;1375:9;:45::i;:::-;1364:56;;:7;:56;;;1357:63;;1258:169;;;:::o;1442:168::-;1520:4;1558:45;1568:23;1578:1;254;1568:9;:23::i;:::-;383:1;1558:9;:45::i;:::-;1547:56;;:7;:56;;;1540:63;;1442:168;;;:::o;14846:576:8:-;14928:18;14962:6;;:8;;;;;;;;;;;;;14993:14;14989:284;;;15060:3;15050:6;;:13;;3661:8;15036:27;15023:40;;14989:284;;;15185:3;15175:6;;:13;;15162:26;;14989:284;14846:576;;;:::o;12048:866::-;12204:1;12186:14;:19;;12178:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12329:20;:7;:18;;;:20::i;:::-;12325:233;;;12381:7;12373:34;;;12408:10;12373:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12365:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12325:233;12611:1;12592:21;;:7;:21;;;;12584:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12798:1;12746:14;;;;;;;;;;;:24;;;12771:7;12780:14;12746:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:53;12738:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12048:866;;;:::o;13360:1208::-;13468:7;13495:16;:3;:14;;;:16::i;:::-;13491:391;;;13621:50;;;13535:136;;;13555:3;13535:41;;;13577:7;13586:10;13598:14;13535:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:136;;;;13527:176;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13491:391;13893:14;;;;;;;;;;:19;;;13913:7;13922:14;13938:1;13893:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13950:13;:22;13964:7;13950:22;;;;;;;;;;;;;;;;:24;;;;;;;;;;;;;;14030:22;14074:12;:28;14087:14;14074:28;;;;;;;;;;;;14072:30;;;;;;;;;;14055:14;:47;14030:72;;14182:59;14192:14;:30;14207:14;14192:30;;;;;;;;;;;:37;;;;;;;;;;;;254:1:9;14182:9:8;:59::i;:::-;14142:14;:30;14157:14;14142:30;;;;;;;;;;;:37;;;:99;;;;;;;;;;;;;;;;;;14302:5;14251:14;:30;14266:14;14251:30;;;;;;;;;;;:48;;;:56;;;;;;;;;;;;;;;;;;14369:5;14317:14;:30;14332:14;14317:30;;;;;;;;;;;:49;;;:57;;;;;;;;;;;;;;;;;;14431:14;;;;;;;;;;:19;;;14451:3;14456:14;14431:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14514:7;14481:14;:30;14496:14;14481:30;;;;;;;;;;;;:40;;;;;;;;;;;;;;;;;;14547:14;14540:21;;;13360:1208;;;;;:::o;718:413:11:-;778:4;981:12;1090:7;1078:20;1070:28;;1123:1;1116:4;:8;1109:15;;;718:413;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\n\npragma solidity >=0.6.2 <0.7.0;\n\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"./ERC1155ERC721.sol\";\nimport \"./usingHelpers.sol\";\n\n//preparing for ERC-1066, ERC-1444, EIP-838\n\n/**\n * @title VoucherKernel contract is controlling the core business logic\n * @dev Notes: \n * - Since this is a demo app, it is not yet optimized. \n * In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n * - The usage of block.timestamp is honored since vouchers are defined with day-precision and the demo app is not covering all edge cases.\n * See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\n*/\ncontract VoucherKernel is usingHelpers { \n using Address for address;\n //using Counters for Counters.Counter;\n //Counters.Counter private voucherTokenId; //unique IDs for voucher tokens\n \n //AssetRegistry assetRegistry;\n ERC1155ERC721 tokensContract;\n \n //promise for an asset could be reusable, but simplified here for brevitbytes32\n struct Promise {\n bytes32 promiseId;\n string assetTitle; //the asset that is offered\n address seller; //the seller who created the promise \n \n //we simplify the value for the demoapp, otherwise voucher details would be packed in one bytes32 field value\n //bytes32 value; //plays a role at redemption\n uint256 validFrom;\n uint256 validTo;\n uint256 price;\n uint256 depositSe;\n uint256 depositBu;\n\n //uint complainPeriod; //complain period in no. of days (one day is 86400 seconds)\n //uint cancelFaultPeriod; //cancel or fault tx period in no. of days (one day is 86400 seconds)\n uint idx;\n }\n \n address public owner; //contract owner\n address public cashierAddress; //address of the Cashier contract \n \n mapping(bytes32 => Promise) public promises; //promises to deliver goods or services\n bytes32[] public promiseKeys;\n \n mapping(address => uint256) public accountSupply;\n mapping(uint256 => bytes32) public ordersPromise; //mapping between an order (supply token) and a promise\n \n mapping(uint256 => VoucherStatus) public vouchersStatus; //recording the vouchers evolution\n mapping(uint256 => address) public voucherIssuers; //issuers of vouchers\n \n //standard reqs\n mapping (uint256 => mapping(address => uint256)) private balances; //balance of token ids of an account\n mapping (address => mapping(address => bool)) private operatorApprovals; //approval of accounts of an operator\n \n //ID reqs\n mapping (uint256 => uint256) public typeCounters; //counter for ID of a particular type of NFT\n uint256 public constant MASK_TYPE = uint256(uint128(~0)) << 128; //the type mask in the upper 128 bits\n//1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\n\n uint256 public constant MASK_NF_INDEX = uint128(~0); //the non-fungible index mask in the lower 128\n//0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \n \n uint256 public constant TYPE_NF_BIT = 1 << 255; //the first bit represents an NFT type\n//1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \n \n uint256 public typeId; //base token type ... 127-bits cover 1.701411835*10^38 types (not differentiating between FTs and NFTs)\n /* Token IDs:\n Fungibles: 0, followed by 127-bit FT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\n <0>\n \n Non-fungible supply tokens: 1, followed by 127-bit NFT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\n <1>\n */\n \n uint256 public complainPeriod; //for demo purposes, this is fixed/set by owner\n uint256 public cancelFaultPeriod; //for demo purposes, this is fixed/set by owner\n \n \n event LogPromiseCreated(\n bytes32 indexed _promiseId,\n string indexed _assetTitle,\n address indexed _seller,\n uint256 _validFrom,\n uint256 _validTo,\n //uint256 _price,\n //uint256 _depositSe,\n //uint256 _depositBu,\n //uint256 _complainPeriod,\n //uint256 _cancelFaultPeriod,\n uint256 _idx\n );\n \n event LogVoucherRedeemed(\n uint256 _tokenIdVoucher,\n address _holder,\n bytes32 _promiseId\n );\n \n event LogVoucherRefunded(\n uint256 _tokenIdVoucher\n );\n \n event LogVoucherComplain(\n uint256 _tokenIdVoucher\n );\n \n event LogVoucherFaultCancel(\n uint256 _tokenIdVoucher\n );\n \n event LogExpirationTriggered(\n uint256 _tokenIdVoucher,\n address _triggeredBy\n );\n \n event LogFinalizeVoucher(\n uint256 _tokenIdVoucher,\n address _triggeredBy\n );\n \n event LogCashierSet(\n address _newCashier,\n address _triggeredBy\n );\n \n event LogComplainPeriodChanged(\n uint256 _newComplainPeriod,\n address _triggeredBy\n );\n \n event LogCancelFaultPeriodChanged(\n uint256 _newCancelFaultPeriod,\n address _triggeredBy\n ); \n \n event LogFundsReleased(\n uint256 _tokenIdVoucher,\n uint8 _type //0 .. payment, 1 .. deposits\n );\n\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"UNAUTHORIZED_O\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n _;\n }\n \n modifier onlyFromCashier() {\n require(cashierAddress != address(0), \"UNSPECIFIED_CASHIER\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n require(msg.sender == cashierAddress, \"UNAUTHORIZED_C\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n _;\n }\n \n modifier onlyVoucherOwner(uint256 _tokenIdVoucher) {\n //check authorization\n require(tokensContract.ownerOf(_tokenIdVoucher) == msg.sender, \"UNAUTHORIZED_V\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n _;\n }\n \n constructor(\n //address _assetRegistry,\n address _tokensContract\n )\n public \n {\n owner = msg.sender;\n tokensContract = ERC1155ERC721(_tokensContract);\n \n //AssetRegistry is currently not used to simplify the process.\n //assetRegistry = AssetRegistry(_assetRegistry);\n \n complainPeriod = 7 * 1 days;\n cancelFaultPeriod = 7 * 1 days;\n }\n \n \n /**\n * @notice Creating a new promise for goods or services.\n * Can be reused, e.g. for making different batches of these (but not in prototype).\n * @param _seller seller of the promise\n * @param _assetTitle Name of the asset\n * @param _validFrom Start of valid period\n * @param _validTo End of valid period\n * @param _price Price (payment amount)\n * @param _depositSe Seller's deposit\n * @param _depositBu Buyer's deposit\n */\n function createAssetPromise(\n address _seller, \n string calldata _assetTitle, \n //bytes32 _value, \n uint256 _validFrom,\n uint256 _validTo,\n uint256 _price,\n uint256 _depositSe,\n uint256 _depositBu\n //uint256 _complainPeriod,\n //uint256 _cancelFaultPeriod\n ) \n external \n onlyFromCashier\n returns (bytes32)\n {\n \n require(_validFrom <= _validTo, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\n require(_validTo >= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\n \n bytes32 key;\n key = keccak256(abi.encodePacked(_assetTitle, _validFrom, _validTo));\n \n if (promiseKeys.length > 0) {\n require(promiseKeys[promises[key].idx] != key, \"PROMISE_ALREADY_EXISTS\");\n }\n \n promises[key] = Promise({\n promiseId: key,\n assetTitle: _assetTitle,\n seller: _seller,\n //value: _value,\n validFrom: _validFrom,\n validTo: _validTo,\n price: _price,\n depositSe: _depositSe,\n depositBu: _depositBu,\n //complainPeriod: _complainPeriod,\n //cancelFaultPeriod: _cancelFaultPeriod,\n idx: promiseKeys.length\n });\n \n promiseKeys.push(key);\n \n emit LogPromiseCreated(key, _assetTitle, msg.sender, _validFrom, _validTo, //_price, _depositSe, _depositBu, _complainPeriod, _cancelFaultPeriod, \n promiseKeys.length - 1);\n \n return key;\n } \n \n \n /**\n * @notice Create an order for offering a certain quantity of an asset\n * This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n * @param _seller seller of the promise\n * @param _promiseId ID of a promise (simplified into asset for demo)\n * @param _quantity Quantity of assets on offer\n */\n function createOrder(address _seller, bytes32 _promiseId, uint256 _quantity)\n external \n onlyFromCashier\n returns (uint256)\n {\n require(_promiseId != bytes32(0), \"UNSPECIFIED_PROMISE\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n require(promises[_promiseId].seller == _seller, \"UNAUTHORIZED_CO\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n require(_quantity > 0, \"INVALID_QUANTITY\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\n \n uint256 tokenIdSupply = generateTokenType(true); //create & assign a new non-fungible type\n tokensContract.mint(_seller, tokenIdSupply, _quantity, \"\");\n \n ordersPromise[tokenIdSupply] = _promiseId;\n accountSupply[_seller] += _quantity;\n\n return tokenIdSupply;\n }\n \n \n /**\n * @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n * @param _tokenIdSupply ID of the supply token (ERC-1155)\n * @param _issuer Address of the token's issuer\n * @param _holder Address of the recipient of the voucher (ERC-721)\n */\n function fillOrder(uint256 _tokenIdSupply, address _issuer, address _holder)\n external\n onlyFromCashier\n returns (uint256)\n {\n //checks\n checkOrderFillable(_tokenIdSupply, _issuer, _holder);\n\n //close order\n return extract721(_issuer, _holder, _tokenIdSupply);\n }\n \n \n /**\n * @notice Check order is fillable\n * @dev Will throw if checks don't pass\n * @param _tokenIdSupply ID of the supply token\n * @param _issuer Address of the token's issuer\n * @param _holder Address of the recipient of the voucher (ERC-721) \n */\n function checkOrderFillable(uint256 _tokenIdSupply, address _issuer, address _holder)\n internal\n view\n {\n require(_tokenIdSupply != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n\n if (_holder.isContract()) {\n require(IERC165(_holder).supportsInterface(0x150b7a02), \"UNSUPPORTED_ERC721_RECEIVED\"); //hex\"31\"\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\n } \n \n require(_holder != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n require(tokensContract.balanceOf(_issuer, _tokenIdSupply) > 0, \"OFFER_EMPTY\"); //hex\"40\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Unavailable)\n \n }\n \n\n /**\n * @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n * @param _issuer The address of the token issuer\n * @param _to The address of the token holder\n * @param _tokenIdSupply ID of the token type\n * @return ID of the voucher token\n */\n function extract721(address _issuer, address _to, uint256 _tokenIdSupply)\n internal\n returns (uint256)\n {\n if (_to.isContract()) {\n require(ERC721TokenReceiver(_to).onERC721Received(_issuer, msg.sender, _tokenIdSupply, \"\") == ERC721TokenReceiver(_to).onERC721Received.selector, \"UNSUPPORTED_ERC721_RECEIVED\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\n } \n\n tokensContract.burn(_issuer, _tokenIdSupply, 1);\n accountSupply[_issuer]--;\n \n \n //calculate tokenId\n uint256 voucherTokenId = _tokenIdSupply | ++typeCounters[_tokenIdSupply];\n \n //set status\n vouchersStatus[voucherTokenId].status = setChange(vouchersStatus[voucherTokenId].status, idxCommit);\n vouchersStatus[voucherTokenId].isPaymentReleased = false;\n vouchersStatus[voucherTokenId].isDepositsReleased = false;\n \n //mint voucher NFT as ERC-721\n tokensContract.mint(_to, voucherTokenId);\n voucherIssuers[voucherTokenId] = _issuer;\n \n return voucherTokenId;\n }\n \n \n /**\n * @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n * @param _isNonFungible Flag for generating NFT or FT\n * @return _tokenType Returns a newly generated token type\n */\n function generateTokenType(bool _isNonFungible)\n internal\n returns (uint256 _tokenType)\n {\n typeId++;\n \n if (_isNonFungible) {\n _tokenType = TYPE_NF_BIT | typeId << 128; //upper bit is 1, followed by sequence, leaving lower 128-bits as 0\n } else {\n _tokenType = typeId << 128; //upper bit is not set, followed by sequence, leaving lower 128-bits as 0\n }\n \n //not needed:\n //assert(typeId= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\n \n //check collection code and/or assign collector\n \n \n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\n vouchersStatus[_tokenIdVoucher].status = setChange(vouchersStatus[_tokenIdVoucher].status, idxRedeem);\n \n emit LogVoucherRedeemed(_tokenIdVoucher, msg.sender, tPromise.promiseId);\n }\n \n \n // // // // // // // //\n // UNHAPPY PATH\n // // // // // // // // \n \n /**\n * @notice Refunding a voucher\n * @param _tokenIdVoucher ID of the voucher\n */\n function refund(uint256 _tokenIdVoucher)\n external\n onlyVoucherOwner(_tokenIdVoucher)\n {\n require(isStateCommitted(vouchersStatus[_tokenIdVoucher].status), \"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicatableToCurrentState)\n \n //check validity period\n isInValidityPeriod(_tokenIdVoucher);\n \n //Promise memory tPromise = promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\n \n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\n vouchersStatus[_tokenIdVoucher].status = setChange(vouchersStatus[_tokenIdVoucher].status, idxRefund);\n \n emit LogVoucherRefunded(_tokenIdVoucher);\n }\n \n \n /**\n * @notice Issue a complain for a voucher\n * @param _tokenIdVoucher ID of the voucher\n */\n function complain(uint256 _tokenIdVoucher)\n external\n onlyVoucherOwner(_tokenIdVoucher)\n {\n require(!isStatus(vouchersStatus[_tokenIdVoucher].status, idxComplain), \"ALREADY_COMPLAINED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\n require(!isStatus(vouchersStatus[_tokenIdVoucher].status, idxFinal), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\n \n //check if still in the complain period\n Promise memory tPromise = promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\n \n //if redeeemed or refunded\n if (isStateRedemptionSigned(vouchersStatus[_tokenIdVoucher].status) ||\n isStateRefunded(vouchersStatus[_tokenIdVoucher].status)) {\n if (!isStatus(vouchersStatus[_tokenIdVoucher].status, idxCancelFault)) {\n require(block.timestamp <= vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod + cancelFaultPeriod, \"COMPLAINPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\n } else {\n require(block.timestamp <= vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod, \"COMPLAINPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\n }\n \n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block.timestamp;\n vouchersStatus[_tokenIdVoucher].status = setChange(vouchersStatus[_tokenIdVoucher].status, idxComplain);\n \n emit LogVoucherComplain(_tokenIdVoucher);\n \n //if expired\n } else if (isStateExpired(vouchersStatus[_tokenIdVoucher].status)) {\n if (!isStatus(vouchersStatus[_tokenIdVoucher].status, idxCancelFault)) {\n require(block.timestamp <= tPromise.validTo + complainPeriod + cancelFaultPeriod, \"COMPLAINPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\n } else {\n require(block.timestamp <= tPromise.validTo + complainPeriod, \"COMPLAINPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\n }\n \n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block.timestamp;\n vouchersStatus[_tokenIdVoucher].status = setChange(vouchersStatus[_tokenIdVoucher].status, idxComplain);\n \n emit LogVoucherComplain(_tokenIdVoucher);\n \n //if cancelOrFault\n } else if (isStatus(vouchersStatus[_tokenIdVoucher].status, idxCancelFault)) {\n require(block.timestamp <= vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod, \"COMPLAINPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired));\n \n vouchersStatus[_tokenIdVoucher].status = setChange(vouchersStatus[_tokenIdVoucher].status, idxComplain);\n \n emit LogVoucherComplain(_tokenIdVoucher);\n \n } else {\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicatableToCurrentState)\n }\n \n }\n \n \n /**\n * @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n * @param _tokenIdVoucher ID of the voucher\n */\n function cancelOrFault(uint256 _tokenIdVoucher)\n external\n {\n require(getVoucherIssuer(_tokenIdVoucher) == msg.sender,\"UNAUTHORIZED_COF\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n \n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\n \n require(!isStatus(tStatus, idxCancelFault), \"ALREADY_CANCELFAULT\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\n require(!isStatus(tStatus, idxFinal), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\n \n Promise memory tPromise = promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\n \n if (isStatus(tStatus, idxRedeem) || isStatus(tStatus, idxRefund)) {\n //if redeeemed or refunded\n if (!isStatus(tStatus, idxComplain)) {\n require(block.timestamp <= vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod + cancelFaultPeriod, \"COFPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired) \n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp; //resetting the complain period\n\n } else {\n require(block.timestamp <= vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart + cancelFaultPeriod, \"COFPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired) \n }\n \n } else if (isStatus(tStatus, idxExpire)) {\n //if expired\n if (!isStatus(tStatus, idxComplain)) {\n require(block.timestamp <= tPromise.validTo + complainPeriod + cancelFaultPeriod, \"COFPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired) \n } else {\n require(block.timestamp <= vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart + cancelFaultPeriod, \"COFPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired) \n }\n \n } else if (isStateCommitted(tStatus)) {\n //if committed only\n require(block.timestamp <= tPromise.validTo + complainPeriod + cancelFaultPeriod, \"COFPERIOD_EXPIRED\"); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired) \n \n } else {\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicatableToCurrentState)\n }\n \n vouchersStatus[_tokenIdVoucher].status = setChange(tStatus, idxCancelFault);\n \n emit LogVoucherFaultCancel(_tokenIdVoucher);\n \n } \n \n \n // // // // // // // //\n // BACK-END PROCESS\n // // // // // // // // \n \n \n /**\n * @notice Mark voucher token that the payment was released\n * @param _tokenIdVoucher ID of the voucher token\n */\n function setPaymentReleased(uint256 _tokenIdVoucher)\n external\n onlyFromCashier\n {\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n vouchersStatus[_tokenIdVoucher].isPaymentReleased = true;\n \n emit LogFundsReleased(_tokenIdVoucher, 0);\n }\n \n\n /**\n * @notice Mark voucher token that the deposits were released\n * @param _tokenIdVoucher ID of the voucher token\n */\n function setDepositsReleased(uint256 _tokenIdVoucher)\n external\n onlyFromCashier\n {\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n vouchersStatus[_tokenIdVoucher].isDepositsReleased = true;\n \n emit LogFundsReleased(_tokenIdVoucher, 1);\n } \n \n \n /**\n * @notice Mark voucher token as expired\n * @param _tokenIdVoucher ID of the voucher token\n */\n //TODO: refactor to support array of inputs\n function triggerExpiration(uint256 _tokenIdVoucher)\n external\n {\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n \n Promise memory tPromise = promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\n \n if (tPromise.validTo < block.timestamp &&\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status)\n ) {\n vouchersStatus[_tokenIdVoucher].status = setChange(vouchersStatus[_tokenIdVoucher].status, idxExpire);\n \n emit LogExpirationTriggered(_tokenIdVoucher, msg.sender);\n } \n }\n \n\n /**\n * @notice Mark voucher token to the final status\n * @param _tokenIdVoucher ID of the voucher token\n */\n //TODO: refactor to support array of inputs\n function triggerFinalizeVoucher(uint256 _tokenIdVoucher)\n external\n {\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n \n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\n \n require(!isStatus(tStatus, idxFinal), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\n \n \n bool mark;\n Promise memory tPromise = promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\n \n if (isStatus(tStatus, idxComplain)) {\n if (isStatus(tStatus, idxCancelFault)) {\n //if COMPLAIN && COF: then final\n mark = true;\n \n } else if (block.timestamp >= vouchersStatus[_tokenIdVoucher].complainPeriodStart + cancelFaultPeriod) {\n //if COMPLAIN: then final after cof period\n mark = true;\n }\n \n } else if (isStatus(tStatus, idxCancelFault) &&\n block.timestamp >= vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod\n ) {\n //if COF: then final after complain period\n mark = true;\n \n } else if (isStateRedemptionSigned(tStatus) ||\n isStateRefunded(tStatus)) {\n //if RDM/RFND NON_COMPLAIN: then final after complainPeriodStart + complainPeriod\n if (block.timestamp >= vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod) {\n mark = true;\n }\n \n } else if (isStateExpired(tStatus)) {\n //if EXP NON_COMPLAIN: then final after validTo + complainPeriod\n if (block.timestamp >= tPromise.validTo + complainPeriod) {\n mark = true;\n } \n }\n \n if (mark) {\n vouchersStatus[_tokenIdVoucher].status = setChange(tStatus, idxFinal);\n emit LogFinalizeVoucher(_tokenIdVoucher, msg.sender); \n }\n //\n } \n \n \n // // // // // // // //\n // UTILS \n // // // // // // // // \n \n /**\n * @notice Set the address of the Cashier contract\n * @param _cashierAddress The address of the Cashier contract\n */\n function setCashierAddress(address _cashierAddress)\n external\n onlyOwner\n {\n require(_cashierAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n \n cashierAddress = _cashierAddress;\n \n emit LogCashierSet(_cashierAddress, msg.sender);\n }\n \n \n /**\n * @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n * @param _complainPeriod the new value for complain period (in number of seconds)\n */\n function setComplainPeriod(uint256 _complainPeriod)\n external\n onlyOwner\n {\n complainPeriod = _complainPeriod;\n \n emit LogComplainPeriodChanged(_complainPeriod, msg.sender);\n }\n \n \n /**\n * @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n * @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)\n */\n function setCancelFaultPeriod(uint256 _cancelFaultPeriod)\n external\n onlyOwner\n {\n cancelFaultPeriod = _cancelFaultPeriod;\n \n emit LogCancelFaultPeriodChanged(_cancelFaultPeriod, msg.sender);\n } \n \n \n // // // // // // // //\n // GETTERS \n // // // // // // // // \n \n /**\n * @notice Get the promise ID at specific index\n * @param _idx Index in the array of promise keys\n * @return Promise ID\n */\n function getPromiseKey(uint256 _idx)\n public view\n returns (bytes32)\n {\n return promiseKeys[_idx];\n }\n \n \n /**\n * @notice Get the supply token ID from a voucher token\n * @param _tokenIdVoucher ID of the voucher token\n * @return ID of the supply token\n */\n function getIdSupplyFromVoucher(uint256 _tokenIdVoucher)\n public pure\n returns (uint256)\n {\n return _tokenIdVoucher & MASK_TYPE;\n }\n \n \n /**\n * @notice Get the promise ID from a voucher token\n * @param _tokenIdVoucher ID of the voucher token\n * @return ID of the promise\n */\n function getPromiseIdFromVoucherId(uint256 _tokenIdVoucher)\n public view\n returns (bytes32)\n {\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n \n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\n return promises[ordersPromise[tokenIdSupply]].promiseId;\n }\n \n \n /**\n * @notice Get the current supply of tokens of an account\n * @param _account Address to query\n * @return Balance\n */\n //TODO: might not need it\n function getTotalSupply(address _account)\n public view\n returns (uint256)\n {\n return accountSupply[_account];\n }\n \n \n /**\n * @notice Get the seller's deposit for a promise\n * @param _promiseId ID of the promise\n * @return Deposit of the seller\n */\n function getPromiseDepositSe(bytes32 _promiseId)\n public view\n returns (uint256)\n {\n return (promises[_promiseId].depositSe);\n }\n \n\n /**\n * @notice Get all necessary funds for a supply token\n * @param _tokenIdSupply ID of the supply token\n * @return returns a tupple (Payment amount, Seller's deposit, Buyer's deposit)\n */\n function getOrderCosts(uint256 _tokenIdSupply)\n public view\n returns (uint256, uint256, uint256)\n {\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\n return (promises[promiseKey].price, promises[promiseKey].depositSe, promises[promiseKey].depositBu);\n }\n \n \n /**\n * @notice Get the current status of a voucher\n * @param _tokenIdVoucher ID of the voucher token\n * @return Status of the voucher (via enum)\n */\n function getVoucherStatus(uint256 _tokenIdVoucher)\n public view\n returns (uint8, bool, bool)\n {\n return (vouchersStatus[_tokenIdVoucher].status, vouchersStatus[_tokenIdVoucher].isPaymentReleased, vouchersStatus[_tokenIdVoucher].isDepositsReleased);\n }\n \n \n /**\n * @notice Get the issuer of a voucher\n * @param _tokenIdVoucher ID of the voucher token\n * @return Address of the issuer\n */\n function getVoucherIssuer(uint256 _tokenIdVoucher)\n public view\n returns (address)\n {\n return voucherIssuers[_tokenIdVoucher];\n }\n \n \n /**\n * @notice Get the holder of a voucher\n * @param _tokenIdVoucher ID of the voucher token\n * @return Address of the holder\n */\n function getVoucherHolder(uint256 _tokenIdVoucher)\n public view\n returns (address)\n {\n return tokensContract.ownerOf(_tokenIdVoucher);\n }\n \n \n /** \n * \n */\n function isInValidityPeriod(uint256 _tokenIdVoucher)\n public view\n returns (bool)\n {\n //check validity period\n Promise memory tPromise = promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\n require(tPromise.validFrom <= block.timestamp, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\n require(tPromise.validTo >= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow) \n \n return true;\n }\n \n \n}", - "sourcePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/VoucherKernel.sol", + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokensContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newBosonRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogBosonRouterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newCancelFaultPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCancelFaultPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newCashier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCashierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newComplainPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogComplainPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogExpirationTriggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogFinalizeVoucher\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"LogFundsReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"LogPromiseCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherComplain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"LogVoucherDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"}],\"name\":\"LogVoucherRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"LogVoucherSetFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_qty\",\"type\":\"uint256\"}],\"name\":\"burnSupplyOnPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"cancelOrFault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"cancelOrFaultVoucherSet\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"complain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_tokenPrice\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenDeposits\",\"type\":\"address\"}],\"name\":\"createPaymentMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositSe\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositBu\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"createTokenSupplyID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"fillOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBosonRouterAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getBuyerOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancelFaultPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCashierAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getComplainPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getIdSupplyFromVoucher\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_promiseKey\",\"type\":\"bytes32\"}],\"name\":\"getPromiseData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromSupplyId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromVoucherId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"getPromiseKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenSupplyId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getRemQtyForSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSellerDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSupplyHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"getTokenNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokensContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTypeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherDepositToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPaymentMethod\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPriceToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherStatus\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isInValidityPeriod\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isVoucherTransferable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bosonRouterAddress\",\"type\":\"address\"}],\"name\":\"setBosonRouterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_cancelFaultPeriod\",\"type\":\"uint256\"}],\"name\":\"setCancelFaultPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_cashierAddress\",\"type\":\"address\"}],\"name\":\"setCashierAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_complainPeriod\",\"type\":\"uint256\"}],\"name\":\"setComplainPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setDepositsReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setPaymentReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_newSeller\",\"type\":\"address\"}],\"name\":\"setSupplyHolderOnTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerExpiration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerFinalizeVoucher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\",\"kind\":\"dev\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"details\":\"Token ID is derived following the same principles for both ERC-1155 and ERC-721\",\"params\":{\"_issuer\":\"The address of the token issuer\",\"_qty\":\"qty that should be burned\",\"_tokenIdSupply\":\"ID of the token type\"}},\"cancelOrFault(uint256,address)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"cancelOrFaultVoucherSet(uint256,address)\":{\"params\":{\"_issuer\":\"owner of the voucher\",\"_tokenIdSupply\":\"ID of the voucher set\"}},\"complain(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"createPaymentMethod(uint256,uint8,address,address)\":{\"params\":{\"_paymentMethod\":\"might be ETHETH, ETHTKN, TKNETH or TKNTKN\",\"_tokenDeposits\":\"token address which will hold the funds for the deposits of the voucher\",\"_tokenIdSupply\":\"_tokenIdSupply of the voucher set this is related to\",\"_tokenPrice\":\"token address which will hold the funds for the price of the voucher\"}},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"_depositBu\":\"Buyer's deposit\",\"_depositSe\":\"Seller's deposit\",\"_price\":\"Price (payment amount)\",\"_seller\":\"seller of the promise\",\"_validFrom\":\"Start of valid period\",\"_validTo\":\"End of valid period\"}},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"params\":{\"_correlationId\":\"ID of the current interaction with the smart contract for a specific user\",\"_holder\":\"Address of the recipient of the voucher (ERC-721)\",\"_issuer\":\"Address of the token's issuer\",\"_paymentMethod\":\"method being used for that particular order that needs to be fulfilled\",\"_tokenIdSupply\":\"ID of the supply token (ERC-1155)\"}},\"getBosonRouterAddress()\":{\"returns\":{\"_0\":\"Address of the Boson Router contract\"}},\"getBuyerOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Buyer's deposit)\"}},\"getCancelFaultPeriod()\":{\"returns\":{\"_0\":\"cancel or fault period\"}},\"getCashierAddress()\":{\"returns\":{\"_0\":\"Address of the Cashier contract\"}},\"getComplainPeriod()\":{\"returns\":{\"_0\":\"complain period\"}},\"getIdSupplyFromVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the supply token\"}},\"getOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\"}},\"getPromiseData(bytes32)\":{\"params\":{\"_promiseKey\":\"ID of the promise\"},\"returns\":{\"_0\":\"promise data not returned by other accessor methods\"}},\"getPromiseIdFromSupplyId(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseIdFromVoucherId(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseKey(uint256)\":{\"params\":{\"_idx\":\"Index in the array of promise keys\"},\"returns\":{\"_0\":\"Promise ID\"}},\"getRemQtyForSupply(uint256,address)\":{\"params\":{\"_owner\":\"holder of the Token Supply\",\"_tokenSupplyId\":\"Token supply ID\"},\"returns\":{\"_0\":\"remaining quantity\"}},\"getSellerDeposit(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns sellers deposit\"}},\"getSupplyHolder(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getTokenNonce(address)\":{\"params\":{\"_seller\":\"Address of the seller\"},\"returns\":{\"_0\":\"The seller's nonce\"}},\"getTokensContractAddress()\":{\"returns\":{\"_0\":\"Address of ERC1155ERC721 contract\"}},\"getTypeId()\":{\"returns\":{\"_0\":\"type Id\"}},\"getVoucherDepositToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherHolder(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getVoucherPaymentMethod(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"payment method\"}},\"getVoucherPriceToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherStatus(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Status of the voucher (via enum)\"}},\"isInValidityPeriod(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"isVoucherTransferable(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"refund(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setBosonRouterAddress(address)\":{\"params\":{\"_bosonRouterAddress\":\"The address of the BR contract\"}},\"setCancelFaultPeriod(uint256)\":{\"params\":{\"_cancelFaultPeriod\":\"the new value for cancelOrFault period (in number of seconds)\"}},\"setCashierAddress(address)\":{\"params\":{\"_cashierAddress\":\"The address of the BR contract\"}},\"setComplainPeriod(uint256)\":{\"params\":{\"_complainPeriod\":\"the new value for complain period (in number of seconds)\"}},\"setDepositsReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setPaymentReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setSupplyHolderOnTransfer(uint256,address)\":{\"params\":{\"_newSeller\":\"new holder of the supply\",\"_tokenIdSupply\":\"_tokenIdSupply which will be transferred\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"triggerExpiration(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"triggerFinalizeVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}}},\"title\":\"VoucherKernel contract is controlling the core business logic\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"notice\":\"Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\"},\"cancelOrFault(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\"},\"cancelOrFaultVoucherSet(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\"},\"complain(uint256,address)\":{\"notice\":\"Issue a complain for a voucher\"},\"createPaymentMethod(uint256,uint8,address,address)\":{\"notice\":\"Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\"},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future).\"},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"notice\":\"Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\"},\"getBosonRouterAddress()\":{\"notice\":\"Get address of the Boson Router to which this contract points\"},\"getBuyerOrderCosts(uint256)\":{\"notice\":\"Get Buyer costs required to make an order for a supply token\"},\"getCancelFaultPeriod()\":{\"notice\":\"Get the cancel or fault period\"},\"getCashierAddress()\":{\"notice\":\"Get address of the Cashier contract to which this contract points\"},\"getComplainPeriod()\":{\"notice\":\"Get the complain period\"},\"getIdSupplyFromVoucher(uint256)\":{\"notice\":\"Get the supply token ID from a voucher token\"},\"getOrderCosts(uint256)\":{\"notice\":\"Get all necessary funds for a supply token\"},\"getPromiseData(bytes32)\":{\"notice\":\"Get promise data not retrieved by other accessor functions\"},\"getPromiseIdFromSupplyId(uint256)\":{\"notice\":\"Get the promise ID from a voucher set\"},\"getPromiseIdFromVoucherId(uint256)\":{\"notice\":\"Get the promise ID from a voucher token\"},\"getPromiseKey(uint256)\":{\"notice\":\"Get the promise ID at specific index\"},\"getRemQtyForSupply(uint256,address)\":{\"notice\":\"Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\"},\"getSellerDeposit(uint256)\":{\"notice\":\"Get Seller deposit\"},\"getSupplyHolder(uint256)\":{\"notice\":\"Get the holder of a supply\"},\"getTokenNonce(address)\":{\"notice\":\"Get the token nonce for a seller\"},\"getTokensContractAddress()\":{\"notice\":\"Get the address of ERC1155ERC721 contract\"},\"getTypeId()\":{\"notice\":\"Get the current type Id\"},\"getVoucherDepositToken(uint256)\":{\"notice\":\"Get the address of the token where the deposits for the supply are held\"},\"getVoucherHolder(uint256)\":{\"notice\":\"Get the holder of a voucher\"},\"getVoucherPaymentMethod(uint256)\":{\"notice\":\"Get the payment method for a particular _tokenIdSupply\"},\"getVoucherPriceToken(uint256)\":{\"notice\":\"Get the address of the token where the price for the supply is held\"},\"getVoucherStatus(uint256)\":{\"notice\":\"Get the current status of a voucher\"},\"isInValidityPeriod(uint256)\":{\"notice\":\"Checks whether a voucher is in valid period for redemption (between start date and end date)\"},\"isVoucherTransferable(uint256)\":{\"notice\":\"Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\"},\"pause()\":{\"notice\":\"Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function.\"},\"redeem(uint256,address)\":{\"notice\":\"Redemption of the vouchers promise\"},\"refund(uint256,address)\":{\"notice\":\"Refunding a voucher\"},\"setBosonRouterAddress(address)\":{\"notice\":\"Set the address of the Boson Router contract\"},\"setCancelFaultPeriod(uint256)\":{\"notice\":\"Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setCashierAddress(address)\":{\"notice\":\"Set the address of the Cashier contract\"},\"setComplainPeriod(uint256)\":{\"notice\":\"Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setDepositsReleased(uint256)\":{\"notice\":\"Mark voucher token that the deposits were released\"},\"setPaymentReleased(uint256)\":{\"notice\":\"Mark voucher token that the payment was released\"},\"setSupplyHolderOnTransfer(uint256,address)\":{\"notice\":\"Set the address of the new holder of a _tokenIdSupply on transfer\"},\"triggerExpiration(uint256)\":{\"notice\":\"Mark voucher token as expired\"},\"triggerFinalizeVoucher(uint256)\":{\"notice\":\"Mark voucher token to the final status\"},\"unpause()\":{\"notice\":\"Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":\"VoucherKernel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol\":{\"keccak256\":\"0x867daada4cae6f8f547fc7eba2db9f8aa282228901c125e773dfd808943a235a\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://e50dc3939a48de65fd3ba74d54c20d2370adad18ddc97c8dca721839d20e0224\",\"dweb:/ipfs/QmcL6Z8wCcQfgcTQ2UH4vyJ84hYckJW7LGpN6oKg2kQKBm\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":{\"keccak256\":\"0x3d7decc1350a42e2a425ef915c8d0ddf5143289ee9e578c64727cf1393969836\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://fb17e7fca89026ae4fdfed6887bf9027341161038f1a4f5693257874b42102f3\",\"dweb:/ipfs/QmckQ5mpGzPjVSv8u2ZD6zkv5JDf1THuQMSodaW75HwFQJ\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol\":{\"keccak256\":\"0x34796b446a93c5ac705507913582dcab993b7cc86429c5e272b99597b64e51d9\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://51ba6851cc9c12c62f8ba7f20780880d590f1030c265edee05158064b9f67a36\",\"dweb:/ipfs/QmNidTbLJeMMFFk3iftCeWP9pLsFxdSHsckvakXgKnxoKC\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol\":{\"keccak256\":\"0xb4b2da06924caa82a63fa15eebec3357f13bd6693a9601fc3e37689e8aca80fc\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://ee602fbf4081c7db5fab98da408eb74c5c3e49a843acf142f259ebf788012bc8\",\"dweb:/ipfs/QmQ6ASnm4weSxGmcy9PU4oGZAmnDKdrW4AQN4dDmuZJUii\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x39c55885f7e34a407316f0f15d337baaf69723252f154d7c727c97f818b23e5e\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://3c297eddef2d21c163eecc6758ae3fe9872594025eff98f22d3cb84d4771df9f\",\"dweb:/ipfs/QmTvQ8URMHEHy1GTBfYqkQZXcu1jb9DpxTWUbNFX7BrEX8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xff346a09a5d08dfe7196c4516d78522da0dec1bde99e04e0f3b269f96796d29f\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://197cdfdd6994addd3ef4702e3b367d4563f907106c6be50b2932cb7d336daf0c\",\"dweb:/ipfs/QmSKe383xVyeY8ecpEPHdvEevMVDR121Qqq4udmeaipXQe\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol\":{\"keccak256\":\"0x7b8243200a7630a258025cc2a9fa2fec0ec9f009b0f6e4b7dc0b0bdcb64b2761\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7a1037cfbea713ba1649ec7c9c44570e012cf3f2eafcec3fd7e8da323e81248b\",\"dweb:/ipfs/QmaZzB7rN4RyPhGgfn9Fkvf5K6ynd4owHj6vA8iMH2k3N9\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://19c0dfbf7bb7744af0c03156e372d0096e0d07de8805ead7722243b8b42276a3\",\"dweb:/ipfs/QmPEFDvi6mJZ3sVii3uBs3CQzAARXPFwCKiHG5zkiCmC4V\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x4c5617b558186dc4b2b994b18ab9236410cd2dd1d9ad1213bbcca2e1d5321ce8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27b103fe3d550cf3717751a2c67e14008806af25baa3916b5717eeb68a2767ad\",\"dweb:/ipfs/QmS6gG9XVCx3qco7ewaSgJdcQRfZuurqxqPnKmRJ3Dj7Fg\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620041fc380380620041fc833981810160405260208110156200003757600080fd5b5051600062000045620000ce565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b039290921691909117905562093a80600c819055600d55620000d2565b3390565b61411a80620000e26000396000f3fe608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "sourceMap": "1169:47176:6:-:0;;;7484:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7484:169:6;867:17:22;887:12;:10;:12::i;:::-;909:6;:18;;-1:-1:-1;;;;;;909:18:22;-1:-1:-1;;;;;909:18:22;;;;;;;942:43;;909:18;;-1:-1:-1;909:18:22;942:43;;909:6;;942:43;-1:-1:-1;928:5:29;918:15;;-1:-1:-1;;;;918:15:29;;;-1:-1:-1;7532:32:6;;-1:-1:-1;;;;;;7532:32:6;-1:-1:-1;;;;;7532:32:6;;;;;;;;;;7594:10;7577:14;:27;;;7615:17;:30;1169:47176;;598:104:27;685:10;598:104;:::o;1169:47176:6:-;;;;;;;", + "deployedSourceMap": "1169:47176:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47239:151;;;:::i;:::-;;;;;;;;;;;;;;;;38179:190;;;;;;;;;;;;;;;;-1:-1:-1;38179:190:6;;:::i;44418:205::-;;;;;;;;;;;;;;;;-1:-1:-1;44418:205:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;41358:243;;;;;;;;;;;;;;;;-1:-1:-1;41358:243:6;;:::i;:::-;;;;-1:-1:-1;;;;;41358:243:6;;;;;;;;;;;;;;42355:589;;;;;;;;;;;;;;;;-1:-1:-1;42355:589:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8074:81;;;:::i;:::-;;29860:573;;;;;;;;;;;;;;;;-1:-1:-1;29860:573:6;;;;;;-1:-1:-1;;;;;29860:573:6;;:::i;47851:196::-;;;;;;;;;;;;;;;;-1:-1:-1;47851:196:6;;:::i;45673:295::-;;;;;;;;;;;;;;;;-1:-1:-1;45673:295:6;;:::i;:::-;;;;;;;;;;;;;;;;;;1035:84:29;;;:::i;32613:2261:6:-;;;;;;;;;;;;;;;;-1:-1:-1;32613:2261:6;;:::i;21299:4356::-;;;;;;;;;;;;;;;;-1:-1:-1;21299:4356:6;;;;;;-1:-1:-1;;;;;21299:4356:6;;:::i;1700:145:22:-;;;:::i;17796:246:6:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17796:246:6;;;;;;;;;;;;;:::i;30666:396::-;;;;;;;;;;;;;;;;-1:-1:-1;30666:396:6;;:::i;8614:1740::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8614:1740:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;20288:816::-;;;;;;;;;;;;;;;;-1:-1:-1;20288:816:6;;;;;;-1:-1:-1;;;;;20288:816:6;;:::i;19015:1008::-;;;;;;;;;;;;;;;;-1:-1:-1;19015:1008:6;;;;;;-1:-1:-1;;;;;19015:1008:6;;:::i;37819:160::-;;;;;;;;;;;;;;;;-1:-1:-1;37819:160:6;;:::i;7835:77::-;;;:::i;40878:247::-;;;;;;;;;;;;;;;;-1:-1:-1;40878:247:6;;:::i;35210:258::-;;;;;;;;;;;;;;;;-1:-1:-1;35210:258:6;;;;;;-1:-1:-1;;;;;35210:258:6;;:::i;36815:234::-;;;;;;;;;;;;;;;;-1:-1:-1;36815:234:6;;:::i;1068:85:22:-;;;:::i;47006:135:6:-;;;:::i;47502:157::-;;;:::i;46125:160::-;;;:::i;44813:623::-;;;;;;;;;;;;;;;;-1:-1:-1;44813:623:6;;:::i;43997:213::-;;;;;;;;;;;;;;;;-1:-1:-1;43997:213:6;;:::i;41817:337::-;;;;;;;;;;;;;;;;-1:-1:-1;41817:337:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13347:790;;;;;;;;;;;;;;;;-1:-1:-1;13347:790:6;;;-1:-1:-1;;;;;13347:790:6;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;38559:438::-;;;;;;;;;;;;;;;;-1:-1:-1;38559:438:6;;:::i;35623:397::-;;;;;;;;;;;;;;;;-1:-1:-1;35623:397:6;-1:-1:-1;;;;;35623:397:6;;:::i;36166:387::-;;;;;;;;;;;;;;;;-1:-1:-1;36166:387:6;-1:-1:-1;;;;;36166:387:6;;:::i;48181:161::-;;;:::i;10896:572::-;;;;;;;;;;;;;;;;-1:-1:-1;10896:572:6;;;;;;;;;;-1:-1:-1;;;;;10896:572:6;;;;;;;;;;;;:::i;31739:736::-;;;;;;;;;;;;;;;;-1:-1:-1;31739:736:6;;:::i;39752:424::-;;;;;;;;;;;;;;;;-1:-1:-1;39752:424:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;39279:232;;;;;;;;;;;;;;;;-1:-1:-1;39279:232:6;;;;;;-1:-1:-1;;;;;39279:232:6;;:::i;43558:208::-;;;;;;;;;;;;;;;;-1:-1:-1;43558:208:6;;:::i;46747:169::-;;;;;;;;;;;;;;;;-1:-1:-1;46747:169:6;-1:-1:-1;;;;;46747:169:6;;:::i;31212:398::-;;;;;;;;;;;;;;;;-1:-1:-1;31212:398:6;;:::i;37324:252::-;;;;;;;;;;;;;;;;-1:-1:-1;37324:252:6;;:::i;1994:240:22:-;;;;;;;;;;;;;;;;-1:-1:-1;1994:240:22;-1:-1:-1;;;;;1994:240:22;;:::i;25836:3701:6:-;;;;;;;;;;;;;;;;-1:-1:-1;25836:3701:6;;;;;;-1:-1:-1;;;;;25836:3701:6;;:::i;43126:205::-;;;;;;;;;;;;;;;;-1:-1:-1;43126:205:6;;:::i;46441:151::-;;;:::i;40417:288::-;;;;;;;;;;;;;;;;-1:-1:-1;40417:288:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;47239:151;47368:14;;47239:151;:::o;38179:190::-;-1:-1:-1;;;;;;38334:27:6;;38179:190;;;;:::o;44418:205::-;44541:5;44571:30;;;:14;:30;;;;;:44;;;;44418:205::o;41358:243::-;41473:7;41519:29;;;:13;:29;;;;;;;;;41566:20;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;41566:27:6;;41358:243::o;42355:589::-;42486:5;42623:31;;;:14;:31;;;;;:38;;;42805:51;;;42740:50;42871:54;;;;42623:38;;;;;;42676:49;;;;;42740:50;;;;;;;;42805:51;42871:54;42355:589::o;8074:81::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8137:10:::1;:8;:10::i;:::-;8074:81::o:0;29860:573::-;6454:18;;30035:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;::::1;;30103:7:6::2;-1:-1:-1::0;;;;;30068:42:6::2;:31;30084:14;30068:15;:31::i;:::-;-1:-1:-1::0;;;;;30068:42:6::2;;30060:71;;;::::0;;-1:-1:-1;;;30060:71:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30060:71:6;;;;;;;;;;;;;::::2;;30144:14;30161:43;30180:14;30196:7;30161:18;:43::i;:::-;30144:60;;30234:1;30225:6;:10;30217:34;;;::::0;;-1:-1:-1;;;30217:34:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30217:34:6;;;;;;;;;;;;;::::2;;30279:14;::::0;30264:68:::2;::::0;;-1:-1:-1;;;30264:68:6;;-1:-1:-1;;;;;30264:68:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;30279:14;;;::::2;::::0;30264:35:::2;::::0;:68;;;;;30279:14:::2;::::0;30264:68;;;;;;;30279:14;;30264:68;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;30350:49:6::2;::::0;;;;;-1:-1:-1;;;;;30350:49:6;::::2;;::::0;::::2;::::0;;;::::2;::::0;-1:-1:-1;30350:49:6;;;;;;;;-1:-1:-1;30350:49:6::2;30419:6:::0;29860:573;-1:-1:-1;;;29860:573:6:o;47851:196::-;47977:7;48010:29;;;:13;:29;;;;;;;47851:196::o;45673:295::-;45795:4;45839:31;;;:14;:31;;;;;:49;;;;;;;:120;;-1:-1:-1;45909:31:6;;;;:14;:31;;;;;:50;;;;;;45839:120;45837:123;;45673:295;-1:-1:-1;;45673:295:6:o;1035:84:29:-;1082:4;1105:7;-1:-1:-1;;;1105:7:29;;;;;1035:84::o;32613:2261:6:-;32707:20;32699:47;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;;;;32849:13;32865:31;;;:14;:31;;;;;:38;;;32925:28;32865:38;;32925:8;:28::i;:::-;32924:29;32916:59;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;;;;33070:9;33090:23;;:::i;:::-;33129:8;:52;33138:42;33164:15;33138:25;:42::i;:::-;33129:52;;;;;;;;;;;;;;-1:-1:-1;33129:52:6;33090:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33090:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33198:31:6;;33207:7;;33198:8;:31::i;:::-;33194:1432;;;33250:35;33259:7;488:1:5;33250:8:6;:35::i;:::-;33246:418;;;33363:4;33356:11;;33246:418;;;33525:17;;33447:31;;;;:14;:31;;;;;:54;;;:95;33411:15;:131;33389:275;;33644:4;33637:11;;33389:275;33194:1432;;;33699:35;33708:7;488:1:5;33699:8:6;:35::i;:::-;:152;;;;-1:-1:-1;33837:14:6;;33783:31;;;;:14;:31;;;;;:51;;;:68;33751:15;:100;;33699:152;33681:945;;;33941:4;33934:11;;33681:945;;;33981:32;34005:7;33981:23;:32::i;:::-;:60;;;;34017:24;34033:7;34017:15;:24::i;:::-;33963:663;;;34296:14;;34221:31;;;;:14;:31;;;;;:51;;;:89;34185:15;:125;34163:209;;34352:4;34345:11;;33963:663;;;34393:23;34408:7;34393:14;:23::i;:::-;34389:237;;;34553:14;;34534:8;:16;;;:33;34515:15;:52;34511:104;;34595:4;34588:11;;34511:104;34642:4;34638:229;;;34704:84;34738:7;532:1:5;34704:15:6;:84::i;:::-;34663:31;;;;:14;:31;;;;;;;;;:125;;-1:-1:-1;;34663:125:6;;;;;;;;;;;;;34808:47;;;;;34844:10;34808:47;;;;;;;;;;;;;;;;;;;34638:229;32613:2261;;;;:::o;21299:4356::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;21471:15;;21488:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;21548:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;21539:62:::3;::::0;21548:38:::3;;437:1:5;21539:8:6;:62::i;:::-;21538:63;21516:131;;;::::0;;-1:-1:-1;;;21516:131:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21516:131:6;;;;;;;;;;;;;::::3;;21772:31;::::0;;;:14:::3;:31;::::0;;;;:38;21763:59:::3;::::0;21772:38:::3;;::::0;21763:8:::3;:59::i;:::-;21762:60;21740:127;;;::::0;;-1:-1:-1;;;21740:127:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21740:127:6;;;;;;;;;;;;;::::3;;22011:23;;:::i;:::-;22050:8;:52;22059:42;22085:15;22059:25;:42::i;:::-;22050:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;22050:52:6;;;22011:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;22011:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;22192:31;;;:14:::3;:31:::0;;;;:38;22011:91;;-1:-1:-1;22168:63:6::3;::::0;22192:38:::3;;22168:23;:63::i;:::-;:135;;;-1:-1:-1::0;22264:31:6::3;::::0;;;:14:::3;:31;::::0;;;;:38;22248:55:::3;::::0;22264:38:::3;;22248:15;:55::i;:::-;22150:3498;;;22384:31;::::0;;;:14:::3;:31;::::0;;;;:38;22353:127:::3;::::0;22384:38:::3;;488:1:5;22353:8:6;:127::i;:::-;22330:921;;22718:17;::::0;22672:14:::3;::::0;22589:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;:146;22545:15;:190;;22515:286;;;::::0;;-1:-1:-1;;;22515:286:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22515:286:6;;;;;;;;;;;;;::::3;;22330:921;;;23077:14;::::0;22994:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;22950:15;:141;;22920:237;;;::::0;;-1:-1:-1;;;22920:237:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22920:237:6;;;;;;;;;;;;;::::3;;23267:31;::::0;;;:14:::3;:31;::::0;;;;23324:33:::3;23267:54;::::0;::::3;:90:::0;23447:38;23413:118:::3;::::0;23447:38:::3;;437:1:5;23413:15:6;:118::i;:::-;23372:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:159;;-1:-1:-1;;23372:159:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;23553:35;;;;;;;::::3;::::0;;;;;;;;;::::3;22150:3498;;;23653:31;::::0;;;:14:::3;:31;::::0;;;;:38;23638:54:::3;::::0;23653:38:::3;;23638:14;:54::i;:::-;23634:2014;;;23763:31;::::0;;;:14:::3;:31;::::0;;;;:38;23732:127:::3;::::0;23763:38:::3;;488:1:5;23732:8:6;:127::i;:::-;23709:739;;24004:17;;23987:14;;23968:8;:16;;;:33;:53;23924:15;:97;;23894:193;;;::::0;;-1:-1:-1;;;23894:193:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;23894:193:6;;;;;;;;;;;;;::::3;23709:739;24274:14;;24255:8;:16;;;:33;24236:15;:52;;24206:148;;;::::0;;-1:-1:-1;;;24206:148:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24206:148:6;;;;;;;;;;;;;::::3;23634:2014;24864:31;::::0;;;:14:::3;:31;::::0;;;;:38;24855:66:::3;::::0;24864:38:::3;;488:1:5;24855:8:6;:66::i;:::-;24837:811;;;25093:14;::::0;25014:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:93:::3;24974:15;:133;;24948:217;;;::::0;;-1:-1:-1;;;24948:217:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24948:217:6;;;;;;;;;;;;;::::3;;25337:31;::::0;;;:14:::3;:31;::::0;;;;:38;25303:118:::3;::::0;25337:38:::3;;437:1:5;25303:15:6;:118::i;24837:811::-;25511:29;::::0;;-1:-1:-1;;;25511:29:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;25511:29:6;;;;;;;;;;;;;::::3;24837:811;7467:1;6761::::2;;21299:4356:::0;;:::o;1700:145:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1806:1:::1;1790:6:::0;;1769:40:::1;::::0;-1:-1:-1;;;;;1790:6:22;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1769:40:22;1806:1;;1769:40:::1;1836:1;1819:19:::0;;-1:-1:-1;;;;;;1819:19:22::1;::::0;;1700:145::o;17796:246:6:-;1614:8:29;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;6824:14:6::1;::::0;-1:-1:-1;;;;;6824:14:6::1;6816:55;;;::::0;;-1:-1:-1;;;6816:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;::::1;;6994:14;::::0;-1:-1:-1;;;;;6994:14:6::1;6980:10;:28;6972:55;;;::::0;;-1:-1:-1;;;6972:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;::::1;;17983:14:::2;::::0;17968:66:::2;::::0;;-1:-1:-1;;;17968:66:6;;-1:-1:-1;;;;;17968:66:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;17983:14;;;::::2;::::0;17968:35:::2;::::0;:66;;;;;17983:14:::2;::::0;17968:66;;;;;;;17983:14;;17968:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;17796:246:::0;;;:::o;30666:396::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;30804:20;30796:47:::1;;;::::0;;-1:-1:-1;;;30796:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;30796:47:6;;;;;;;;;;;;;::::1;;30944:31;::::0;;;:14:::1;:31;::::0;;;;;;;:56;;-1:-1:-1;;30944:56:6::1;;;::::0;;31018:36;;;;;;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31018:36:6;;;;;;;;;::::1;30666:396:::0;:::o;8614:1740::-;6454:18;;8885:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8927:8:::1;8913:10;:22;;8905:56;;;::::0;;-1:-1:-1;;;8905:56:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;8905:56:6;;;;;;;;;;;;;::::1;;9130:15;9148:9;9130:27;9118:8;:39;;9110:71;;;::::0;;-1:-1:-1;;;9110:71:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9110:71:6;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;9450:20:6;::::1;9372:11;9450:20:::0;;;:11:::1;:20;::::0;;;;;;;;:22;;::::1;::::0;::::1;::::0;;;9424:71;;-1:-1:-1;;;;;;9424:71:6::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9400:106;;;::::1;::::0;9523:11:::1;:18:::0;:22;9519:176:::1;;9600:13;::::0;;;:8:::1;:13;::::0;;;;:17:::1;;::::0;9588:11:::1;:30:::0;;9622:3;;9600:17;9588:30;::::1;;;;;;;;;;;;;:37;;9562:121;;;::::0;;-1:-1:-1;;;9562:121:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9562:121:6;;;;;;;;;;;;;::::1;;9723:327;;;;;;;;9757:3;9723:327;;;;9782:11;:20;9794:7;-1:-1:-1::0;;;;;9782:20:6::1;-1:-1:-1::0;;;;;9782:20:6::1;;;;;;;;;;;;;9723:327;;;;9825:7;-1:-1:-1::0;;;;;9723:327:6::1;;;;;9858:10;9723:327;;;;9892:8;9723:327;;;;9922:6;9723:327;;;;9954:10;9723:327;;;;9990:10;9723:327;;;;10020:11;:18;;;;9723:327;;::::0;9707:8:::1;:13;9716:3;9707:13;;;;;;;;;;;:343;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10063:11;10080:3;10063:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10187:7;-1:-1:-1::0;;;;;10102:188:6::1;10152:11;:20;10164:7;-1:-1:-1::0;;;;;10152:20:6::1;-1:-1:-1::0;;;;;10152:20:6::1;;;;;;;;;;;;;10134:3;10102:188;10209:10;10234:8;10278:1;10257:11;:18;;;;:22;10102:188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10310:36;10322:7;10331:3;10336:9;10310:11;:36::i;:::-;10303:43:::0;8614:1740;-1:-1:-1;;;;;;;;;8614:1740:6:o;20288:816::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;20458:15;;20475:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;20542:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;20525:56:::3;::::0;20542:38:::3;;20525:16;:56::i;:::-;20503:125;;;::::0;;-1:-1:-1;;;20503:125:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;20503:125:6;;;;;;;;;;;;;::::3;;20770:35;20789:15;20770:18;:35::i;:::-;-1:-1:-1::0;20818:31:6::3;::::0;;;:14:::3;:31;::::0;;;;20872:15:::3;20818:51;::::0;::::3;:69:::0;20969:38;20939:104:::3;::::0;20969:38:::3;;345:1:5;20939:15:6;:104::i;:::-;20898:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;20898:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;21061:35;;;;;;;::::3;::::0;;;;;;;;;::::3;6761:1:::2;;20288:816:::0;;:::o;19015:1008::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;19185:15;;19202:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;19293:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;19276:56:::3;::::0;19293:38:::3;;19276:16;:56::i;:::-;19254:123;;;::::0;;-1:-1:-1;;;19254:123:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;19254:123:6;;;;;;;;;;;;;::::3;;19505:35;19524:15;19505:18;:35::i;:::-;;19551:23;;:::i;:::-;19590:8;:52;19599:42;19625:15;19599:25;:42::i;:::-;19590:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;19590:52:6;;;19551:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;19551:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;19655:31;;;:14:::3;:31:::0;;;;;;;19709:15:::3;19655:51:::0;;::::3;:69:::0;;;;19806:38;;19551:91;;-1:-1:-1;19776:104:6::3;::::0;19806:38:::3;::::0;;::::3;::::0;19776:15:::3;:104::i;:::-;19735:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;19735:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;19986:18;;19898:117;;;;;-1:-1:-1;;;;;19898:117:6;::::3;::::0;;::::3;::::0;;;;;;;;;::::3;::::0;;;;;;;;::::3;7467:1;6761::::2;;19015:1008:::0;;:::o;37819:160::-;37922:7;37954:11;37966:4;37954:17;;;;;;;;;;;;;;;;37947:24;;37819:160;;;:::o;7835:77::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;7896:8:::1;:6;:8::i;40878:247::-:0;40994:7;41040:29;;;:13;:29;;;;;;;;;41087:20;;:8;:20;;;;;:30;;;;40878:247::o;35210:258::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;35359:18:::1;35380:29:::0;;;:13:::1;:29;::::0;;;;;;;;35420:20;;:8:::1;:20:::0;;;;;;:27:::1;;:40:::0;;-1:-1:-1;;;;;;35420:40:6::1;-1:-1:-1::0;;;;;35420:40:6;;::::1;::::0;;;::::1;::::0;;35210:258::o;36815:234::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;36938:14:6::1;:32:::0;;;36988:53:::1;::::0;;;;;37030:10:::1;36988:53;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;36815:234:::0;:::o;1068:85:22:-;1114:7;1140:6;-1:-1:-1;;;;;1140:6:22;1068:85;:::o;47006:135:6:-;47127:6;;47006:135;:::o;47502:157::-;47634:17;;47502:157;:::o;46125:160::-;46259:18;;-1:-1:-1;;;;;46259:18:6;46125:160;:::o;44813:623::-;44932:4;44987:23;;:::i;:::-;45026:8;:52;45035:42;45061:15;45035:25;:42::i;:::-;45026:52;;;;;;;;;;;;;;-1:-1:-1;45026:52:6;44987:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;44987:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;45119:15:6;-1:-1:-1;45097:37:6;45089:71;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;;;;45282:15;45262:8;:16;;;:35;;45254:67;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;;;;-1:-1:-1;45424:4:6;;44813:623;-1:-1:-1;;44813:623:6:o;43997:213::-;44119:7;44151:30;;;:14;:30;;;;;:51;;;-1:-1:-1;;;;;44151:51:6;;43997:213::o;41817:337::-;41930:7;41939;41948;41957;41966;41992:23;;:::i;:::-;-1:-1:-1;;;42018:21:6;;;;-1:-1:-1;;42018:8:6;:21;;;;;;;;;41992:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41992:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41992:47:6;;41817:337::o;13347:790::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;13566:19:::1;13588:39;13612:14;13588:23;:39::i;:::-;13566:61;;13683:14;13666:31;;:13;:31;;;13658:68;;;::::0;;-1:-1:-1;;;13658:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;13658:68:6;;;;;;;;;;;;;::::1;;13737:52;13756:14;13772:7;13781;13737:18;:52::i;:::-;13825:22;13850:44;13861:7;13870;13879:14;13850:10;:44::i;:::-;13825:69;;13946:14;13912:217;13975:14;14004:7;14026;14048:41;14074:14;14048:25;:41::i;:::-;13912:217;::::0;;;;;-1:-1:-1;;;;;13912:217:6;;::::1;;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;::::1;6761:1;;13347:790:::0;;;;;:::o;38559:438::-;38685:7;38718:20;38710:47;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;;;;38860:21;38884:39;38907:15;38884:22;:39::i;:::-;38941:38;38950:28;;;:13;:28;;;;;;;;;38941:38;;:8;:38;;;;;:48;;38559:438;-1:-1:-1;;;38559:438:6:o;35623:397::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;35744:33:6;::::1;35736:65;;;::::0;;-1:-1:-1;;;35736:65:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;35736:65:6;;;;;;;;;;;;;::::1;;35904:18;:40:::0;;-1:-1:-1;;;;;;35904:40:6::1;-1:-1:-1::0;;;;;35904:40:6;::::1;::::0;;::::1;::::0;;;35962:50:::1;::::0;;;;;36001:10:::1;35962:50;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;35623:397:::0;:::o;36166:387::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;36297:29:6;::::1;36289:61;;;::::0;;-1:-1:-1;;;36289:61:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;36289:61:6;;;;;;;;;;;;;::::1;;36453:14;:32:::0;;-1:-1:-1;;;;;;36453:32:6::1;-1:-1:-1::0;;;;;36453:32:6;::::1;::::0;;::::1;::::0;;;36503:42:::1;::::0;;;;;36534:10:::1;36503:42;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;36166:387:::0;:::o;48181:161::-;48320:14;;-1:-1:-1;;;;;48320:14:6;48181:161;:::o;10896:572::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;11142:1:::1;11125:14;:18;;;:58;;;;;11182:1;11164:14;:19;;;;11125:58;11103:130;;;::::0;;-1:-1:-1;;;11103:130:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11103:130:6;;;;;;;;;;;;;::::1;;11287:173;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;11287:173:6;;::::1;;::::0;;::::1;::::0;;;;;::::1;::::0;;;;;;-1:-1:-1;11254:30:6;;;:14:::1;:30:::0;;;;;;;:206;;;;;;;::::1;;;-1:-1:-1::0;;;;;;11254:206:6;;;::::1;-1:-1:-1::0;;11254:206:6;;::::1;::::0;;;::::1;;::::0;;;::::1;::::0;;;;;;;::::1;::::0;;;;;::::1;-1:-1:-1::0;;;;;;11254:206:6;;::::1;::::0;;;::::1;::::0;;10896:572::o;31739:736::-;31828:20;31820:47;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;;;;31970:23;;:::i;:::-;32009:8;:52;32018:42;32044:15;32018:25;:42::i;:::-;32009:52;;;;;;;;;;;;;;-1:-1:-1;32009:52:6;31970:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;31970:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32111:15:6;-1:-1:-1;32092:107:6;;;;-1:-1:-1;32160:31:6;;;;:14;:31;;;;;:38;32143:56;;32160:38;;32143:16;:56::i;:::-;32074:394;;;32301:31;;;;:14;:31;;;;;:38;32267:116;;32301:38;;390:1:5;32267:15:6;:116::i;:::-;32226:31;;;;:14;:31;;;;;;;;;:157;;-1:-1:-1;;32226:157:6;;;;;;;;;;;;;32405:51;;;;;32445:10;32405:51;;;;;;;;;;;;;;;;;;;32074:394;31739:736;;:::o;39752:424::-;39879:7;39979:29;;;:13;:29;;;;;;;;;40041:20;;:8;:20;;;;;:26;;;;40082:30;;;;40127;;;;;40041:26;;39752:424::o;39279:232::-;39454:14;;39445:58;;;-1:-1:-1;;;39445:58:6;;-1:-1:-1;;;;;39445:58:6;;;;;;;;;;;;;;;39413:7;;39454:14;;;;;39445:34;;:58;;;;;;;;;;;;;;;39454:14;39445:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39445:58:6;;39279:232;-1:-1:-1;;;39279:232:6:o;43558:208::-;43678:7;43710:30;;;:14;:30;;;;;:48;;;;-1:-1:-1;;;;;43710:48:6;;43558:208::o;46747:169::-;-1:-1:-1;;;;;46888:20:6;46855:7;46888:20;;;:11;:20;;;;;;;46747:169::o;31212:398::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;31351:20;31343:47:::1;;;::::0;;-1:-1:-1;;;31343:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;31343:47:6;;;;;;;;;;;;;::::1;;31491:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:57;;-1:-1:-1;;31491:57:6::1;::::0;::::1;::::0;;31566:36;;;;;31544:4:::1;31566:36:::0;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31566:36:6;;;;;;;;;::::1;31212:398:::0;:::o;37324:252::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;37453:17:6::1;:38:::0;;;37509:59:::1;::::0;;;;;37557:10:::1;37509:59;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;37324:252:::0;:::o;1994:240:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;2082:22:22;::::1;2074:73;;;;-1:-1:-1::0;;;2074:73:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:6;::::0;;2162:38:::1;::::0;-1:-1:-1;;;;;2162:38:22;;::::1;::::0;2183:6;::::1;::::0;-1:-1:-1;;;;;;;;;;;2162:38:22;::::1;2210:6;:17:::0;;-1:-1:-1;;;;;;2210:17:22::1;-1:-1:-1::0;;;;;2210:17:22;;;::::1;::::0;;;::::1;::::0;;1994:240::o;25836:3701:6:-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;25979:21:6::1;26003:39;26026:15;26003:22;:39::i;:::-;25979:63;;26109:10;-1:-1:-1::0;;;;;26075:44:6::1;:30;26091:13;26075:15;:30::i;:::-;-1:-1:-1::0;;;;;26075:44:6::1;;26053:110;;;::::0;;-1:-1:-1;;;26053:110:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26053:110:6;;;;;;;;;;;;;::::1;;26260:13;26276:31:::0;;;:14:::1;:31;::::0;;;;:38;::::1;;26336:35;26276:38:::0;488:1:5::1;26336:8:6;:35::i;:::-;26335:36;26327:68;;;::::0;;-1:-1:-1;;;26327:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26327:68:6;;;;;;;;;;;;;::::1;;26497:28;26506:7;532:1:5;26497:8:6;:28::i;:::-;26496:29;26488:59;;;::::0;;-1:-1:-1;;;26488:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26488:59:6;;;;;;;;;;;;;::::1;;26642:23;;:::i;:::-;26681:8;:52;26690:42;26716:15;26690:25;:42::i;:::-;26681:52:::0;;::::1;::::0;;::::1;::::0;;;;;;;;-1:-1:-1;26681:52:6;26642:91;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;-1:-1:-1;;;;;26642:91:6::1;::::0;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;26750:29:6::1;::::0;26759:7;;26750:8:::1;:29::i;:::-;:62;;;;26783:29;26792:7;345:1:5;26783:8:6;:29::i;:::-;26746:2595;;;26873:31;26882:7;437:1:5;26873:8:6;:31::i;:::-;26868:931;;27128:17;::::0;27082:14:::1;::::0;26999:31:::1;::::0;;;:14:::1;:31;::::0;;;;:51:::1;;::::0;:97:::1;:146;26955:15;:190;;26925:281;;;::::0;;-1:-1:-1;;;26925:281:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26925:281:6;;;;;;;;;;;;;::::1;;27303:31;::::0;;;:14:::1;:31;::::0;;;;27357:37:::1;27303:51;::::0;;::::1;:91:::0;26868:931:::1;;;27627:17;::::0;27541:31:::1;::::0;;;:14:::1;:31;::::0;;;;:54:::1;;::::0;:103:::1;27497:15;:147;;27467:238;;;::::0;;-1:-1:-1;;;27467:238:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27467:238:6;;;;;;;;;;;;;::::1;;26746:2595;;;27820:29;27829:7;390:1:5;27820:8:6;:29::i;:::-;27816:1525;;;27897:31;27906:7;437:1:5;27897:8:6;:31::i;:::-;27892:806;;28059:17;;28042:14;;28023:8;:16;;;:33;:53;27979:15;:97;;27949:188;;;::::0;;-1:-1:-1;;;27949:188:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27949:188:6;;;;;;;;;;;;;::::1;27816:1525;28719:25;28736:7;28719:16;:25::i;:::-;28715:626;;;28896:17;;28879:14;;28860:8;:16;;;:33;:53;28820:15;:93;;28794:172;;;::::0;;-1:-1:-1;;;28794:172:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;28794:172:6;;;;;;;;;;;;;::::1;;29059:31;::::0;;;:14:::1;:31;::::0;;;;29113:33:::1;29059:51;::::0;;::::1;:87:::0;28715:626:::1;29394:79;29424:7;488:1:5;29394:15:6;:79::i;:::-;29353:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:120;;-1:-1:-1;;29353:120:6::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;29491:38;;;;;;;::::1;::::0;;;;;;;;;::::1;1388:1:29;;;25836:3701:6::0;;:::o;43126:205::-;43283:14;;43275:48;;;-1:-1:-1;;;43275:48:6;;;;;;;;;;43243:7;;-1:-1:-1;;;;;43283:14:6;;43275:31;;:48;;;;;;;;;;;;;;43283:14;43275:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43275:48:6;;43126:205;-1:-1:-1;;43126:205:6:o;46441:151::-;46570:14;;-1:-1:-1;;;;;46570:14:6;46441:151;:::o;40417:288::-;40535:7;40590:29;;;:13;:29;;;;;;;;;40638:20;;:8;:20;;;;;:26;;;;40666:30;;;;;40638:26;;40417:288::o;2047:117:29:-;1614:8;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;2115:5:::1;2105:15:::0;;-1:-1:-1;;;;2105:15:29::1;::::0;;2135:22:::1;2144:12;:10;:12::i;:::-;2135:22;::::0;;-1:-1:-1;;;;;2135:22:29;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2047:117::o:0;3510:128:5:-;3603:15;;;;;;;210:1;3602:23;;;:28;;3510:128::o;2321:205::-;2419:4;2459:59;2475:30;2491:1;255;2475:15;:30::i;:::-;300:1;2459:15;:59::i;:::-;2448:70;;:7;:70;;;2441:77;;2321:205;;;:::o;2733:165::-;2796:4;2831:59;2847:30;2863:1;255;2847:15;:30::i;:::-;345:1;2831:15;:59::i;3104:164::-;3166:4;3201:59;3217:30;3233:1;255;3217:15;:30::i;:::-;390:1;3779:175;210:1;3928:17;;;;;;3917:29;;3779:175::o;598:104:27:-;685:10;598:104;:::o;11858:938:6:-;11986:7;12014:24;12006:56;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;;;;12171:20;;;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;12171:38:6;;;:27;;:38;12163:66;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;;;;12344:1;12332:9;:13;12324:42;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;;;;12462:21;12486:23;12504:4;12486:17;:23::i;:::-;12564:28;;;;:13;:28;;;;;;:41;;;12633:14;;12618:137;;-1:-1:-1;;;12618:137:6;;-1:-1:-1;;;;;12618:137:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12462:47;;-1:-1:-1;12633:14:6;;;12618:35;;:137;;;;;12564:28;;12618:137;;;;;;12564:28;12633:14;12618:137;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12775:13:6;;11858:938;-1:-1:-1;;;;;;;11858:938:6:o;1969:137:5:-;2033:4;2068:30;2084:1;255;2068:15;:30::i;1800:115:29:-;1349:8;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;1859:7:::1;:14:::0;;-1:-1:-1;;;;1859:14:29::1;-1:-1:-1::0;;;1859:14:29::1;::::0;;1888:20:::1;1895:12;:10;:12::i;14430:1142:6:-:0;14583:19;14575:46;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;;;;14728:20;:7;-1:-1:-1;;;;;14728:18:6;;:20::i;:::-;14724:282;;;14791:46;;;-1:-1:-1;;;14791:46:6;;-1:-1:-1;;;14791:46:6;;;;;;-1:-1:-1;;;;;14791:34:6;;;;;:46;;;;;;;;;;;;;;:34;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14791:46:6;14765:135;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15026:21:6;;15018:53;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;;;;15203:14;;15194:59;;;-1:-1:-1;;;15194:59:6;;-1:-1:-1;;;;;15194:59:6;;;;;;;;;;;;;;;15256:1;;15203:14;;;;;15194:34;;:59;;;;;;;;;;;;;;;15203:14;15194:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15194:59:6;:63;15172:124;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;;;;15391:18;15412:29;;;:13;:29;;;;;;;;;15476:20;;;:8;:20;;;;;;:28;;15508:15;-1:-1:-1;15476:47:6;15454:110;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;;;16023:1393;16149:7;16173:16;:3;-1:-1:-1;;;;;16173:14:6;;:16::i;:::-;16169:545;;;16232:185;;;-1:-1:-1;;;16232:185:6;;;-1:-1:-1;;;;;16232:185:6;;;;;;;16326:10;16232:185;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;;;;;;;;16421:50;;16232:41;;;;16421:50;;16232:185;;;;;;;;;;;;;;;;:41;:185;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;-1:-1:-1;;;;;;16232:239:6;;16206:328;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;;;;16741:14;;;16726:63;;;-1:-1:-1;;;16726:63:6;;-1:-1:-1;;;;;16726:63:6;;;;;;;;;;;;;;;;;;;;;;16741:14;;;;;16726:35;;:63;;;;;16741:14;;16726:63;;;;;;;;16741:14;;16726:63;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16868:22:6;16925:28;;;:12;:28;;;;;;;;16923:30;;;;;;;;16906:47;;17058:30;;;:14;:30;;;;;;:37;16906:47;;-1:-1:-1;17028:103:6;;17058:37;;255:1:5;17028:15:6;:103::i;:::-;16988:30;;;;:14;:30;;;;;;;;:143;;-1:-1:-1;;16988:143:6;;;;;;;;;;-1:-1:-1;;17209:57:6;;;;-1:-1:-1;17333:14:6;17318:56;;-1:-1:-1;;;17318:56:6;;-1:-1:-1;;;;;17318:56:6;;;;;;;;;;;;;;;17333:14;;;;;17318:35;;:56;;;;;16988:30;17318:56;;;;;;;17333:14;17318:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17394:14:6;;16023:1393;-1:-1:-1;;;;;16023:1393:6:o;18319:468::-;18439:6;:8;;;;;;18403:18;18460:290;;;;18533:3;18523:6;;:13;;-1:-1:-1;;;18508:29:6;18495:42;;18460:290;;;-1:-1:-1;;18651:6:6;;18661:3;18651:13;;18319:468::o;718:413:26:-;1078:20;1116:8;;;718:413::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\n\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"./interfaces/IERC1155.sol\";\r\nimport \"./interfaces/IERC165.sol\";\r\nimport \"./interfaces/IERC721.sol\";\r\nimport \"./interfaces/IERC1155ERC721.sol\";\r\nimport \"./interfaces/IERC721TokenReceiver.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./UsingHelpers.sol\";\r\n\r\n//preparing for ERC-1066, ERC-1444, EIP-838\r\n\r\n/**\r\n * @title VoucherKernel contract is controlling the core business logic\r\n * @dev Notes:\r\n * - Since this is a reference app, it is not yet optimized.\r\n * In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\r\n * - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\r\n * See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\r\n */\r\n// solhint-disable-next-line\r\ncontract VoucherKernel is IVoucherKernel, Ownable, Pausable, UsingHelpers {\r\n using Address for address;\r\n using SafeMath for uint256;\r\n\r\n //AssetRegistry assetRegistry;\r\n address private tokensContract;\r\n\r\n //promise for an asset could be reusable, but simplified here for brevity\r\n struct Promise {\r\n bytes32 promiseId;\r\n uint256 nonce; //the asset that is offered\r\n address seller; //the seller who created the promise\r\n //we simplify the value for the demoapp, otherwise voucher details would be packed in one bytes32 field value\r\n uint256 validFrom;\r\n uint256 validTo;\r\n uint256 price;\r\n uint256 depositSe;\r\n uint256 depositBu;\r\n uint256 idx;\r\n }\r\n\r\n struct VoucherPaymentMethod {\r\n uint8 paymentMethod;\r\n address addressTokenPrice;\r\n address addressTokenDeposits;\r\n }\r\n\r\n address private bosonRouterAddress; //address of the Boson Router contract\r\n address private cashierAddress; //address of the Cashier contract\r\n\r\n mapping(bytes32 => Promise) private promises; //promises to deliver goods or services\r\n mapping(address => uint256) private tokenNonces; //mapping between seller address and its own nonces. Every time seller creates supply ID it gets incremented. Used to avoid duplicate ID's\r\n mapping(uint256 => VoucherPaymentMethod) private paymentDetails; // tokenSupplyId to VoucherPaymentMethod\r\n\r\n bytes32[] private promiseKeys;\r\n\r\n mapping(uint256 => bytes32) private ordersPromise; //mapping between an order (supply a.k.a. VoucherSet token) and a promise\r\n\r\n mapping(uint256 => VoucherStatus) private vouchersStatus; //recording the vouchers evolution\r\n\r\n //ID reqs\r\n mapping(uint256 => uint256) private typeCounters; //counter for ID of a particular type of NFT\r\n uint256 private constant MASK_TYPE = uint256(uint128(~0)) << 128; //the type mask in the upper 128 bits\r\n //1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private constant MASK_NF_INDEX = uint128(~0); //the non-fungible index mask in the lower 128\r\n //0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\r\n\r\n uint256 private constant TYPE_NF_BIT = 1 << 255; //the first bit represents an NFT type\r\n //1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private typeId; //base token type ... 127-bits cover 1.701411835*10^38 types (not differentiating between FTs and NFTs)\r\n /* Token IDs:\r\n Fungibles: 0, followed by 127-bit FT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <0>\r\n \r\n Non-fungible VoucherSets (supply tokens): 1, followed by 127-bit NFT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <1>\r\n */\r\n\r\n uint256 private complainPeriod;\r\n uint256 private cancelFaultPeriod;\r\n\r\n event LogPromiseCreated(\r\n bytes32 indexed _promiseId,\r\n uint256 indexed _nonce,\r\n address indexed _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _idx\r\n );\r\n\r\n event LogVoucherDelivered(\r\n uint256 indexed _tokenIdSupply,\r\n uint256 _tokenIdVoucher,\r\n address _issuer,\r\n address _holder,\r\n bytes32 _promiseId,\r\n uint256 _correlationId\r\n );\r\n\r\n event LogVoucherRedeemed(\r\n uint256 _tokenIdVoucher,\r\n address _holder,\r\n bytes32 _promiseId\r\n );\r\n\r\n event LogVoucherRefunded(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherComplain(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherFaultCancel(uint256 _tokenIdVoucher);\r\n\r\n event LogExpirationTriggered(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogFinalizeVoucher(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogBosonRouterSet(address _newBosonRouter, address _triggeredBy);\r\n\r\n event LogCashierSet(address _newCashier, address _triggeredBy);\r\n\r\n event LogComplainPeriodChanged(\r\n uint256 _newComplainPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogCancelFaultPeriodChanged(\r\n uint256 _newCancelFaultPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogVoucherSetFaultCancel(uint256 _tokenIdSupply, address _issuer);\r\n\r\n event LogFundsReleased(\r\n uint256 _tokenIdVoucher,\r\n uint8 _type //0 .. payment, 1 .. deposits\r\n );\r\n\r\n modifier onlyFromRouter() {\r\n require(bosonRouterAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == bosonRouterAddress, \"UNAUTHORIZED_BR\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyFromCashier() {\r\n require(cashierAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == cashierAddress, \"UNAUTHORIZED_C\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyVoucherOwner(uint256 _tokenIdVoucher, address _sender) {\r\n //check authorization\r\n require(\r\n IERC721(tokensContract).ownerOf(_tokenIdVoucher) == _sender,\r\n \"UNAUTHORIZED_V\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n constructor(address _tokensContract) {\r\n tokensContract = _tokensContract;\r\n\r\n complainPeriod = 7 * 1 days;\r\n cancelFaultPeriod = 7 * 1 days;\r\n }\r\n\r\n /**\r\n * @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\r\n * Only BR contract is in control of this function.\r\n */\r\n function pause() external override onlyFromRouter {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @notice Unpause the process of interaction with voucherID's (ERC-721).\r\n * Only BR contract is in control of this function.\r\n */\r\n function unpause() external override onlyFromRouter {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @notice Creating a new promise for goods or services.\r\n * Can be reused, e.g. for making different batches of these (in the future).\r\n * @param _seller seller of the promise\r\n * @param _validFrom Start of valid period\r\n * @param _validTo End of valid period\r\n * @param _price Price (payment amount)\r\n * @param _depositSe Seller's deposit\r\n * @param _depositBu Buyer's deposit\r\n */\r\n function createTokenSupplyID(\r\n address _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _price,\r\n uint256 _depositSe,\r\n uint256 _depositBu,\r\n uint256 _quantity\r\n ) external override onlyFromRouter returns (uint256) {\r\n require(_validFrom <= _validTo, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n // solhint-disable-next-line not-rely-on-time\r\n require(_validTo >= block.timestamp + 5 minutes, \"INVALID_VALIDITY_TO\"); //\"Minimum order validity is set to prevent any potential attack from flash-loans or similar.\" //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n bytes32 key;\r\n key = keccak256(\r\n abi.encodePacked(_seller, tokenNonces[_seller]++, _validFrom, _validTo)\r\n );\r\n\r\n if (promiseKeys.length > 0) {\r\n require(\r\n promiseKeys[promises[key].idx] != key,\r\n \"PROMISE_ALREADY_EXISTS\"\r\n );\r\n }\r\n\r\n promises[key] = Promise({\r\n promiseId: key,\r\n nonce: tokenNonces[_seller],\r\n seller: _seller,\r\n validFrom: _validFrom,\r\n validTo: _validTo,\r\n price: _price,\r\n depositSe: _depositSe,\r\n depositBu: _depositBu,\r\n idx: promiseKeys.length\r\n });\r\n\r\n promiseKeys.push(key);\r\n\r\n emit LogPromiseCreated(\r\n key,\r\n tokenNonces[_seller],\r\n _seller,\r\n _validFrom,\r\n _validTo,\r\n promiseKeys.length - 1\r\n );\r\n\r\n return createOrder(_seller, key, _quantity);\r\n }\r\n\r\n /**\r\n * @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\r\n * @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\r\n * @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\r\n * @param _tokenPrice token address which will hold the funds for the price of the voucher\r\n * @param _tokenDeposits token address which will hold the funds for the deposits of the voucher\r\n */\r\n function createPaymentMethod(\r\n uint256 _tokenIdSupply,\r\n uint8 _paymentMethod,\r\n address _tokenPrice,\r\n address _tokenDeposits\r\n ) external override onlyFromRouter {\r\n require(\r\n _paymentMethod > 0 &&\r\n _paymentMethod <= 4,\r\n \"INVALID PAYMENT METHOD\"\r\n );\r\n \r\n paymentDetails[_tokenIdSupply] = VoucherPaymentMethod({\r\n paymentMethod: _paymentMethod,\r\n addressTokenPrice: _tokenPrice,\r\n addressTokenDeposits: _tokenDeposits\r\n });\r\n }\r\n\r\n /**\r\n * @notice Create an order for offering a certain quantity of an asset\r\n * This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\r\n * @param _seller seller of the promise\r\n * @param _promiseId ID of a promise (simplified into asset for demo)\r\n * @param _quantity Quantity of assets on offer\r\n */\r\n function createOrder(\r\n address _seller,\r\n bytes32 _promiseId,\r\n uint256 _quantity\r\n ) private returns (uint256) {\r\n require(_promiseId != bytes32(0), \"UNSPECIFIED_PROMISE\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(promises[_promiseId].seller == _seller, \"UNAUTHORIZED_CO\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n require(_quantity > 0, \"INVALID_QUANTITY\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n uint256 tokenIdSupply = generateTokenType(true); //create & assign a new non-fungible type\r\n\r\n ordersPromise[tokenIdSupply] = _promiseId;\r\n\r\n IERC1155ERC721(tokensContract).mint(\r\n _seller,\r\n tokenIdSupply,\r\n _quantity,\r\n \"\"\r\n );\r\n\r\n return tokenIdSupply;\r\n }\r\n\r\n /**\r\n * @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\r\n * @param _tokenIdSupply ID of the supply token (ERC-1155)\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n * @param _paymentMethod method being used for that particular order that needs to be fulfilled\r\n * @param _correlationId ID of the current interaction with the smart contract for a specific user\r\n */\r\n function fillOrder(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder,\r\n uint8 _paymentMethod,\r\n uint256 _correlationId\r\n ) external override onlyFromRouter {\r\n uint8 paymentMethod = getVoucherPaymentMethod(_tokenIdSupply);\r\n\r\n //checks\r\n require(paymentMethod == _paymentMethod, \"Incorrect Payment Method\");\r\n checkOrderFillable(_tokenIdSupply, _issuer, _holder);\r\n\r\n //close order\r\n uint256 voucherTokenId = extract721(_issuer, _holder, _tokenIdSupply);\r\n\r\n emit LogVoucherDelivered(\r\n _tokenIdSupply,\r\n voucherTokenId,\r\n _issuer,\r\n _holder,\r\n getPromiseIdFromVoucherId(voucherTokenId),\r\n _correlationId\r\n );\r\n }\r\n\r\n /**\r\n * @notice Check order is fillable\r\n * @dev Will throw if checks don't pass\r\n * @param _tokenIdSupply ID of the supply token\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n */\r\n function checkOrderFillable(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder\r\n ) internal view {\r\n require(_tokenIdSupply != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n if (_holder.isContract()) {\r\n require(\r\n IERC165(_holder).supportsInterface(0x150b7a02),\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"31\"\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n require(_holder != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(\r\n IERC1155(tokensContract).balanceOf(_issuer, _tokenIdSupply) > 0,\r\n \"OFFER_EMPTY\"\r\n ); //hex\"40\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Unavailable)\r\n\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n\r\n require(\r\n promises[promiseKey].validTo >= block.timestamp,\r\n \"OFFER_EXPIRED\"\r\n );\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _to The address of the token holder\r\n * @param _tokenIdSupply ID of the token type\r\n * @return ID of the voucher token\r\n */\r\n function extract721(\r\n address _issuer,\r\n address _to,\r\n uint256 _tokenIdSupply\r\n ) internal returns (uint256) {\r\n if (_to.isContract()) {\r\n require(\r\n ERC721TokenReceiver(_to).onERC721Received(\r\n _issuer,\r\n msg.sender,\r\n _tokenIdSupply,\r\n \"\"\r\n ) == ERC721TokenReceiver(_to).onERC721Received.selector,\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, 1); // This is hardcoded as 1 on purpose\r\n\r\n //calculate tokenId\r\n uint256 voucherTokenId =\r\n _tokenIdSupply | ++typeCounters[_tokenIdSupply];\r\n\r\n //set status\r\n vouchersStatus[voucherTokenId].status = determineStatus(\r\n vouchersStatus[voucherTokenId].status,\r\n IDX_COMMIT\r\n );\r\n vouchersStatus[voucherTokenId].isPaymentReleased = false;\r\n vouchersStatus[voucherTokenId].isDepositsReleased = false;\r\n\r\n //mint voucher NFT as ERC-721\r\n IERC1155ERC721(tokensContract).mint(_to, voucherTokenId);\r\n\r\n return voucherTokenId;\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _tokenIdSupply ID of the token type\r\n * @param _qty qty that should be burned\r\n */\r\n function burnSupplyOnPause(\r\n address _issuer,\r\n uint256 _tokenIdSupply,\r\n uint256 _qty\r\n ) external override whenPaused onlyFromCashier {\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, _qty);\r\n }\r\n\r\n /**\r\n * @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\r\n * @param _isNonFungible Flag for generating NFT or FT\r\n * @return _tokenType Returns a newly generated token type\r\n */\r\n function generateTokenType(bool _isNonFungible)\r\n internal\r\n returns (uint256 _tokenType)\r\n {\r\n typeId++;\r\n\r\n if (_isNonFungible) {\r\n _tokenType = TYPE_NF_BIT | (typeId << 128); //upper bit is 1, followed by sequence, leaving lower 128-bits as 0\r\n } else {\r\n _tokenType = typeId << 128; //upper bit is not set, followed by sequence, leaving lower 128-bits as 0\r\n }\r\n\r\n return _tokenType;\r\n }\r\n\r\n /* solhint-disable */\r\n\r\n /**\r\n * @notice Redemption of the vouchers promise\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function redeem(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n //check status\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"ALREADY_PROCESSED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REDEEM\r\n );\r\n\r\n emit LogVoucherRedeemed(\r\n _tokenIdVoucher,\r\n _msgSender,\r\n tPromise.promiseId\r\n );\r\n }\r\n\r\n // // // // // // // //\r\n // UNHAPPY PATH\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Refunding a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function refund(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"INAPPLICABLE_STATUS\"\r\n ); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REFUND\r\n );\r\n\r\n emit LogVoucherRefunded(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Issue a complain for a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function complain(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_COMPLAIN),\r\n \"ALREADY_COMPLAINED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_FINAL),\r\n \"ALREADY_FINALIZED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check if still in the complain period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n //if redeemed or refunded\r\n if (\r\n isStateRedemptionSigned(vouchersStatus[_tokenIdVoucher].status) ||\r\n isStateRefunded(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if expired\r\n } else if (isStateExpired(vouchersStatus[_tokenIdVoucher].status)) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <= tPromise.validTo + complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if cancelOrFault\r\n } else if (\r\n isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_CANCEL_FAULT)\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired));\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function cancelOrFault(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n {\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n require(\r\n getSupplyHolder(tokenIdSupply) == _msgSender,\r\n \"UNAUTHORIZED_COF\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_CANCEL_FAULT), \"ALREADY_CANCELFAULT\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_REDEEM) || isStatus(tStatus, IDX_REFUND)) {\r\n //if redeemed or refunded\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //resetting the complain period\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStatus(tStatus, IDX_EXPIRE)) {\r\n //if expired\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp;\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStateCommitted(tStatus)) {\r\n //if committed only\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //complain period starts\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_CANCEL_FAULT\r\n );\r\n\r\n emit LogVoucherFaultCancel(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\r\n * @param _tokenIdSupply ID of the voucher set\r\n * @param _issuer owner of the voucher\r\n */\r\n function cancelOrFaultVoucherSet(uint256 _tokenIdSupply, address _issuer)\r\n external\r\n override\r\n onlyFromRouter\r\n whenNotPaused\r\n returns (uint256)\r\n {\r\n require(getSupplyHolder(_tokenIdSupply) == _issuer, \"UNAUTHORIZED_COF\");\r\n\r\n uint256 remQty = getRemQtyForSupply(_tokenIdSupply, _issuer);\r\n\r\n require(remQty > 0, \"OFFER_EMPTY\");\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, remQty);\r\n\r\n emit LogVoucherSetFaultCancel(_tokenIdSupply, _issuer);\r\n\r\n return remQty;\r\n }\r\n\r\n // // // // // // // //\r\n // BACK-END PROCESS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Mark voucher token that the payment was released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setPaymentReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 0);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token that the deposits were released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setDepositsReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 1);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token as expired\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerExpiration(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (\r\n tPromise.validTo < block.timestamp &&\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_EXPIRE\r\n );\r\n\r\n emit LogExpirationTriggered(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token to the final status\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerFinalizeVoucher(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n bool mark;\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_COMPLAIN)) {\r\n if (isStatus(tStatus, IDX_CANCEL_FAULT)) {\r\n //if COMPLAIN && COF: then final\r\n mark = true;\r\n } else if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod\r\n ) {\r\n //if COMPLAIN: then final after cof period\r\n mark = true;\r\n }\r\n } else if (\r\n isStatus(tStatus, IDX_CANCEL_FAULT) &&\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod\r\n ) {\r\n //if COF: then final after complain period\r\n mark = true;\r\n } else if (\r\n isStateRedemptionSigned(tStatus) || isStateRefunded(tStatus)\r\n ) {\r\n //if RDM/RFND NON_COMPLAIN: then final after complainPeriodStart + complainPeriod\r\n if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod\r\n ) {\r\n mark = true;\r\n }\r\n } else if (isStateExpired(tStatus)) {\r\n //if EXP NON_COMPLAIN: then final after validTo + complainPeriod\r\n if (block.timestamp >= tPromise.validTo + complainPeriod) {\r\n mark = true;\r\n }\r\n }\r\n\r\n if (mark) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_FINAL\r\n );\r\n emit LogFinalizeVoucher(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /* solhint-enable */\r\n\r\n // // // // // // // //\r\n // UTILS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Set the address of the new holder of a _tokenIdSupply on transfer\r\n * @param _tokenIdSupply _tokenIdSupply which will be transferred\r\n * @param _newSeller new holder of the supply\r\n */\r\n function setSupplyHolderOnTransfer(\r\n uint256 _tokenIdSupply,\r\n address _newSeller\r\n ) external override onlyFromCashier {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n promises[promiseKey].seller = _newSeller;\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Boson Router contract\r\n * @param _bosonRouterAddress The address of the BR contract\r\n */\r\n function setBosonRouterAddress(address _bosonRouterAddress)\r\n external\r\n onlyOwner\r\n {\r\n require(_bosonRouterAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n bosonRouterAddress = _bosonRouterAddress;\r\n\r\n emit LogBosonRouterSet(_bosonRouterAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Cashier contract\r\n * @param _cashierAddress The address of the BR contract\r\n */\r\n function setCashierAddress(address _cashierAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n require(_cashierAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n cashierAddress = _cashierAddress;\r\n\r\n emit LogCashierSet(_cashierAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _complainPeriod the new value for complain period (in number of seconds)\r\n */\r\n function setComplainPeriod(uint256 _complainPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n complainPeriod = _complainPeriod;\r\n\r\n emit LogComplainPeriodChanged(_complainPeriod, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)\r\n */\r\n function setCancelFaultPeriod(uint256 _cancelFaultPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n cancelFaultPeriod = _cancelFaultPeriod;\r\n\r\n emit LogCancelFaultPeriodChanged(_cancelFaultPeriod, msg.sender);\r\n }\r\n\r\n // // // // // // // //\r\n // GETTERS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Get the promise ID at specific index\r\n * @param _idx Index in the array of promise keys\r\n * @return Promise ID\r\n */\r\n function getPromiseKey(uint256 _idx)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n return promiseKeys[_idx];\r\n }\r\n\r\n /**\r\n * @notice Get the supply token ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the supply token\r\n */\r\n function getIdSupplyFromVoucher(uint256 _tokenIdVoucher)\r\n public\r\n pure\r\n override\r\n returns (uint256)\r\n {\r\n return _tokenIdVoucher & MASK_TYPE;\r\n }\r\n\r\n /**\r\n * @notice Get the promise ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromVoucherId(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n return promises[ordersPromise[tokenIdSupply]].promiseId;\r\n }\r\n\r\n /**\r\n * @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\r\n * @param _tokenSupplyId Token supply ID\r\n * @param _owner holder of the Token Supply\r\n * @return remaining quantity\r\n */\r\n function getRemQtyForSupply(uint256 _tokenSupplyId, address _owner)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return IERC1155(tokensContract).balanceOf(_owner, _tokenSupplyId);\r\n }\r\n\r\n /**\r\n * @notice Get all necessary funds for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\r\n */\r\n function getOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (\r\n promises[promiseKey].price,\r\n promises[promiseKey].depositSe,\r\n promises[promiseKey].depositBu\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get Buyer costs required to make an order for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Buyer's deposit)\r\n */\r\n function getBuyerOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256, uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (promises[promiseKey].price, promises[promiseKey].depositBu);\r\n }\r\n\r\n /**\r\n * @notice Get Seller deposit\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns sellers deposit\r\n */\r\n function getSellerDeposit(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].depositSe;\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a supply\r\n * @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\r\n * @return Address of the holder\r\n */\r\n function getSupplyHolder(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].seller;\r\n }\r\n\r\n /**\r\n * @notice Get promise data not retrieved by other accessor functions\r\n * @param _promiseKey ID of the promise\r\n * @return promise data not returned by other accessor methods\r\n */\r\n function getPromiseData(bytes32 _promiseKey)\r\n external\r\n view\r\n override\r\n returns (bytes32, uint256, uint256, uint256, uint256 )\r\n {\r\n Promise memory tPromise = promises[_promiseKey];\r\n return (tPromise.promiseId, tPromise.nonce, tPromise.validFrom, tPromise.validTo, tPromise.idx); \r\n }\r\n\r\n /**\r\n * @notice Get the current status of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Status of the voucher (via enum)\r\n */\r\n function getVoucherStatus(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (\r\n uint8,\r\n bool,\r\n bool,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n return (\r\n vouchersStatus[_tokenIdVoucher].status,\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased,\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased,\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart,\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Address of the holder\r\n */\r\n function getVoucherHolder(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return IERC721(tokensContract).ownerOf(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the price for the supply is held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherPriceToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenPrice;\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the deposits for the supply are held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherDepositToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenDeposits;\r\n }\r\n\r\n /**\r\n * @notice Get the payment method for a particular _tokenIdSupply\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return payment method\r\n */\r\n function getVoucherPaymentMethod(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint8)\r\n {\r\n return paymentDetails[_tokenIdSupply].paymentMethod;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isInValidityPeriod(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n //check validity period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n require(tPromise.validFrom <= block.timestamp, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n require(tPromise.validTo >= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isVoucherTransferable(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n return\r\n !(vouchersStatus[_tokenIdVoucher].isPaymentReleased ||\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased);\r\n }\r\n\r\n /**\r\n * @notice Get address of the Boson Router to which this contract points\r\n * @return Address of the Boson Router contract\r\n */\r\n function getBosonRouterAddress()\r\n external\r\n view\r\n override\r\n returns (address) \r\n {\r\n return bosonRouterAddress;\r\n }\r\n\r\n /**\r\n * @notice Get address of the Cashier contract to which this contract points\r\n * @return Address of the Cashier contract\r\n */\r\n function getCashierAddress()\r\n external\r\n view\r\n override\r\n returns (address)\r\n {\r\n return cashierAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the token nonce for a seller\r\n * @param _seller Address of the seller\r\n * @return The seller's nonce\r\n */\r\n function getTokenNonce(address _seller)\r\n external\r\n view\r\n override\r\n returns (uint256) \r\n {\r\n return tokenNonces[_seller];\r\n }\r\n\r\n /**\r\n * @notice Get the current type Id\r\n * @return type Id\r\n */\r\n function getTypeId()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return typeId;\r\n }\r\n\r\n /**\r\n * @notice Get the complain period\r\n * @return complain period\r\n */\r\n function getComplainPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return complainPeriod;\r\n }\r\n\r\n /**\r\n * @notice Get the cancel or fault period\r\n * @return cancel or fault period\r\n */\r\n function getCancelFaultPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return cancelFaultPeriod;\r\n }\r\n \r\n /**\r\n * @notice Get the promise ID from a voucher set\r\n * @param _tokenIdSupply ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromSupplyId(uint256 _tokenIdSupply)\r\n external\r\n view\r\n override\r\n returns (bytes32) \r\n {\r\n return ordersPromise[_tokenIdSupply];\r\n }\r\n\r\n /**\r\n * @notice Get the address of ERC1155ERC721 contract\r\n * @return Address of ERC1155ERC721 contract\r\n */\r\n function getTokensContractAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return tokensContract;\r\n }\r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", "ast": { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/VoucherKernel.sol", + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", "exportedSymbols": { "VoucherKernel": [ - 4283 + 8454 ] }, - "id": 4284, + "id": 8455, "license": "LGPL-3.0-or-later", "nodeType": "SourceUnit", "nodes": [ { - "id": 2572, + "id": 6142, "literals": [ "solidity", - ">=", - "0.6", - ".2", - "<", "0.7", - ".0" + ".1" ], "nodeType": "PragmaDirective", - "src": "47:31:8" + "src": "49:22:6" }, { "absolutePath": "@openzeppelin/contracts/utils/Address.sol", "file": "@openzeppelin/contracts/utils/Address.sol", - "id": 2573, + "id": 6143, "nodeType": "ImportDirective", - "scope": 4284, - "sourceUnit": 4817, - "src": "80:51:8", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/ERC1155ERC721.sol", - "file": "./ERC1155ERC721.sol", - "id": 2574, + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, "nodeType": "ImportDirective", - "scope": 4284, - "sourceUnit": 2211, - "src": "132:29:8", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", "symbolAliases": [], "unitAlias": "" }, { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/usingHelpers.sol", - "file": "./usingHelpers.sol", - "id": 2575, + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, "nodeType": "ImportDirective", - "scope": 4284, - "sourceUnit": 4426, - "src": "162:28:8", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", "symbolAliases": [], "unitAlias": "" }, @@ -1059,64 +1430,117 @@ "abstract": false, "baseContracts": [ { - "arguments": null, "baseName": { - "contractScope": null, - "id": 2577, - "name": "usingHelpers", + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4425, - "src": "816:12:8", + "referencedDeclaration": 13693, + "src": "1220:8:6", "typeDescriptions": { - "typeIdentifier": "t_contract$_usingHelpers_$4425", - "typeString": "contract usingHelpers" + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" } }, - "id": 2578, + "id": 6160, "nodeType": "InheritanceSpecifier", - "src": "816:12:8" + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" } ], "contractDependencies": [ - 4425 + 6140, + 9643, + 12144, + 13109, + 13693 ], "contractKind": "contract", "documentation": { - "id": 2576, + "id": 6154, "nodeType": "StructuredDocumentation", - "src": "237:552:8", - "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes: \n - Since this is a demo app, it is not yet optimized. \n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined with day-precision and the demo app is not covering all edge cases.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" }, "fullyImplemented": true, - "id": 4283, + "id": 8454, "linearizedBaseContracts": [ - 4283, - 4425 + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 ], "name": "VoucherKernel", "nodeType": "ContractDefinition", "nodes": [ { - "id": 2581, + "id": 6165, "libraryName": { - "contractScope": null, - "id": 2579, + "id": 6163, "name": "Address", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4816, - "src": "845:7:8", + "referencedDeclaration": 13086, + "src": "1256:7:6", "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4816", + "typeIdentifier": "t_contract$_Address_$13086", "typeString": "library Address" } }, "nodeType": "UsingForDirective", - "src": "839:26:8", + "src": "1250:26:6", "typeName": { - "id": 2580, + "id": 6164, "name": "address", "nodeType": "ElementaryTypeName", - "src": "857:7:8", + "src": "1268:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -1124,49 +1548,71 @@ } } }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, { "constant": false, - "id": 2583, + "id": 6170, "mutability": "mutable", "name": "tokensContract", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "1032:28:8", + "scope": 8454, + "src": "1353:30:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "contractScope": null, - "id": 2582, - "name": "ERC1155ERC721", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2210, - "src": "1032:13:8", + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, - "visibility": "internal" + "visibility": "private" }, { "canonicalName": "VoucherKernel.Promise", - "id": 2602, + "id": 6189, "members": [ { "constant": false, - "id": 2585, + "id": 6172, "mutability": "mutable", "name": "promiseId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1184:17:8", + "scope": 6189, + "src": "1497:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1174,55 +1620,51 @@ "typeString": "bytes32" }, "typeName": { - "id": 2584, + "id": 6171, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1184:7:8", + "src": "1497:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2587, + "id": 6174, "mutability": "mutable", - "name": "assetTitle", + "name": "nonce", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1211:17:8", + "scope": 6189, + "src": "1525:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2586, - "name": "string", + "id": 6173, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1211:6:8", + "src": "1525:7:6", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2589, + "id": 6176, "mutability": "mutable", "name": "seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1271:14:8", + "scope": 6189, + "src": "1577:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1230,28 +1672,26 @@ "typeString": "address" }, "typeName": { - "id": 2588, + "id": 6175, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1271:7:8", + "src": "1577:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2591, + "id": 6178, "mutability": "mutable", "name": "validFrom", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1536:17:8", + "scope": 6189, + "src": "1758:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1259,27 +1699,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2590, + "id": 6177, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1536:7:8", + "src": "1758:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2593, + "id": 6180, "mutability": "mutable", "name": "validTo", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1563:15:8", + "scope": 6189, + "src": "1786:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1287,27 +1725,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2592, + "id": 6179, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1563:7:8", + "src": "1786:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2595, + "id": 6182, "mutability": "mutable", "name": "price", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1588:13:8", + "scope": 6189, + "src": "1812:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1315,27 +1751,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2594, + "id": 6181, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1588:7:8", + "src": "1812:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2597, + "id": 6184, "mutability": "mutable", "name": "depositSe", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1611:17:8", + "scope": 6189, + "src": "1836:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1343,27 +1777,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2596, + "id": 6183, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1611:7:8", + "src": "1836:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2599, + "id": 6186, "mutability": "mutable", "name": "depositBu", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1638:17:8", + "scope": 6189, + "src": "1864:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1371,27 +1803,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2598, + "id": 6185, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1638:7:8", + "src": "1864:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2601, + "id": 6188, "mutability": "mutable", "name": "idx", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1865:8:8", + "scope": 6189, + "src": "1892:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1399,35 +1829,123 @@ "typeString": "uint256" }, "typeName": { - "id": 2600, - "name": "uint", + "id": 6187, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1865:4:8", + "src": "1892:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], "name": "Promise", "nodeType": "StructDefinition", - "scope": 4283, - "src": "1159:721:8", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", "visibility": "public" }, { "constant": false, - "functionSelector": "8da5cb5b", - "id": 2604, + "id": 6198, "mutability": "mutable", - "name": "owner", + "name": "bosonRouterAddress", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "1890:20:8", + "scope": 8454, + "src": "2068:34:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1435,29 +1953,26 @@ "typeString": "address" }, "typeName": { - "id": 2603, + "id": 6197, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1890:7:8", + "src": "2068:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "4f755c3e", - "id": 2606, + "id": 6200, "mutability": "mutable", "name": "cashierAddress", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "1943:29:8", + "scope": 8454, + "src": "2148:30:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1465,118 +1980,72 @@ "typeString": "address" }, "typeName": { - "id": 2605, + "id": 6199, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1943:7:8", + "src": "2148:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "cc2f84cb", - "id": 2610, + "id": 6204, "mutability": "mutable", "name": "promises", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2022:43:8", + "scope": 8454, + "src": "2221:44:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" }, "typeName": { - "id": 2609, + "id": 6203, "keyType": { - "id": 2607, + "id": 6201, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2030:7:8", + "src": "2229:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "2022:27:8", + "src": "2221:27:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" }, "valueType": { - "contractScope": null, - "id": 2608, + "id": 6202, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "2041:7:8", + "referencedDeclaration": 6189, + "src": "2240:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } } }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "16ed9e0e", - "id": 2613, - "mutability": "mutable", - "name": "promiseKeys", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2114:28:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 2611, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2114:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2612, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2114:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "e598d697", - "id": 2617, + "id": 6208, "mutability": "mutable", - "name": "accountSupply", + "name": "tokenNonces", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2153:48:8", + "scope": 8454, + "src": "2312:47:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1584,326 +2053,216 @@ "typeString": "mapping(address => uint256)" }, "typeName": { - "id": 2616, + "id": 6207, "keyType": { - "id": 2614, + "id": 6205, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2161:7:8", + "src": "2320:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "2153:27:8", + "src": "2312:27:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 2615, + "id": 6206, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2172:7:8", + "src": "2331:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "75a83102", - "id": 2621, + "id": 6212, "mutability": "mutable", - "name": "ordersPromise", + "name": "paymentDetails", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2207:48:8", + "scope": 8454, + "src": "2505:63:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" }, "typeName": { - "id": 2620, + "id": 6211, "keyType": { - "id": 2618, + "id": 6209, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2215:7:8", + "src": "2513:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "2207:27:8", + "src": "2505:40:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" }, "valueType": { - "id": 2619, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2226:7:8", + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" } } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "ec29c17d", - "id": 2625, + "id": 6215, "mutability": "mutable", - "name": "vouchersStatus", + "name": "promiseKeys", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2324:55:8", + "scope": 8454, + "src": "2618:29:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus)" + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" }, "typeName": { - "id": 2624, - "keyType": { - "id": 2622, - "name": "uint256", + "baseType": { + "id": 6213, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2332:7:8", + "src": "2618:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "nodeType": "Mapping", - "src": "2324:33:8", + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus)" - }, - "valueType": { - "contractScope": null, - "id": 2623, - "name": "VoucherStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4321, - "src": "2343:13:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage_ptr", - "typeString": "struct usingHelpers.VoucherStatus" - } + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "9be905a1", - "id": 2629, + "id": 6219, "mutability": "mutable", - "name": "voucherIssuers", + "name": "ordersPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2423:49:8", + "scope": 8454, + "src": "2656:49:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" }, "typeName": { - "id": 2628, + "id": 6218, "keyType": { - "id": 2626, + "id": 6216, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2431:7:8", + "src": "2664:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "2423:27:8", + "src": "2656:27:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" }, "valueType": { - "id": 2627, - "name": "address", + "id": 6217, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "2442:7:8", - "stateMutability": "nonpayable", + "src": "2675:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "id": 2635, + "id": 6223, "mutability": "mutable", - "name": "balances", + "name": "vouchersStatus", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2526:65:8", + "scope": 8454, + "src": "2788:56:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" }, "typeName": { - "id": 2634, + "id": 6222, "keyType": { - "id": 2630, + "id": 6220, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2535:7:8", + "src": "2796:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "2526:48:8", + "src": "2788:33:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" }, "valueType": { - "id": 2633, - "keyType": { - "id": 2631, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2554:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2546:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2565:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2641, - "mutability": "mutable", - "name": "operatorApprovals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2634:71:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - }, - "typeName": { - "id": 2640, - "keyType": { - "id": 2636, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2643:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2634:45:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - }, - "valueType": { - "id": 2639, - "keyType": { - "id": 2637, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2662:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2654:24:8", + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "valueType": { - "id": 2638, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2673:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" } } }, - "value": null, "visibility": "private" }, { "constant": false, - "functionSelector": "99c849b8", - "id": 2645, + "id": 6227, "mutability": "mutable", "name": "typeCounters", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2768:48:8", + "scope": 8454, + "src": "2903:48:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1911,47 +2270,44 @@ "typeString": "mapping(uint256 => uint256)" }, "typeName": { - "id": 2644, + "id": 6226, "keyType": { - "id": 2642, + "id": 6224, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2777:7:8", + "src": "2911:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "2768:28:8", + "src": "2903:27:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 2643, + "id": 6225, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2788:7:8", + "src": "2922:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": true, - "functionSelector": "7ed06c44", - "id": 2657, + "id": 6239, "mutability": "constant", "name": "MASK_TYPE", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2877:63:8", + "scope": 8454, + "src": "3003:64:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1959,35 +2315,31 @@ "typeString": "uint256" }, "typeName": { - "id": 2646, + "id": 6228, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2877:7:8", + "src": "3003:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2656, + "id": 6238, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2652, + "id": 6234, "isConstant": false, "isLValue": false, "isPure": true, @@ -1995,19 +2347,17 @@ "nodeType": "UnaryOperation", "operator": "~", "prefix": true, - "src": "2929:2:8", + "src": "3056:2:6", "subExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 2651, + "id": 6233, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2930:1:8", - "subdenomination": null, + "src": "3057:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -2027,29 +2377,26 @@ "typeString": "int_const -1" } ], - "id": 2650, + "id": 6232, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2921:7:8", + "src": "3048:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint128_$", "typeString": "type(uint128)" }, "typeName": { - "id": 2649, + "id": 6231, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "2921:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "3048:7:6", + "typeDescriptions": {} } }, - "id": 2653, + "id": 6235, "isConstant": false, "isLValue": false, "isPure": true, @@ -2057,7 +2404,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2921:11:8", + "src": "3048:11:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint128", @@ -2072,29 +2419,26 @@ "typeString": "uint128" } ], - "id": 2648, + "id": 6230, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "2913:7:8", + "src": "3040:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { - "id": 2647, + "id": 6229, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2913:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "3040:7:6", + "typeDescriptions": {} } }, - "id": 2654, + "id": 6236, "isConstant": false, "isLValue": false, "isPure": true, @@ -2102,7 +2446,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2913:20:8", + "src": "3040:20:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -2112,41 +2456,37 @@ "nodeType": "BinaryOperation", "operator": "<<", "rightExpression": { - "argumentTypes": null, "hexValue": "313238", - "id": 2655, + "id": 6237, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2937:3:8", - "subdenomination": null, + "src": "3064:3:6", "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, - "src": "2913:27:8", + "src": "3040:27:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "visibility": "public" + "visibility": "private" }, { "constant": true, - "functionSelector": "21d6f3a7", - "id": 2664, + "id": 6246, "mutability": "constant", "name": "MASK_NF_INDEX", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "3248:51:8", + "scope": 8454, + "src": "3378:52:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2154,21 +2494,19 @@ "typeString": "uint256" }, "typeName": { - "id": 2658, + "id": 6240, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3248:7:8", + "src": "3378:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2662, + "id": 6244, "isConstant": false, "isLValue": false, "isPure": true, @@ -2176,19 +2514,17 @@ "nodeType": "UnaryOperation", "operator": "~", "prefix": true, - "src": "3296:2:8", + "src": "3427:2:6", "subExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 2661, + "id": 6243, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3297:1:8", - "subdenomination": null, + "src": "3428:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -2208,29 +2544,26 @@ "typeString": "int_const -1" } ], - "id": 2660, + "id": 6242, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "3288:7:8", + "src": "3419:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint128_$", "typeString": "type(uint128)" }, "typeName": { - "id": 2659, + "id": 6241, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "3288:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "3419:7:6", + "typeDescriptions": {} } }, - "id": 2663, + "id": 6245, "isConstant": false, "isLValue": false, "isPure": true, @@ -2238,25 +2571,23 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3288:11:8", + "src": "3419:11:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" } }, - "visibility": "public" + "visibility": "private" }, { "constant": true, - "functionSelector": "d905af55", - "id": 2669, + "id": 6251, "mutability": "constant", "name": "TYPE_NF_BIT", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "3623:46:8", + "scope": 8454, + "src": "3750:47:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2264,38 +2595,35 @@ "typeString": "uint256" }, "typeName": { - "id": 2665, + "id": 6247, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3623:7:8", + "src": "3750:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", "typeString": "int_const 5789...(69 digits omitted)...9968" }, - "id": 2668, + "id": 6250, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "hexValue": "31", - "id": 2666, + "id": 6248, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3661:1:8", - "subdenomination": null, + "src": "3789:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -2305,41 +2633,37 @@ "nodeType": "BinaryOperation", "operator": "<<", "rightExpression": { - "argumentTypes": null, "hexValue": "323535", - "id": 2667, + "id": 6249, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3666:3:8", - "subdenomination": null, + "src": "3794:3:6", "typeDescriptions": { "typeIdentifier": "t_rational_255_by_1", "typeString": "int_const 255" }, "value": "255" }, - "src": "3661:8:8", + "src": "3789:8:6", "typeDescriptions": { "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", "typeString": "int_const 5789...(69 digits omitted)...9968" } }, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "8f940f63", - "id": 2671, + "id": 6253, "mutability": "mutable", "name": "typeId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "3982:21:8", + "scope": 8454, + "src": "4109:22:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2347,28 +2671,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2670, + "id": 6252, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "3982:7:8", + "src": "4109:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "f3223bed", - "id": 2673, + "id": 6255, "mutability": "mutable", "name": "complainPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "4670:29:8", + "scope": 8454, + "src": "4820:30:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2376,28 +2697,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2672, + "id": 6254, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4670:7:8", + "src": "4820:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "constant": false, - "functionSelector": "76942aed", - "id": 2675, + "id": 6257, "mutability": "mutable", "name": "cancelFaultPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "4753:32:8", + "scope": 8454, + "src": "4857:33:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2405,38 +2723,35 @@ "typeString": "uint256" }, "typeName": { - "id": 2674, + "id": 6256, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4753:7:8", + "src": "4857:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "public" + "visibility": "private" }, { "anonymous": false, - "documentation": null, - "id": 2689, + "id": 6271, "name": "LogPromiseCreated", "nodeType": "EventDefinition", "parameters": { - "id": 2688, + "id": 6270, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2677, + "id": 6259, "indexed": true, "mutability": "mutable", "name": "_promiseId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4882:26:8", + "scope": 6271, + "src": "4933:26:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2444,57 +2759,53 @@ "typeString": "bytes32" }, "typeName": { - "id": 2676, + "id": 6258, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "4882:7:8", + "src": "4933:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2679, + "id": 6261, "indexed": true, "mutability": "mutable", - "name": "_assetTitle", + "name": "_nonce", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4918:26:8", + "scope": 6271, + "src": "4970:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2678, - "name": "string", + "id": 6260, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4918:6:8", + "src": "4970:7:6", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2681, + "id": 6263, "indexed": true, "mutability": "mutable", "name": "_seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4954:23:8", + "scope": 6271, + "src": "5003:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2502,29 +2813,27 @@ "typeString": "address" }, "typeName": { - "id": 2680, + "id": 6262, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4954:7:8", + "src": "5003:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2683, + "id": 6265, "indexed": false, "mutability": "mutable", "name": "_validFrom", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4987:18:8", + "scope": 6271, + "src": "5037:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2532,28 +2841,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2682, + "id": 6264, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4987:7:8", + "src": "5037:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2685, + "id": 6267, "indexed": false, "mutability": "mutable", "name": "_validTo", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "5015:16:8", + "scope": 6271, + "src": "5066:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2561,28 +2868,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2684, + "id": 6266, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5015:7:8", + "src": "5066:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2687, + "id": 6269, "indexed": false, "mutability": "mutable", "name": "_idx", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "5200:12:8", + "scope": 6271, + "src": "5093:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2590,43 +2895,218 @@ "typeString": "uint256" }, "typeName": { - "id": 2686, + "id": 6268, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5200:7:8", + "src": "5093:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "4872:346:8" + "src": "4922:190:6" }, - "src": "4849:370:8" + "src": "4899:214:6" }, { "anonymous": false, - "documentation": null, - "id": 2697, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, "name": "LogVoucherRedeemed", "nodeType": "EventDefinition", "parameters": { - "id": 2696, + "id": 6292, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2691, + "id": 6287, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2697, - "src": "5263:23:8", + "scope": 6293, + "src": "5386:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2634,28 +3114,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2690, + "id": 6286, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5263:7:8", + "src": "5386:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2693, + "id": 6289, "indexed": false, "mutability": "mutable", "name": "_holder", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2697, - "src": "5296:15:8", + "scope": 6293, + "src": "5420:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2663,29 +3141,27 @@ "typeString": "address" }, "typeName": { - "id": 2692, + "id": 6288, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5296:7:8", + "src": "5420:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2695, + "id": 6291, "indexed": false, "mutability": "mutable", "name": "_promiseId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2697, - "src": "5321:18:8", + "scope": 6293, + "src": "5446:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2693,43 +3169,40 @@ "typeString": "bytes32" }, "typeName": { - "id": 2694, + "id": 6290, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "5321:7:8", + "src": "5446:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "5253:92:8" + "src": "5375:96:6" }, - "src": "5229:117:8" + "src": "5351:121:6" }, { "anonymous": false, - "documentation": null, - "id": 2701, + "id": 6297, "name": "LogVoucherRefunded", "nodeType": "EventDefinition", "parameters": { - "id": 2700, + "id": 6296, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2699, + "id": 6295, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2701, - "src": "5390:23:8", + "scope": 6297, + "src": "5505:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2737,43 +3210,40 @@ "typeString": "uint256" }, "typeName": { - "id": 2698, + "id": 6294, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5390:7:8", + "src": "5505:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "5380:39:8" + "src": "5504:25:6" }, - "src": "5356:64:8" + "src": "5480:50:6" }, { "anonymous": false, - "documentation": null, - "id": 2705, + "id": 6301, "name": "LogVoucherComplain", "nodeType": "EventDefinition", "parameters": { - "id": 2704, + "id": 6300, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2703, + "id": 6299, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2705, - "src": "5464:23:8", + "scope": 6301, + "src": "5563:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2781,43 +3251,40 @@ "typeString": "uint256" }, "typeName": { - "id": 2702, + "id": 6298, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5464:7:8", + "src": "5563:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "5454:39:8" + "src": "5562:25:6" }, - "src": "5430:64:8" + "src": "5538:50:6" }, { "anonymous": false, - "documentation": null, - "id": 2709, + "id": 6305, "name": "LogVoucherFaultCancel", "nodeType": "EventDefinition", "parameters": { - "id": 2708, + "id": 6304, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2707, + "id": 6303, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2709, - "src": "5541:23:8", + "scope": 6305, + "src": "5624:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2825,43 +3292,40 @@ "typeString": "uint256" }, "typeName": { - "id": 2706, + "id": 6302, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5541:7:8", + "src": "5624:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "5531:39:8" + "src": "5623:25:6" }, - "src": "5504:67:8" + "src": "5596:53:6" }, { "anonymous": false, - "documentation": null, - "id": 2715, + "id": 6311, "name": "LogExpirationTriggered", "nodeType": "EventDefinition", "parameters": { - "id": 2714, + "id": 6310, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2711, + "id": 6307, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2715, - "src": "5619:23:8", + "scope": 6311, + "src": "5686:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2869,28 +3333,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2710, + "id": 6306, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5619:7:8", + "src": "5686:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2713, + "id": 6309, "indexed": false, "mutability": "mutable", "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2715, - "src": "5652:20:8", + "scope": 6311, + "src": "5711:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2898,44 +3360,41 @@ "typeString": "address" }, "typeName": { - "id": 2712, + "id": 6308, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5652:7:8", + "src": "5711:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "5609:69:8" + "src": "5685:47:6" }, - "src": "5581:98:8" + "src": "5657:76:6" }, { "anonymous": false, - "documentation": null, - "id": 2721, + "id": 6317, "name": "LogFinalizeVoucher", "nodeType": "EventDefinition", "parameters": { - "id": 2720, + "id": 6316, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2717, + "id": 6313, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "5723:23:8", + "scope": 6317, + "src": "5766:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2943,28 +3402,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2716, + "id": 6312, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5723:7:8", + "src": "5766:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2719, + "id": 6315, "indexed": false, "mutability": "mutable", "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "5756:20:8", + "scope": 6317, + "src": "5791:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2972,44 +3429,111 @@ "typeString": "address" }, "typeName": { - "id": 2718, + "id": 6314, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5756:7:8", + "src": "5791:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "5713:69:8" + "src": "5765:47:6" }, - "src": "5689:94:8" + "src": "5741:72:6" }, { "anonymous": false, - "documentation": null, - "id": 2727, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, "name": "LogCashierSet", "nodeType": "EventDefinition", "parameters": { - "id": 2726, + "id": 6328, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2723, + "id": 6325, "indexed": false, "mutability": "mutable", "name": "_newCashier", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2727, - "src": "5822:19:8", + "scope": 6329, + "src": "5920:19:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3017,29 +3541,27 @@ "typeString": "address" }, "typeName": { - "id": 2722, + "id": 6324, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5822:7:8", + "src": "5920:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2725, + "id": 6327, "indexed": false, "mutability": "mutable", "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2727, - "src": "5851:20:8", + "scope": 6329, + "src": "5941:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3047,44 +3569,41 @@ "typeString": "address" }, "typeName": { - "id": 2724, + "id": 6326, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5851:7:8", + "src": "5941:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "5812:65:8" + "src": "5919:43:6" }, - "src": "5793:85:8" + "src": "5900:63:6" }, { "anonymous": false, - "documentation": null, - "id": 2733, + "id": 6335, "name": "LogComplainPeriodChanged", "nodeType": "EventDefinition", "parameters": { - "id": 2732, + "id": 6334, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2729, + "id": 6331, "indexed": false, "mutability": "mutable", "name": "_newComplainPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2733, - "src": "5928:26:8", + "scope": 6335, + "src": "6012:26:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3092,28 +3611,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2728, + "id": 6330, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5928:7:8", + "src": "6012:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2731, + "id": 6333, "indexed": false, "mutability": "mutable", "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2733, - "src": "5964:20:8", + "scope": 6335, + "src": "6049:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3121,44 +3638,41 @@ "typeString": "address" }, "typeName": { - "id": 2730, + "id": 6332, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5964:7:8", + "src": "6049:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "5918:72:8" + "src": "6001:75:6" }, - "src": "5888:103:8" + "src": "5971:106:6" }, { "anonymous": false, - "documentation": null, - "id": 2739, + "id": 6341, "name": "LogCancelFaultPeriodChanged", "nodeType": "EventDefinition", "parameters": { - "id": 2738, + "id": 6340, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2735, + "id": 6337, "indexed": false, "mutability": "mutable", "name": "_newCancelFaultPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2739, - "src": "6044:29:8", + "scope": 6341, + "src": "6129:29:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3166,28 +3680,95 @@ "typeString": "uint256" }, "typeName": { - "id": 2734, + "id": 6336, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6044:7:8", + "src": "6129:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2737, + "id": 6339, "indexed": false, "mutability": "mutable", "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2739, - "src": "6083:20:8", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3195,44 +3776,41 @@ "typeString": "address" }, "typeName": { - "id": 2736, + "id": 6344, "name": "address", "nodeType": "ElementaryTypeName", - "src": "6083:7:8", + "src": "6260:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "6034:75:8" + "src": "6235:41:6" }, - "src": "6001:109:8" + "src": "6205:72:6" }, { "anonymous": false, - "documentation": null, - "id": 2745, + "id": 6353, "name": "LogFundsReleased", "nodeType": "EventDefinition", "parameters": { - "id": 2744, + "id": 6352, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2741, + "id": 6349, "indexed": false, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2745, - "src": "6156:23:8", + "scope": 6353, + "src": "6318:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3240,28 +3818,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2740, + "id": 6348, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6156:7:8", + "src": "6318:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2743, + "id": 6351, "indexed": false, "mutability": "mutable", "name": "_type", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2745, - "src": "6189:11:8", + "scope": 6353, + "src": "6352:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3269,68 +3845,216 @@ "typeString": "uint8" }, "typeName": { - "id": 2742, + "id": 6350, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "6189:5:8", + "src": "6352:5:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "src": "6146:94:8" + "src": "6307:93:6" }, - "src": "6124:117:8" + "src": "6285:116:6" }, { "body": { - "id": 2756, + "id": 6374, "nodeType": "Block", - "src": "6269:160:8", + "src": "6435:335:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2751, + "id": 6361, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], "expression": { - "argumentTypes": null, - "id": 2748, + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "6287:3:8", + "src": "6614:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2749, + "id": 6367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6287:10:8", + "src": "6614:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3339,41 +4063,38 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, - "id": 2750, - "name": "owner", + "id": 6368, + "name": "bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "6301:5:8", + "referencedDeclaration": 6198, + "src": "6628:18:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "6287:19:8", + "src": "6614:32:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f4f", - "id": 2752, + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6308:16:8", - "subdenomination": null, + "src": "6648:17:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", - "typeString": "literal_string \"UNAUTHORIZED_O\"" + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" }, - "value": "UNAUTHORIZED_O" + "value": "UNAUTHORIZED_BR" } ], "expression": { @@ -3383,11 +4104,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", - "typeString": "literal_string \"UNAUTHORIZED_O\"" + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" } ], - "id": 2747, + "id": 6365, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3395,13 +4116,13 @@ -18 ], "referencedDeclaration": -18, - "src": "6279:7:8", + "src": "6606:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2753, + "id": 6371, "isConstant": false, "isLValue": false, "isPure": false, @@ -3409,68 +4130,63 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6279:46:8", + "src": "6606:60:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2754, + "id": 6372, "nodeType": "ExpressionStatement", - "src": "6279:46:8" + "src": "6606:60:6" }, { - "id": 2755, + "id": 6373, "nodeType": "PlaceholderStatement", - "src": "6421:1:8" + "src": "6761:1:6" } ] }, - "documentation": null, - "id": 2757, - "name": "onlyOwner", + "id": 6375, + "name": "onlyFromRouter", "nodeType": "ModifierDefinition", - "overrides": null, "parameters": { - "id": 2746, + "id": 6354, "nodeType": "ParameterList", "parameters": [], - "src": "6266:2:8" + "src": "6432:2:6" }, - "src": "6248:181:8", + "src": "6409:361:6", "virtual": false, "visibility": "internal" }, { "body": { - "id": 2778, + "id": 6396, "nodeType": "Block", - "src": "6466:330:8", + "src": "6805:326:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2765, + "id": 6383, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 2760, + "id": 6378, "name": "cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2606, - "src": "6484:14:8", + "referencedDeclaration": 6200, + "src": "6824:14:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3479,20 +4195,17 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30", - "id": 2763, + "id": 6381, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6510:1:8", - "subdenomination": null, + "src": "6850:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -3507,29 +4220,26 @@ "typeString": "int_const 0" } ], - "id": 2762, + "id": 6380, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "6502:7:8", + "src": "6842:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 2761, + "id": 6379, "name": "address", "nodeType": "ElementaryTypeName", - "src": "6502:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "6842:7:6", + "typeDescriptions": {} } }, - "id": 2764, + "id": 6382, "isConstant": false, "isLValue": false, "isPure": true, @@ -3537,36 +4247,34 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6502:10:8", + "src": "6842:10:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "6484:28:8", + "src": "6824:28:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f43415348494552", - "id": 2766, + "hexValue": "554e5350454349464945445f4252", + "id": 6384, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6514:21:8", - "subdenomination": null, + "src": "6854:16:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_355ef3ceecaf23aa0abe4f0994c54ae288965bb10a11151e3280e2f1478e2286", - "typeString": "literal_string \"UNSPECIFIED_CASHIER\"" + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" }, - "value": "UNSPECIFIED_CASHIER" + "value": "UNSPECIFIED_BR" } ], "expression": { @@ -3576,11 +4284,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_355ef3ceecaf23aa0abe4f0994c54ae288965bb10a11151e3280e2f1478e2286", - "typeString": "literal_string \"UNSPECIFIED_CASHIER\"" + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" } ], - "id": 2759, + "id": 6377, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3588,13 +4296,13 @@ -18 ], "referencedDeclaration": -18, - "src": "6476:7:8", + "src": "6816:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2767, + "id": 6385, "isConstant": false, "isLValue": false, "isPure": false, @@ -3602,56 +4310,51 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6476:60:8", + "src": "6816:55:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2768, + "id": 6386, "nodeType": "ExpressionStatement", - "src": "6476:60:8" + "src": "6816:55:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2773, + "id": 6391, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 2770, + "id": 6388, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "6645:3:8", + "src": "6980:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 2771, + "id": 6389, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6645:10:8", + "src": "6980:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3660,36 +4363,33 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, - "id": 2772, + "id": 6390, "name": "cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2606, - "src": "6659:14:8", + "referencedDeclaration": 6200, + "src": "6994:14:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "6645:28:8", + "src": "6980:28:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e415554484f52495a45445f43", - "id": 2774, + "id": 6392, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6675:16:8", - "subdenomination": null, + "src": "7010:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", "typeString": "literal_string \"UNAUTHORIZED_C\"" @@ -3708,7 +4408,7 @@ "typeString": "literal_string \"UNAUTHORIZED_C\"" } ], - "id": 2769, + "id": 6387, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3716,13 +4416,13 @@ -18 ], "referencedDeclaration": -18, - "src": "6637:7:8", + "src": "6972:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2775, + "id": 6393, "isConstant": false, "isLValue": false, "isPure": false, @@ -3730,71 +4430,65 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6637:55:8", + "src": "6972:55:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2776, + "id": 6394, "nodeType": "ExpressionStatement", - "src": "6637:55:8" + "src": "6972:55:6" }, { - "id": 2777, + "id": 6395, "nodeType": "PlaceholderStatement", - "src": "6788:1:8" + "src": "7122:1:6" } ] }, - "documentation": null, - "id": 2779, + "id": 6397, "name": "onlyFromCashier", "nodeType": "ModifierDefinition", - "overrides": null, "parameters": { - "id": 2758, + "id": 6376, "nodeType": "ParameterList", "parameters": [], - "src": "6463:2:8" + "src": "6802:2:6" }, - "src": "6439:357:8", + "src": "6778:353:6", "virtual": false, "visibility": "internal" }, { "body": { - "id": 2795, + "id": 6416, "nodeType": "Block", - "src": "6857:224:8", + "src": "7207:269:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2790, + "id": 6411, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2786, + "id": 6408, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2781, - "src": "6928:15:8", + "referencedDeclaration": 6399, + "src": "7303:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3809,33 +4503,68 @@ } ], "expression": { - "argumentTypes": null, - "id": 2784, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "6905:14:8", + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" } }, - "id": 2785, + "id": 6407, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "ownerOf", "nodeType": "MemberAccess", - "referencedDeclaration": 1426, - "src": "6905:22:8", + "referencedDeclaration": 9164, + "src": "7271:31:6", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", "typeString": "function (uint256) view external returns (address)" } }, - "id": 2787, + "id": 6409, "isConstant": false, "isLValue": false, "isPure": false, @@ -3843,7 +4572,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6905:39:8", + "src": "7271:48:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -3853,52 +4582,33 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2788, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "6948:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6948:10:8", + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "6905:53:8", + "src": "7271:59:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e415554484f52495a45445f56", - "id": 2791, + "id": 6412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6960:16:8", - "subdenomination": null, + "src": "7345:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", "typeString": "literal_string \"UNAUTHORIZED_V\"" @@ -3917,7 +4627,7 @@ "typeString": "literal_string \"UNAUTHORIZED_V\"" } ], - "id": 2783, + "id": 6403, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -3925,13 +4635,13 @@ -18 ], "referencedDeclaration": -18, - "src": "6897:7:8", + "src": "7249:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2792, + "id": 6413, "isConstant": false, "isLValue": false, "isPure": false, @@ -3939,42 +4649,39 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6897:80:8", + "src": "7249:123:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2793, + "id": 6414, "nodeType": "ExpressionStatement", - "src": "6897:80:8" + "src": "7249:123:6" }, { - "id": 2794, + "id": 6415, "nodeType": "PlaceholderStatement", - "src": "7073:1:8" + "src": "7467:1:6" } ] }, - "documentation": null, - "id": 2796, + "id": 6417, "name": "onlyVoucherOwner", "nodeType": "ModifierDefinition", - "overrides": null, "parameters": { - "id": 2782, + "id": 6402, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2781, + "id": 6399, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2796, - "src": "6832:23:8", + "scope": 6417, + "src": "7165:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3982,47 +4689,71 @@ "typeString": "uint256" }, "typeName": { - "id": 2780, + "id": 6398, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6832:7:8", + "src": "7165:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "6831:25:8" + "src": "7164:42:6" }, - "src": "6806:275:8", + "src": "7139:337:6", "virtual": false, "visibility": "internal" }, { "body": { - "id": 2824, + "id": 6438, "nodeType": "Block", - "src": "7196:315:8", + "src": "7521:132:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 2804, + "id": 6424, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 2801, - "name": "owner", + "id": 6422, + "name": "tokensContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "7206:5:8", + "referencedDeclaration": 6170, + "src": "7532:14:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4031,143 +4762,41 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2802, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "7214:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7214:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7206:18:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2805, - "nodeType": "ExpressionStatement", - "src": "7206:18:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2806, - "name": "tokensContract", + "id": 6423, + "name": "_tokensContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "7234:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2808, - "name": "_tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2798, - "src": "7265:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2807, - "name": "ERC1155ERC721", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2210, - "src": "7251:13:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC1155ERC721_$2210_$", - "typeString": "type(contract ERC1155ERC721)" - } - }, - "id": 2809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7251:30:8", - "tryCall": false, + "referencedDeclaration": 6419, + "src": "7549:15:6", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "7234:47:8", + "src": "7532:32:6", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 2811, + "id": 6425, "nodeType": "ExpressionStatement", - "src": "7234:47:8" + "src": "7532:32:6" }, { "expression": { - "argumentTypes": null, - "id": 2816, + "id": 6430, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 2812, + "id": 6426, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "7437:14:8", + "referencedDeclaration": 6255, + "src": "7577:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4176,28 +4805,25 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_rational_604800_by_1", "typeString": "int_const 604800" }, - "id": 2815, + "id": 6429, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "hexValue": "37", - "id": 2813, + "id": 6427, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7454:1:8", - "subdenomination": null, + "src": "7594:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_7_by_1", "typeString": "int_const 7" @@ -4207,16 +4833,15 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "argumentTypes": null, "hexValue": "31", - "id": 2814, + "id": 6428, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7458:6:8", + "src": "7598:6:6", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_86400_by_1", @@ -4224,38 +4849,36 @@ }, "value": "1" }, - "src": "7454:10:8", + "src": "7594:10:6", "typeDescriptions": { "typeIdentifier": "t_rational_604800_by_1", "typeString": "int_const 604800" } }, - "src": "7437:27:8", + "src": "7577:27:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2817, + "id": 6431, "nodeType": "ExpressionStatement", - "src": "7437:27:8" + "src": "7577:27:6" }, { "expression": { - "argumentTypes": null, - "id": 2822, + "id": 6436, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 2818, + "id": 6432, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "7474:17:8", + "referencedDeclaration": 6257, + "src": "7615:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4264,28 +4887,25 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_rational_604800_by_1", "typeString": "int_const 604800" }, - "id": 2821, + "id": 6435, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "hexValue": "37", - "id": 2819, + "id": 6433, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7494:1:8", - "subdenomination": null, + "src": "7635:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_7_by_1", "typeString": "int_const 7" @@ -4295,16 +4915,15 @@ "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { - "argumentTypes": null, "hexValue": "31", - "id": 2820, + "id": 6434, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7498:6:8", + "src": "7639:6:6", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_86400_by_1", @@ -4312,45 +4931,42 @@ }, "value": "1" }, - "src": "7494:10:8", + "src": "7635:10:6", "typeDescriptions": { "typeIdentifier": "t_rational_604800_by_1", "typeString": "int_const 604800" } }, - "src": "7474:30:8", + "src": "7615:30:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 2823, + "id": 6437, "nodeType": "ExpressionStatement", - "src": "7474:30:8" + "src": "7615:30:6" } ] }, - "documentation": null, - "id": 2825, + "id": 6439, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 2799, + "id": 6420, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2798, + "id": 6419, "mutability": "mutable", "name": "_tokensContract", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2825, - "src": "7146:23:8", + "scope": 6439, + "src": "7496:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4358,63 +4974,264 @@ "typeString": "address" }, "typeName": { - "id": 2797, + "id": 6418, "name": "address", "nodeType": "ElementaryTypeName", - "src": "7146:7:8", + "src": "7496:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "7102:73:8" + "src": "7495:25:6" }, "returnParameters": { - "id": 2800, + "id": 6421, "nodeType": "ParameterList", "parameters": [], - "src": "7196:0:8" + "src": "7521:0:6" }, - "scope": 4283, - "src": "7091:420:8", + "scope": 8454, + "src": "7484:169:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], "body": { - "id": 2932, + "id": 6460, "nodeType": "Block", - "src": "8449:1324:8", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2850, + "id": 6487, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 2848, + "id": 6485, "name": "_validFrom", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8476:10:8", + "referencedDeclaration": 6466, + "src": "8913:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4423,36 +5240,33 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, - "id": 2849, + "id": 6486, "name": "_validTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8490:8:8", + "referencedDeclaration": 6468, + "src": "8927:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8476:22:8", + "src": "8913:22:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "494e56414c49445f56414c49444954595f46524f4d", - "id": 2851, + "id": 6488, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8500:23:8", - "subdenomination": null, + "src": "8937:23:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" @@ -4471,7 +5285,7 @@ "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" } ], - "id": 2847, + "id": 6484, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -4479,13 +5293,13 @@ -18 ], "referencedDeclaration": -18, - "src": "8468:7:8", + "src": "8905:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2852, + "id": 6489, "isConstant": false, "isLValue": false, "isPure": false, @@ -4493,40 +5307,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8468:56:8", + "src": "8905:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2853, + "id": 6490, "nodeType": "ExpressionStatement", - "src": "8468:56:8" + "src": "8905:56:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2858, + "id": 6497, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 2855, + "id": 6492, "name": "_validTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8628:8:8", + "referencedDeclaration": 6468, + "src": "9118:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4535,52 +5346,82 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2856, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "8640:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 2857, + "id": 6496, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8640:15:8", + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8628:27:8", + "src": "9118:39:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "494e56414c49445f56414c49444954595f544f", - "id": 2859, + "id": 6498, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8657:21:8", - "subdenomination": null, + "src": "9159:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", "typeString": "literal_string \"INVALID_VALIDITY_TO\"" @@ -4599,7 +5440,7 @@ "typeString": "literal_string \"INVALID_VALIDITY_TO\"" } ], - "id": 2854, + "id": 6491, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -4607,13 +5448,13 @@ -18 ], "referencedDeclaration": -18, - "src": "8620:7:8", + "src": "9110:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2860, + "id": 6499, "isConstant": false, "isLValue": false, "isPure": false, @@ -4621,31 +5462,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8620:59:8", + "src": "9110:71:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2861, + "id": 6500, "nodeType": "ExpressionStatement", - "src": "8620:59:8" + "src": "9110:71:6" }, { "assignments": [ - 2863 + 6502 ], "declarations": [ { "constant": false, - "id": 2863, + "id": 6502, "mutability": "mutable", "name": "key", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2932, - "src": "8783:11:8", + "scope": 6582, + "src": "9372:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4653,40 +5493,36 @@ "typeString": "bytes32" }, "typeName": { - "id": 2862, + "id": 6501, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "8783:7:8", + "src": "9372:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "id": 2864, - "initialValue": null, + "id": 6503, "nodeType": "VariableDeclarationStatement", - "src": "8783:11:8" + "src": "9372:11:6" }, { "expression": { - "argumentTypes": null, - "id": 2874, + "id": 6517, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 2865, + "id": 6504, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "8804:3:8", + "referencedDeclaration": 6502, + "src": "9394:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4695,45 +5531,92 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2869, - "name": "_assetTitle", + "id": 6508, + "name": "_seller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2830, - "src": "8837:11:8", + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2870, + "id": 6513, "name": "_validFrom", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8850:10:8", + "referencedDeclaration": 6466, + "src": "9474:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2871, + "id": 6514, "name": "_validTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8862:8:8", + "referencedDeclaration": 6468, + "src": "9486:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4743,8 +5626,12 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, { "typeIdentifier": "t_uint256", @@ -4756,33 +5643,31 @@ } ], "expression": { - "argumentTypes": null, - "id": 2867, + "id": 6506, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -1, - "src": "8820:3:8", + "src": "9424:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_abi", "typeString": "abi" } }, - "id": 2868, + "id": 6507, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "encodePacked", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8820:16:8", + "src": "9424:16:6", "typeDescriptions": { "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", "typeString": "function () pure returns (bytes memory)" } }, - "id": 2872, + "id": 6515, "isConstant": false, "isLValue": false, "isPure": false, @@ -4790,7 +5675,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8820:51:8", + "src": "9424:71:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", @@ -4805,18 +5690,18 @@ "typeString": "bytes memory" } ], - "id": 2866, + "id": 6505, "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -8, - "src": "8810:9:8", + "src": "9400:9:6", "typeDescriptions": { "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", "typeString": "function (bytes memory) pure returns (bytes32)" } }, - "id": 2873, + "id": 6516, "isConstant": false, "isLValue": false, "isPure": false, @@ -4824,59 +5709,55 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8810:62:8", + "src": "9400:106:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "8804:68:8", + "src": "9394:112:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 2875, + "id": 6518, "nodeType": "ExpressionStatement", - "src": "8804:68:8" + "src": "9394:112:6" }, { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2879, + "id": 6522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 2876, + "id": 6519, "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "8895:11:8", + "referencedDeclaration": 6215, + "src": "9523:11:6", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", "typeString": "bytes32[] storage ref" } }, - "id": 2877, + "id": 6520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8895:18:8", + "src": "9523:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4885,95 +5766,84 @@ "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 2878, + "id": 6521, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8916:1:8", - "subdenomination": null, + "src": "9544:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "8895:22:8", + "src": "9523:22:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 2893, + "id": 6536, "nodeType": "IfStatement", - "src": "8891:125:8", + "src": "9519:176:6", "trueBody": { - "id": 2892, + "id": 6535, "nodeType": "Block", - "src": "8919:97:8", + "src": "9547:148:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 2888, + "id": 6531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 2881, + "id": 6524, "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "8941:11:8", + "referencedDeclaration": 6215, + "src": "9588:11:6", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", "typeString": "bytes32[] storage ref" } }, - "id": 2886, + "id": 6529, "indexExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 2882, + "id": 6525, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "8953:8:8", + "referencedDeclaration": 6204, + "src": "9600:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 2884, + "id": 6527, "indexExpression": { - "argumentTypes": null, - "id": 2883, + "id": 6526, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "8962:3:8", + "referencedDeclaration": 6502, + "src": "9609:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -4984,21 +5854,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "8953:13:8", + "src": "9600:13:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 2885, + "id": 6528, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "idx", "nodeType": "MemberAccess", - "referencedDeclaration": 2601, - "src": "8953:17:8", + "referencedDeclaration": 6188, + "src": "9600:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5009,7 +5879,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "8941:30:8", + "src": "9588:30:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5018,36 +5888,33 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, - "id": 2887, + "id": 6530, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "8975:3:8", + "referencedDeclaration": 6502, + "src": "9622:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "8941:37:8", + "src": "9588:37:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "50524f4d4953455f414c52454144595f455849535453", - "id": 2889, + "id": 6532, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8980:24:8", - "subdenomination": null, + "src": "9644:24:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" @@ -5066,7 +5933,7 @@ "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" } ], - "id": 2880, + "id": 6523, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -5074,13 +5941,13 @@ -18 ], "referencedDeclaration": -18, - "src": "8933:7:8", + "src": "9562:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2890, + "id": 6533, "isConstant": false, "isLValue": false, "isPure": false, @@ -5088,52 +5955,48 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8933:72:8", + "src": "9562:121:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2891, + "id": 6534, "nodeType": "ExpressionStatement", - "src": "8933:72:8" + "src": "9562:121:6" } ] } }, { "expression": { - "argumentTypes": null, - "id": 2909, + "id": 6554, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 2894, + "id": 6537, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "9034:8:8", + "referencedDeclaration": 6204, + "src": "9707:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 2896, + "id": 6539, "indexExpression": { - "argumentTypes": null, - "id": 2895, + "id": 6538, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9043:3:8", + "referencedDeclaration": 6502, + "src": "9716:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5144,145 +6007,158 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "9034:13:8", + "src": "9707:13:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2898, + "id": 6541, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9083:3:8", + "referencedDeclaration": 6502, + "src": "9757:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "id": 2899, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2830, - "src": "9112:11:8", + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2900, + "id": 6545, "name": "_seller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2828, - "src": "9145:7:8", + "referencedDeclaration": 6464, + "src": "9825:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 2901, + "id": 6546, "name": "_validFrom", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "9206:10:8", + "referencedDeclaration": 6466, + "src": "9858:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2902, + "id": 6547, "name": "_validTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "9239:8:8", + "referencedDeclaration": 6468, + "src": "9892:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2903, + "id": 6548, "name": "_price", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2836, - "src": "9268:6:8", + "referencedDeclaration": 6470, + "src": "9922:6:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2904, + "id": 6549, "name": "_depositSe", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2838, - "src": "9299:10:8", + "referencedDeclaration": 6472, + "src": "9954:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2905, + "id": 6550, "name": "_depositBu", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2840, - "src": "9334:10:8", + "referencedDeclaration": 6474, + "src": "9990:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 2906, + "id": 6551, "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "9463:11:8", + "referencedDeclaration": 6215, + "src": "10020:11:6", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", "typeString": "bytes32[] storage ref" } }, - "id": 2907, + "id": 6552, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9463:18:8", + "src": "10020:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5296,8 +6172,8 @@ "typeString": "bytes32" }, { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, { "typeIdentifier": "t_address", @@ -5328,18 +6204,18 @@ "typeString": "uint256" } ], - "id": 2897, + "id": 6540, "name": "Promise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2602, - "src": "9050:7:8", + "referencedDeclaration": 6189, + "src": "9723:7:6", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Promise_$2602_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", "typeString": "type(struct VoucherKernel.Promise storage pointer)" } }, - "id": 2908, + "id": 6553, "isConstant": false, "isLValue": false, "isPure": false, @@ -5347,7 +6223,7 @@ "lValueRequested": false, "names": [ "promiseId", - "assetTitle", + "nonce", "seller", "validFrom", "validTo", @@ -5357,35 +6233,33 @@ "idx" ], "nodeType": "FunctionCall", - "src": "9050:442:8", + "src": "9723:327:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "src": "9034:458:8", + "src": "9707:343:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 2910, + "id": 6555, "nodeType": "ExpressionStatement", - "src": "9034:458:8" + "src": "9707:343:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2914, + "id": 6559, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9528:3:8", + "referencedDeclaration": 6502, + "src": "10080:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5400,33 +6274,31 @@ } ], "expression": { - "argumentTypes": null, - "id": 2911, + "id": 6556, "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "9511:11:8", + "referencedDeclaration": 6215, + "src": "10063:11:6", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", "typeString": "bytes32[] storage ref" } }, - "id": 2913, + "id": 6558, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "push", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9511:16:8", + "src": "10063:16:6", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", "typeString": "function (bytes32)" } }, - "id": 2915, + "id": 6560, "isConstant": false, "isLValue": false, "isPure": false, @@ -5434,137 +6306,136 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9511:21:8", + "src": "10063:21:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2916, + "id": 6561, "nodeType": "ExpressionStatement", - "src": "9511:21:8" + "src": "10063:21:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2918, + "id": 6563, "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9574:3:8", + "referencedDeclaration": 6502, + "src": "10134:3:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, { - "argumentTypes": null, - "id": 2919, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2830, - "src": "9579:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2920, - "name": "msg", + "baseExpression": { + "id": 6564, + "name": "tokenNonces", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9592:3:8", + "referencedDeclaration": 6208, + "src": "10152:11:6", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 2921, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9592:10:8", + "nodeType": "IndexAccess", + "src": "10152:20:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "argumentTypes": null, - "id": 2922, + "id": 6568, "name": "_validFrom", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "9604:10:8", + "referencedDeclaration": 6466, + "src": "10209:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2923, + "id": 6569, "name": "_validTo", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "9616:8:8", + "referencedDeclaration": 6468, + "src": "10234:8:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2927, + "id": 6573, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 2924, + "id": 6570, "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "9714:11:8", + "referencedDeclaration": 6215, + "src": "10257:11:6", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", "typeString": "bytes32[] storage ref" } }, - "id": 2925, + "id": 6571, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9714:18:8", + "src": "10257:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5573,24 +6444,22 @@ "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { - "argumentTypes": null, "hexValue": "31", - "id": 2926, + "id": 6572, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9735:1:8", - "subdenomination": null, + "src": "10278:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, - "src": "9714:22:8", + "src": "10257:22:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5604,12 +6473,12 @@ "typeString": "bytes32" }, { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_uint256", @@ -5624,18 +6493,18 @@ "typeString": "uint256" } ], - "id": 2917, + "id": 6562, "name": "LogPromiseCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2689, - "src": "9556:17:8", + "referencedDeclaration": 6271, + "src": "10102:17:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,string memory,address,uint256,uint256,uint256)" + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" } }, - "id": 2928, + "id": 6574, "isConstant": false, "isLValue": false, "isPure": false, @@ -5643,85 +6512,154 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9556:181:8", + "src": "10102:188:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2929, + "id": 6575, "nodeType": "EmitStatement", - "src": "9551:186:8" + "src": "10097:193:6" }, { "expression": { - "argumentTypes": null, - "id": 2930, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9763:3:8", + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "functionReturnParameters": 2846, - "id": 2931, + "functionReturnParameters": 6483, + "id": 6581, "nodeType": "Return", - "src": "9756:10:8" + "src": "10303:43:6" } ] }, "documentation": { - "id": 2826, + "id": 6462, "nodeType": "StructuredDocumentation", - "src": "7526:514:8", - "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (but not in prototype).\n @param _seller seller of the promise\n @param _assetTitle Name of the asset\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" }, - "functionSelector": "3a2b95b9", - "id": 2933, + "functionSelector": "797f2a26", + "id": 6583, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 2843, + "id": 6480, "modifierName": { - "argumentTypes": null, - "id": 2842, - "name": "onlyFromCashier", + "id": 6479, + "name": "onlyFromRouter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "8403:15:8", + "referencedDeclaration": 6375, + "src": "8861:14:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "8403:15:8" + "src": "8861:14:6" } ], - "name": "createAssetPromise", + "name": "createTokenSupplyID", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, "parameters": { - "id": 2841, + "id": 6477, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2828, + "id": 6464, "mutability": "mutable", "name": "_seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8082:15:8", + "scope": 6583, + "src": "8653:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5729,56 +6667,52 @@ "typeString": "address" }, "typeName": { - "id": 2827, + "id": 6463, "name": "address", "nodeType": "ElementaryTypeName", - "src": "8082:7:8", + "src": "8653:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2830, + "id": 6466, "mutability": "mutable", - "name": "_assetTitle", + "name": "_validFrom", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8108:27:8", + "scope": 6583, + "src": "8679:18:6", "stateVariable": false, - "storageLocation": "calldata", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2829, - "name": "string", + "id": 6465, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8108:6:8", + "src": "8679:7:6", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2832, + "id": 6468, "mutability": "mutable", - "name": "_validFrom", + "name": "_validTo", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8173:18:8", + "scope": 6583, + "src": "8708:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5786,27 +6720,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2831, + "id": 6467, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8173:7:8", + "src": "8708:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2834, + "id": 6470, "mutability": "mutable", - "name": "_validTo", + "name": "_price", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8201:16:8", + "scope": 6583, + "src": "8735:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5814,27 +6746,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2833, + "id": 6469, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8201:7:8", + "src": "8735:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2836, + "id": 6472, "mutability": "mutable", - "name": "_price", + "name": "_depositSe", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8227:14:8", + "scope": 6583, + "src": "8760:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5842,27 +6772,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2835, + "id": 6471, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8227:7:8", + "src": "8760:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2838, + "id": 6474, "mutability": "mutable", - "name": "_depositSe", + "name": "_depositBu", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8251:18:8", + "scope": 6583, + "src": "8789:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5870,27 +6798,25 @@ "typeString": "uint256" }, "typeName": { - "id": 2837, + "id": 6473, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8251:7:8", + "src": "8789:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2840, + "id": 6476, "mutability": "mutable", - "name": "_depositBu", + "name": "_quantity", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8279:18:8", + "scope": 6583, + "src": "8818:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5898,91 +6824,572 @@ "typeString": "uint256" }, "typeName": { - "id": 2839, + "id": 6475, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8279:7:8", + "src": "8818:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "8072:303:8" + "src": "8642:200:6" }, "returnParameters": { - "id": 2846, + "id": 6483, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2845, + "id": 6482, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8436:7:8", + "scope": 6583, + "src": "8885:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2844, - "name": "bytes32", + "id": 6481, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "8436:7:8", + "src": "8885:7:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "8435:9:8" + "src": "10924:134:6" }, - "scope": 4283, - "src": "8045:1728:8", + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { - "id": 3003, + "id": 6683, "nodeType": "Block", - "src": "10316:775:8", + "src": "11995:801:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 2953, + "id": 6638, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 2948, + "id": 6633, "name": "_promiseId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2938, - "src": "10334:10:8", + "referencedDeclaration": 6625, + "src": "12014:10:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -5991,20 +7398,17 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30", - "id": 2951, + "id": 6636, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "10356:1:8", - "subdenomination": null, + "src": "12036:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -6019,29 +7423,26 @@ "typeString": "int_const 0" } ], - "id": 2950, + "id": 6635, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "10348:7:8", + "src": "12028:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes32_$", "typeString": "type(bytes32)" }, "typeName": { - "id": 2949, + "id": 6634, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "10348:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "12028:7:6", + "typeDescriptions": {} } }, - "id": 2952, + "id": 6637, "isConstant": false, "isLValue": false, "isPure": true, @@ -6049,31 +7450,29 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10348:10:8", + "src": "12028:10:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "10334:24:8", + "src": "12014:24:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f50524f4d495345", - "id": 2954, + "id": 6639, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10360:21:8", - "subdenomination": null, + "src": "12040:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" @@ -6092,7 +7491,7 @@ "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" } ], - "id": 2947, + "id": 6632, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -6100,13 +7499,13 @@ -18 ], "referencedDeclaration": -18, - "src": "10326:7:8", + "src": "12006:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2955, + "id": 6640, "isConstant": false, "isLValue": false, "isPure": false, @@ -6114,58 +7513,52 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10326:56:8", + "src": "12006:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2956, + "id": 6641, "nodeType": "ExpressionStatement", - "src": "10326:56:8" + "src": "12006:56:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 2963, + "id": 6648, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 2958, + "id": 6643, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "10492:8:8", + "referencedDeclaration": 6204, + "src": "12171:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 2960, + "id": 6645, "indexExpression": { - "argumentTypes": null, - "id": 2959, + "id": 6644, "name": "_promiseId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2938, - "src": "10501:10:8", + "referencedDeclaration": 6625, + "src": "12180:10:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -6176,21 +7569,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10492:20:8", + "src": "12171:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 2961, + "id": 6646, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "seller", "nodeType": "MemberAccess", - "referencedDeclaration": 2589, - "src": "10492:27:8", + "referencedDeclaration": 6176, + "src": "12171:27:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6199,36 +7592,33 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, - "id": 2962, + "id": 6647, "name": "_seller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2936, - "src": "10523:7:8", + "referencedDeclaration": 6623, + "src": "12202:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "10492:38:8", + "src": "12171:38:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e415554484f52495a45445f434f", - "id": 2964, + "id": 6649, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10532:17:8", - "subdenomination": null, + "src": "12211:17:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", "typeString": "literal_string \"UNAUTHORIZED_CO\"" @@ -6247,7 +7637,7 @@ "typeString": "literal_string \"UNAUTHORIZED_CO\"" } ], - "id": 2957, + "id": 6642, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -6255,13 +7645,13 @@ -18 ], "referencedDeclaration": -18, - "src": "10484:7:8", + "src": "12163:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2965, + "id": 6650, "isConstant": false, "isLValue": false, "isPure": false, @@ -6269,40 +7659,37 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10484:66:8", + "src": "12163:66:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2966, + "id": 6651, "nodeType": "ExpressionStatement", - "src": "10484:66:8" + "src": "12163:66:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 2970, + "id": 6655, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 2968, + "id": 6653, "name": "_quantity", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2940, - "src": "10655:9:8", + "referencedDeclaration": 6627, + "src": "12332:9:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6311,41 +7698,37 @@ "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 2969, + "id": 6654, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "10667:1:8", - "subdenomination": null, + "src": "12344:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "10655:13:8", + "src": "12332:13:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "494e56414c49445f5155414e54495459", - "id": 2971, + "id": 6656, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10670:18:8", - "subdenomination": null, + "src": "12347:18:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", "typeString": "literal_string \"INVALID_QUANTITY\"" @@ -6364,7 +7747,7 @@ "typeString": "literal_string \"INVALID_QUANTITY\"" } ], - "id": 2967, + "id": 6652, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -6372,13 +7755,13 @@ -18 ], "referencedDeclaration": -18, - "src": "10647:7:8", + "src": "12324:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 2972, + "id": 6657, "isConstant": false, "isLValue": false, "isPure": false, @@ -6386,31 +7769,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10647:42:8", + "src": "12324:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2973, + "id": 6658, "nodeType": "ExpressionStatement", - "src": "10647:42:8" + "src": "12324:42:6" }, { "assignments": [ - 2975 + 6660 ], "declarations": [ { "constant": false, - "id": 2975, + "id": 6660, "mutability": "mutable", "name": "tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3003, - "src": "10791:21:8", + "scope": 6683, + "src": "12462:21:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6418,35 +7800,31 @@ "typeString": "uint256" }, "typeName": { - "id": 2974, + "id": 6659, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10791:7:8", + "src": "12462:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "id": 2979, + "id": 6664, "initialValue": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "74727565", - "id": 2977, + "id": 6662, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "10833:4:8", - "subdenomination": null, + "src": "12504:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6461,18 +7839,18 @@ "typeString": "bool" } ], - "id": 2976, + "id": 6661, "name": "generateTokenType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3219, - "src": "10815:17:8", + "referencedDeclaration": 6964, + "src": "12486:17:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", "typeString": "function (bool) returns (uint256)" } }, - "id": 2978, + "id": 6663, "isConstant": false, "isLValue": false, "isPure": false, @@ -6480,7 +7858,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10815:23:8", + "src": "12486:23:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -6488,63 +7866,125 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "10791:47:8" + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 2983, + "id": 6675, "name": "_seller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2936, - "src": "10910:7:8", + "referencedDeclaration": 6623, + "src": "12668:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 2984, + "id": 6676, "name": "tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2975, - "src": "10919:13:8", + "referencedDeclaration": 6660, + "src": "12690:13:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 2985, + "id": 6677, "name": "_quantity", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2940, - "src": "10934:9:8", + "referencedDeclaration": 6627, + "src": "12718:9:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "hexValue": "", - "id": 2986, + "id": 6678, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10945:2:8", - "subdenomination": null, + "src": "12742:2:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" @@ -6572,33 +8012,68 @@ } ], "expression": { - "argumentTypes": null, - "id": 2980, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "10890:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1599, - "src": "10890:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (address,uint256,uint256,bytes memory) external" } }, - "id": 2987, + "id": 6679, "isConstant": false, "isLValue": false, "isPure": false, @@ -6606,231 +8081,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10890:58:8", + "src": "12618:137:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 2988, - "nodeType": "ExpressionStatement", - "src": "10890:58:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2989, - "name": "ordersPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2621, - "src": "10967:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" - } - }, - "id": 2991, - "indexExpression": { - "argumentTypes": null, - "id": 2990, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2975, - "src": "10981:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10967:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2992, - "name": "_promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2938, - "src": "10998:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "10967:41:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2994, - "nodeType": "ExpressionStatement", - "src": "10967:41:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2995, - "name": "accountSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "11018:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2997, - "indexExpression": { - "argumentTypes": null, - "id": 2996, - "name": "_seller", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2936, - "src": "11032:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11018:22:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 2998, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2940, - "src": "11044:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11018:35:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3000, + "id": 6680, "nodeType": "ExpressionStatement", - "src": "11018:35:8" + "src": "12618:137:6" }, { "expression": { - "argumentTypes": null, - "id": 3001, + "id": 6681, "name": "tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2975, - "src": "11071:13:8", + "referencedDeclaration": 6660, + "src": "12775:13:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2946, - "id": 3002, + "functionReturnParameters": 6631, + "id": 6682, "nodeType": "Return", - "src": "11064:20:8" + "src": "12768:20:6" } ] }, "documentation": { - "id": 2934, + "id": 6621, "nodeType": "StructuredDocumentation", - "src": "9792:370:8", + "src": "11476:376:6", "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" }, - "functionSelector": "ae083814", - "id": 3004, + "id": 6684, "implemented": true, "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2943, - "modifierName": { - "argumentTypes": null, - "id": 2942, - "name": "onlyFromCashier", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "10270:15:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10270:15:8" - } - ], + "modifiers": [], "name": "createOrder", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 2941, + "id": 6628, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2936, + "id": 6623, "mutability": "mutable", "name": "_seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10188:15:8", + "scope": 6684, + "src": "11889:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6838,28 +8143,26 @@ "typeString": "address" }, "typeName": { - "id": 2935, + "id": 6622, "name": "address", "nodeType": "ElementaryTypeName", - "src": "10188:7:8", + "src": "11889:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2938, + "id": 6625, "mutability": "mutable", "name": "_promiseId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10205:18:8", + "scope": 6684, + "src": "11915:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6867,27 +8170,25 @@ "typeString": "bytes32" }, "typeName": { - "id": 2937, + "id": 6624, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "10205:7:8", + "src": "11915:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2940, + "id": 6627, "mutability": "mutable", "name": "_quantity", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10225:17:8", + "scope": 6684, + "src": "11944:17:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6895,34 +8196,32 @@ "typeString": "uint256" }, "typeName": { - "id": 2939, + "id": 6626, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10225:7:8", + "src": "11944:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "10187:56:8" + "src": "11878:90:6" }, "returnParameters": { - "id": 2946, + "id": 6631, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2945, + "id": 6630, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10303:7:8", + "scope": 6684, + "src": "11986:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6930,71 +8229,259 @@ "typeString": "uint256" }, "typeName": { - "id": 2944, + "id": 6629, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10303:7:8", + "src": "11986:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "10302:9:8" + "src": "11985:9:6" }, - "scope": 4283, - "src": "10167:924:8", + "scope": 8454, + "src": "11858:938:6", "stateMutability": "nonpayable", "virtual": false, - "visibility": "external" + "visibility": "private" }, { + "baseFunctions": [ + 9400 + ], "body": { - "id": 3030, + "id": 6739, "nodeType": "Block", - "src": "11580:170:8", + "src": "13555:582:6", "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3019, + "id": 6715, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "11626:14:8", + "referencedDeclaration": 6687, + "src": "13756:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "id": 3020, + "id": 6716, "name": "_issuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3009, - "src": "11642:7:8", + "referencedDeclaration": 6689, + "src": "13772:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 3021, + "id": 6717, "name": "_holder", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3011, - "src": "11651:7:8", + "referencedDeclaration": 6691, + "src": "13781:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7016,18 +8503,18 @@ "typeString": "address" } ], - "id": 3018, + "id": 6714, "name": "checkOrderFillable", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3085, - "src": "11607:18:8", + "referencedDeclaration": 6813, + "src": "13737:18:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", "typeString": "function (uint256,address,address) view" } }, - "id": 3022, + "id": 6718, "isConstant": false, "isLValue": false, "isPure": false, @@ -7035,55 +8522,83 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11607:52:8", + "src": "13737:52:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3023, + "id": 6719, "nodeType": "ExpressionStatement", - "src": "11607:52:8" + "src": "13737:52:6" }, { - "expression": { - "argumentTypes": null, + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { "arguments": [ { - "argumentTypes": null, - "id": 3025, + "id": 6723, "name": "_issuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3009, - "src": "11710:7:8", + "referencedDeclaration": 6689, + "src": "13861:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 3026, + "id": 6724, "name": "_holder", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3011, - "src": "11719:7:8", + "referencedDeclaration": 6691, + "src": "13870:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 3027, + "id": 6725, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "11728:14:8", + "referencedDeclaration": 6687, + "src": "13879:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7105,18 +8620,18 @@ "typeString": "uint256" } ], - "id": 3024, + "id": 6722, "name": "extract721", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3187, - "src": "11699:10:8", + "referencedDeclaration": 6906, + "src": "13850:10:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (address,address,uint256) returns (uint256)" } }, - "id": 3028, + "id": 6726, "isConstant": false, "isLValue": false, "isPure": false, @@ -7124,67 +8639,236 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11699:44:8", + "src": "13850:44:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 3017, - "id": 3029, - "nodeType": "Return", - "src": "11692:51:8" + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" } ] }, "documentation": { - "id": 3005, + "id": 6685, "nodeType": "StructuredDocumentation", - "src": "11107:320:8", - "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" }, - "functionSelector": "ae4606fe", - "id": 3031, + "functionSelector": "b0df130d", + "id": 6740, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 3014, + "id": 6699, "modifierName": { - "argumentTypes": null, - "id": 3013, - "name": "onlyFromCashier", + "id": 6698, + "name": "onlyFromRouter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "11534:15:8", + "referencedDeclaration": 6375, + "src": "13540:14:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "11534:15:8" + "src": "13540:14:6" } ], "name": "fillOrder", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, "parameters": { - "id": 3012, + "id": 6696, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3007, + "id": 6687, "mutability": "mutable", "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11451:22:8", + "scope": 6740, + "src": "13376:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7192,27 +8876,25 @@ "typeString": "uint256" }, "typeName": { - "id": 3006, + "id": 6686, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11451:7:8", + "src": "13376:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3009, + "id": 6689, "mutability": "mutable", "name": "_issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11475:15:8", + "scope": 6740, + "src": "13409:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7220,28 +8902,26 @@ "typeString": "address" }, "typeName": { - "id": 3008, + "id": 6688, "name": "address", "nodeType": "ElementaryTypeName", - "src": "11475:7:8", + "src": "13409:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3011, + "id": 6691, "mutability": "mutable", "name": "_holder", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11492:15:8", + "scope": 6740, + "src": "13435:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7249,35 +8929,52 @@ "typeString": "address" }, "typeName": { - "id": 3010, + "id": 6690, "name": "address", "nodeType": "ElementaryTypeName", - "src": "11492:7:8", + "src": "13435:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" - } - ], - "src": "11450:58:8" - }, - "returnParameters": { - "id": 3017, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 3016, + "id": 6693, "mutability": "mutable", - "name": "", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11567:7:8", + "scope": 6740, + "src": "13492:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7285,56 +8982,58 @@ "typeString": "uint256" }, "typeName": { - "id": 3015, + "id": 6694, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11567:7:8", + "src": "13492:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "11566:9:8" + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" }, - "scope": 4283, - "src": "11432:318:8", + "scope": 8454, + "src": "13347:790:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { - "id": 3084, + "id": 6812, "nodeType": "Block", - "src": "12168:746:8", + "src": "14564:1008:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3044, + "id": 6753, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3042, + "id": 6751, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3034, - "src": "12186:14:8", + "referencedDeclaration": 6743, + "src": "14583:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7343,41 +9042,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 3043, + "id": 6752, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "12204:1:8", - "subdenomination": null, + "src": "14601:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "12186:19:8", + "src": "14583:19:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f4944", - "id": 3045, + "id": 6754, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "12207:16:8", - "subdenomination": null, + "src": "14604:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", "typeString": "literal_string \"UNSPECIFIED_ID\"" @@ -7396,7 +9091,7 @@ "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 3041, + "id": 6750, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -7404,13 +9099,13 @@ -18 ], "referencedDeclaration": -18, - "src": "12178:7:8", + "src": "14575:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3046, + "id": 6755, "isConstant": false, "isLValue": false, "isPure": false, @@ -7418,51 +9113,49 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12178:46:8", + "src": "14575:46:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3047, + "id": 6756, "nodeType": "ExpressionStatement", - "src": "12178:46:8" + "src": "14575:46:6" }, { "condition": { - "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { - "argumentTypes": null, - "id": 3048, + "id": 6757, "name": "_holder", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "12329:7:8", + "referencedDeclaration": 6747, + "src": "14728:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 3049, + "id": 6758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "isContract", "nodeType": "MemberAccess", - "referencedDeclaration": 4641, - "src": "12329:18:8", + "referencedDeclaration": 12810, + "src": "14728:18:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", "typeString": "function (address) view returns (bool)" } }, - "id": 3050, + "id": 6759, "isConstant": false, "isLValue": false, "isPure": false, @@ -7470,41 +9163,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12329:20:8", + "src": "14728:20:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3062, + "id": 6771, "nodeType": "IfStatement", - "src": "12325:233:8", + "src": "14724:282:6", "trueBody": { - "id": 3061, + "id": 6770, "nodeType": "Block", - "src": "12351:207:8", + "src": "14750:256:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30783135306237613032", - "id": 3056, + "id": 6765, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "12408:10:8", - "subdenomination": null, + "src": "14826:10:6", "typeDescriptions": { "typeIdentifier": "t_rational_353073666_by_1", "typeString": "int_const 353073666" @@ -7520,16 +9208,14 @@ } ], "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3053, + "id": 6762, "name": "_holder", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "12381:7:8", + "referencedDeclaration": 6747, + "src": "14799:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7543,18 +9229,18 @@ "typeString": "address" } ], - "id": 3052, + "id": 6761, "name": "IERC165", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "12373:7:8", + "referencedDeclaration": 9006, + "src": "14791:7:6", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC165_$2379_$", + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", "typeString": "type(contract IERC165)" } }, - "id": 3054, + "id": 6763, "isConstant": false, "isLValue": false, "isPure": false, @@ -7562,28 +9248,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12373:16:8", + "src": "14791:16:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC165_$2379", + "typeIdentifier": "t_contract$_IERC165_$9006", "typeString": "contract IERC165" } }, - "id": 3055, + "id": 6764, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "supportsInterface", "nodeType": "MemberAccess", - "referencedDeclaration": 2378, - "src": "12373:34:8", + "referencedDeclaration": 9005, + "src": "14791:34:6", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", "typeString": "function (bytes4) view external returns (bool)" } }, - "id": 3057, + "id": 6766, "isConstant": false, "isLValue": false, "isPure": false, @@ -7591,7 +9277,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12373:46:8", + "src": "14791:46:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -7599,17 +9285,15 @@ } }, { - "argumentTypes": null, "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", - "id": 3058, + "id": 6767, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "12421:29:8", - "subdenomination": null, + "src": "14856:29:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" @@ -7628,7 +9312,7 @@ "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" } ], - "id": 3051, + "id": 6760, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -7636,13 +9320,13 @@ -18 ], "referencedDeclaration": -18, - "src": "12365:7:8", + "src": "14765:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3059, + "id": 6768, "isConstant": false, "isLValue": false, "isPure": false, @@ -7650,43 +9334,40 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12365:86:8", + "src": "14765:135:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3060, + "id": 6769, "nodeType": "ExpressionStatement", - "src": "12365:86:8" + "src": "14765:135:6" } ] } }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 3069, + "id": 6778, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3064, + "id": 6773, "name": "_holder", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "12592:7:8", + "referencedDeclaration": 6747, + "src": "15026:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7695,20 +9376,17 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30", - "id": 3067, + "id": 6776, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "12611:1:8", - "subdenomination": null, + "src": "15045:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -7723,29 +9401,26 @@ "typeString": "int_const 0" } ], - "id": 3066, + "id": 6775, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "12603:7:8", + "src": "15037:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 3065, + "id": 6774, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12603:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "15037:7:6", + "typeDescriptions": {} } }, - "id": 3068, + "id": 6777, "isConstant": false, "isLValue": false, "isPure": true, @@ -7753,31 +9428,29 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12603:10:8", + "src": "15037:10:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "12592:21:8", + "src": "15026:21:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f41444452455353", - "id": 3070, + "id": 6779, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "12615:21:8", - "subdenomination": null, + "src": "15049:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" @@ -7796,7 +9469,7 @@ "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" } ], - "id": 3063, + "id": 6772, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -7804,13 +9477,13 @@ -18 ], "referencedDeclaration": -18, - "src": "12584:7:8", + "src": "15018:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3071, + "id": 6780, "isConstant": false, "isLValue": false, "isPure": false, @@ -7818,56 +9491,51 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12584:53:8", + "src": "15018:53:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3072, + "id": 6781, "nodeType": "ExpressionStatement", - "src": "12584:53:8" + "src": "15018:53:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3080, + "id": 6791, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3076, + "id": 6787, "name": "_issuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "12771:7:8", + "referencedDeclaration": 6745, + "src": "15229:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 3077, + "id": 6788, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3034, - "src": "12780:14:8", + "referencedDeclaration": 6743, + "src": "15238:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7886,33 +9554,68 @@ } ], "expression": { - "argumentTypes": null, - "id": 3074, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "12746:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 3075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1374, - "src": "12746:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } }, - "id": 3078, + "id": 6789, "isConstant": false, "isLValue": false, "isPure": false, @@ -7920,7 +9623,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12746:49:8", + "src": "15194:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -7930,41 +9633,37 @@ "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 3079, + "id": 6790, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "12798:1:8", - "subdenomination": null, + "src": "15256:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "12746:53:8", + "src": "15194:63:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "4f464645525f454d505459", - "id": 3081, + "id": 6792, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "12801:13:8", - "subdenomination": null, + "src": "15272:13:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", "typeString": "literal_string \"OFFER_EMPTY\"" @@ -7983,7 +9682,7 @@ "typeString": "literal_string \"OFFER_EMPTY\"" } ], - "id": 3073, + "id": 6782, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -7991,13 +9690,13 @@ -18 ], "referencedDeclaration": -18, - "src": "12738:7:8", + "src": "15172:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3082, + "id": 6793, "isConstant": false, "isLValue": false, "isPure": false, @@ -8005,45 +9704,276 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12738:77:8", + "src": "15172:124:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3083, + "id": 6794, "nodeType": "ExpressionStatement", - "src": "12738:77:8" + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" } ] }, "documentation": { - "id": 3032, + "id": 6741, "nodeType": "StructuredDocumentation", - "src": "11765:277:8", - "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721) " + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" }, - "id": 3085, + "id": 6813, "implemented": true, "kind": "function", "modifiers": [], "name": "checkOrderFillable", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 3039, + "id": 6748, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3034, + "id": 6743, "mutability": "mutable", "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "12076:22:8", + "scope": 6813, + "src": "14468:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8051,27 +9981,25 @@ "typeString": "uint256" }, "typeName": { - "id": 3033, + "id": 6742, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12076:7:8", + "src": "14468:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3036, + "id": 6745, "mutability": "mutable", "name": "_issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "12100:15:8", + "scope": 6813, + "src": "14501:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8079,28 +10007,26 @@ "typeString": "address" }, "typeName": { - "id": 3035, + "id": 6744, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12100:7:8", + "src": "14501:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3038, + "id": 6747, "mutability": "mutable", "name": "_holder", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "12117:15:8", + "scope": 6813, + "src": "14527:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8108,74 +10034,71 @@ "typeString": "address" }, "typeName": { - "id": 3037, + "id": 6746, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12117:7:8", + "src": "14527:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "12075:58:8" + "src": "14457:92:6" }, "returnParameters": { - "id": 3040, + "id": 6749, "nodeType": "ParameterList", "parameters": [], - "src": "12168:0:8" + "src": "14564:0:6" }, - "scope": 4283, - "src": "12048:866:8", + "scope": 8454, + "src": "14430:1142:6", "stateMutability": "view", "virtual": false, "visibility": "internal" }, { "body": { - "id": 3186, + "id": 6905, "nodeType": "Block", - "src": "13481:1087:8", + "src": "16158:1258:6", "statements": [ { "condition": { - "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { - "argumentTypes": null, - "id": 3097, + "id": 6825, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "13495:3:8", + "referencedDeclaration": 6818, + "src": "16173:3:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 3098, + "id": 6826, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "isContract", "nodeType": "MemberAccess", - "referencedDeclaration": 4641, - "src": "13495:14:8", + "referencedDeclaration": 12810, + "src": "16173:14:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", "typeString": "function (address) view returns (bool)" } }, - "id": 3099, + "id": 6827, "isConstant": false, "isLValue": false, "isPure": false, @@ -8183,107 +10106,96 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13495:16:8", + "src": "16173:16:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3121, + "id": 6849, "nodeType": "IfStatement", - "src": "13491:391:8", + "src": "16169:545:6", "trueBody": { - "id": 3120, + "id": 6848, "nodeType": "Block", - "src": "13513:369:8", + "src": "16191:523:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" }, - "id": 3116, + "id": 6844, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3105, + "id": 6833, "name": "_issuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "13577:7:8", + "referencedDeclaration": 6816, + "src": "16296:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3106, + "id": 6834, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "13586:3:8", + "src": "16326:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 3107, + "id": 6835, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13586:10:8", + "src": "16326:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { - "argumentTypes": null, - "id": 3108, + "id": 6836, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "13598:14:8", + "referencedDeclaration": 6820, + "src": "16359:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "hexValue": "", - "id": 3109, + "id": 6837, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "13614:2:8", - "subdenomination": null, + "src": "16396:2:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" @@ -8311,16 +10223,14 @@ } ], "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3102, + "id": 6830, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "13555:3:8", + "referencedDeclaration": 6818, + "src": "16252:3:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -8334,18 +10244,18 @@ "typeString": "address" } ], - "id": 3101, + "id": 6829, "name": "ERC721TokenReceiver", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2513, - "src": "13535:19:8", + "referencedDeclaration": 9249, + "src": "16232:19:6", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$2513_$", + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", "typeString": "type(contract ERC721TokenReceiver)" } }, - "id": 3103, + "id": 6831, "isConstant": false, "isLValue": false, "isPure": false, @@ -8353,28 +10263,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13535:24:8", + "src": "16232:24:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC721TokenReceiver_$2513", + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", "typeString": "contract ERC721TokenReceiver" } }, - "id": 3104, + "id": 6832, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "onERC721Received", "nodeType": "MemberAccess", - "referencedDeclaration": 2512, - "src": "13535:41:8", + "referencedDeclaration": 9248, + "src": "16232:41:6", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" } }, - "id": 3110, + "id": 6838, "isConstant": false, "isLValue": false, "isPure": false, @@ -8382,7 +10292,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13535:82:8", + "src": "16232:185:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes4", @@ -8392,20 +10302,16 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3112, + "id": 6840, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "13641:3:8", + "referencedDeclaration": 6818, + "src": "16441:3:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -8419,18 +10325,18 @@ "typeString": "address" } ], - "id": 3111, + "id": 6839, "name": "ERC721TokenReceiver", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2513, - "src": "13621:19:8", + "referencedDeclaration": 9249, + "src": "16421:19:6", "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$2513_$", + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", "typeString": "type(contract ERC721TokenReceiver)" } }, - "id": 3113, + "id": 6841, "isConstant": false, "isLValue": false, "isPure": false, @@ -8438,59 +10344,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13621:24:8", + "src": "16421:24:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC721TokenReceiver_$2513", + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", "typeString": "contract ERC721TokenReceiver" } }, - "id": 3114, + "id": 6842, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "onERC721Received", "nodeType": "MemberAccess", - "referencedDeclaration": 2512, - "src": "13621:41:8", + "referencedDeclaration": 9248, + "src": "16421:41:6", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" } }, - "id": 3115, + "id": 6843, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "selector", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13621:50:8", + "src": "16421:50:6", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" } }, - "src": "13535:136:8", + "src": "16232:239:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", - "id": 3117, + "id": 6845, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "13673:29:8", - "subdenomination": null, + "src": "16490:29:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" @@ -8509,7 +10412,7 @@ "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" } ], - "id": 3100, + "id": 6828, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -8517,13 +10420,13 @@ -18 ], "referencedDeclaration": -18, - "src": "13527:7:8", + "src": "16206:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3118, + "id": 6846, "isConstant": false, "isLValue": false, "isPure": false, @@ -8531,62 +10434,57 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13527:176:8", + "src": "16206:328:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3119, + "id": 6847, "nodeType": "ExpressionStatement", - "src": "13527:176:8" + "src": "16206:328:6" } ] } }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3125, + "id": 6854, "name": "_issuer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "13913:7:8", + "referencedDeclaration": 6816, + "src": "16762:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 3126, + "id": 6855, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "13922:14:8", + "referencedDeclaration": 6820, + "src": "16771:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "hexValue": "31", - "id": 3127, + "id": 6856, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "13938:1:8", - "subdenomination": null, + "src": "16787:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" @@ -8610,33 +10508,68 @@ } ], "expression": { - "argumentTypes": null, - "id": 3122, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "13893:14:8", + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" } }, - "id": 3124, + "id": 6853, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "burn", "nodeType": "MemberAccess", - "referencedDeclaration": 1869, - "src": "13893:19:8", + "referencedDeclaration": 8918, + "src": "16726:35:6", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256) external" } }, - "id": 3128, + "id": 6857, "isConstant": false, "isLValue": false, "isPure": false, @@ -8644,92 +10577,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13893:47:8", + "src": "16726:63:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3129, - "nodeType": "ExpressionStatement", - "src": "13893:47:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "13950:24:8", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3130, - "name": "accountSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "13950:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3132, - "indexExpression": { - "argumentTypes": null, - "id": 3131, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "13964:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "13950:22:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3134, + "id": 6858, "nodeType": "ExpressionStatement", - "src": "13950:24:8" + "src": "16726:63:6" }, { "assignments": [ - 3136 + 6860 ], "declarations": [ { "constant": false, - "id": 3136, + "id": 6860, "mutability": "mutable", "name": "voucherTokenId", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3186, - "src": "14030:22:8", + "scope": 6905, + "src": "16868:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8737,39 +10608,36 @@ "typeString": "uint256" }, "typeName": { - "id": 3135, + "id": 6859, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14030:7:8", + "src": "16868:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "id": 3143, + "id": 6867, "initialValue": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3142, + "id": 6866, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3137, + "id": 6861, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "14055:14:8", + "referencedDeclaration": 6820, + "src": "16906:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8778,8 +10646,7 @@ "nodeType": "BinaryOperation", "operator": "|", "rightExpression": { - "argumentTypes": null, - "id": 3141, + "id": 6865, "isConstant": false, "isLValue": false, "isPure": false, @@ -8787,31 +10654,28 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": true, - "src": "14072:30:8", + "src": "16923:30:6", "subExpression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3138, + "id": 6862, "name": "typeCounters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2645, - "src": "14074:12:8", + "referencedDeclaration": 6227, + "src": "16925:12:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 3140, + "id": 6864, "indexExpression": { - "argumentTypes": null, - "id": 3139, + "id": 6863, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "14087:14:8", + "referencedDeclaration": 6820, + "src": "16938:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8822,7 +10686,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "14074:28:8", + "src": "16925:28:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8833,49 +10697,44 @@ "typeString": "uint256" } }, - "src": "14055:47:8", + "src": "16906:47:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "14030:72:8" + "src": "16868:85:6" }, { "expression": { - "argumentTypes": null, - "id": 3155, + "id": 6879, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3144, + "id": 6868, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14142:14:8", + "referencedDeclaration": 6223, + "src": "16988:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3146, + "id": 6870, "indexExpression": { - "argumentTypes": null, - "id": 3145, + "id": 6869, "name": "voucherTokenId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14157:14:8", + "referencedDeclaration": 6860, + "src": "17003:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8886,21 +10745,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "14142:30:8", + "src": "16988:30:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3147, + "id": 6871, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "14142:37:8", + "referencedDeclaration": 6019, + "src": "16988:37:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -8909,34 +10768,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3149, + "id": 6873, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14192:14:8", + "referencedDeclaration": 6223, + "src": "17058:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3151, + "id": 6875, "indexExpression": { - "argumentTypes": null, - "id": 3150, + "id": 6874, "name": "voucherTokenId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14207:14:8", + "referencedDeclaration": 6860, + "src": "17073:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8947,34 +10801,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "14192:30:8", + "src": "17058:30:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3152, + "id": 6876, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "14192:37:8", + "referencedDeclaration": 6019, + "src": "17058:37:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3153, - "name": "idxCommit", + "id": 6877, + "name": "IDX_COMMIT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "14231:9:8", + "referencedDeclaration": 5956, + "src": "17110:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -8992,18 +10845,18 @@ "typeString": "uint8" } ], - "id": 3148, - "name": "setChange", + "id": 6872, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "14182:9:8", + "referencedDeclaration": 6139, + "src": "17028:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3154, + "id": 6878, "isConstant": false, "isLValue": false, "isPure": false, @@ -9011,57 +10864,52 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "14182:59:8", + "src": "17028:103:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "14142:99:8", + "src": "16988:143:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3156, + "id": 6880, "nodeType": "ExpressionStatement", - "src": "14142:99:8" + "src": "16988:143:6" }, { "expression": { - "argumentTypes": null, - "id": 3162, + "id": 6886, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3157, + "id": 6881, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14251:14:8", + "referencedDeclaration": 6223, + "src": "17142:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3159, + "id": 6883, "indexExpression": { - "argumentTypes": null, - "id": 3158, + "id": 6882, "name": "voucherTokenId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14266:14:8", + "referencedDeclaration": 6860, + "src": "17157:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9072,21 +10920,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "14251:30:8", + "src": "17142:30:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3160, + "id": 6884, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "isPaymentReleased", "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "14251:48:8", + "referencedDeclaration": 6021, + "src": "17142:48:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -9095,67 +10943,60 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "66616c7365", - "id": 3161, + "id": 6885, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "14302:5:8", - "subdenomination": null, + "src": "17193:5:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, - "src": "14251:56:8", + "src": "17142:56:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3163, + "id": 6887, "nodeType": "ExpressionStatement", - "src": "14251:56:8" + "src": "17142:56:6" }, { "expression": { - "argumentTypes": null, - "id": 3169, + "id": 6893, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3164, + "id": 6888, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14317:14:8", + "referencedDeclaration": 6223, + "src": "17209:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3166, + "id": 6890, "indexExpression": { - "argumentTypes": null, - "id": 3165, + "id": 6889, "name": "voucherTokenId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14332:14:8", + "referencedDeclaration": 6860, + "src": "17224:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9166,21 +11007,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "14317:30:8", + "src": "17209:30:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3167, + "id": 6891, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "isDepositsReleased", "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "14317:49:8", + "referencedDeclaration": 6023, + "src": "17209:49:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -9189,58 +11030,53 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "66616c7365", - "id": 3168, + "id": 6892, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "14369:5:8", - "subdenomination": null, + "src": "17261:5:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, - "src": "14317:57:8", + "src": "17209:57:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3170, + "id": 6894, "nodeType": "ExpressionStatement", - "src": "14317:57:8" + "src": "17209:57:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3174, + "id": 6899, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "14451:3:8", + "referencedDeclaration": 6818, + "src": "17354:3:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, - "id": 3175, + "id": 6900, "name": "voucherTokenId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14456:14:8", + "referencedDeclaration": 6860, + "src": "17359:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9259,33 +11095,68 @@ } ], "expression": { - "argumentTypes": null, - "id": 3171, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "14431:14:8", + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" } }, - "id": 3173, + "id": 6898, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mint", "nodeType": "MemberAccess", - "referencedDeclaration": 1682, - "src": "14431:19:8", + "referencedDeclaration": 8928, + "src": "17318:35:6", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 3176, + "id": 6901, "isConstant": false, "isLValue": false, "isPure": false, @@ -9293,137 +11164,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "14431:40:8", + "src": "17318:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3177, + "id": 6902, "nodeType": "ExpressionStatement", - "src": "14431:40:8" + "src": "17318:56:6" }, { "expression": { - "argumentTypes": null, - "id": 3182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3178, - "name": "voucherIssuers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2629, - "src": "14481:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - } - }, - "id": 3180, - "indexExpression": { - "argumentTypes": null, - "id": 3179, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14496:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14481:30:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3181, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "14514:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14481:40:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3183, - "nodeType": "ExpressionStatement", - "src": "14481:40:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3184, + "id": 6903, "name": "voucherTokenId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14547:14:8", + "referencedDeclaration": 6860, + "src": "17394:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 3096, - "id": 3185, + "functionReturnParameters": 6824, + "id": 6904, "nodeType": "Return", - "src": "14540:21:8" + "src": "17387:21:6" } ] }, "documentation": { - "id": 3086, + "id": 6814, "nodeType": "StructuredDocumentation", - "src": "12925:430:8", + "src": "15580:437:6", "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" }, - "id": 3187, + "id": 6906, "implemented": true, "kind": "function", "modifiers": [], "name": "extract721", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 3093, + "id": 6821, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3088, + "id": 6816, "mutability": "mutable", "name": "_issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13380:15:8", + "scope": 6906, + "src": "16053:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9431,28 +11226,26 @@ "typeString": "address" }, "typeName": { - "id": 3087, + "id": 6815, "name": "address", "nodeType": "ElementaryTypeName", - "src": "13380:7:8", + "src": "16053:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3090, + "id": 6818, "mutability": "mutable", "name": "_to", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13397:11:8", + "scope": 6906, + "src": "16079:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9460,28 +11253,26 @@ "typeString": "address" }, "typeName": { - "id": 3089, + "id": 6817, "name": "address", "nodeType": "ElementaryTypeName", - "src": "13397:7:8", + "src": "16079:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3092, + "id": 6820, "mutability": "mutable", "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13410:22:8", + "scope": 6906, + "src": "16101:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9489,34 +11280,32 @@ "typeString": "uint256" }, "typeName": { - "id": 3091, + "id": 6819, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13410:7:8", + "src": "16101:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "13379:54:8" + "src": "16042:88:6" }, "returnParameters": { - "id": 3096, + "id": 6824, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3095, + "id": 6823, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13468:7:8", + "scope": 6906, + "src": "16149:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9524,37 +11313,334 @@ "typeString": "uint256" }, "typeName": { - "id": 3094, + "id": 6822, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13468:7:8", + "src": "16149:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "13467:9:8" + "src": "16148:9:6" }, - "scope": 4283, - "src": "13360:1208:8", + "scope": 8454, + "src": "16023:1393:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { + "baseFunctions": [ + 9344 + ], "body": { - "id": 3218, + "id": 6930, "nodeType": "Block", - "src": "14952:470:8", + "src": "17957:85:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3196, + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, "isConstant": false, "isLValue": false, "isPure": false, @@ -9562,15 +11648,14 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "14962:8:8", + "src": "18439:8:6", "subExpression": { - "argumentTypes": null, - "id": 3195, + "id": 6939, "name": "typeId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "14962:6:8", + "referencedDeclaration": 6253, + "src": "18439:6:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9581,45 +11666,42 @@ "typeString": "uint256" } }, - "id": 3197, + "id": 6941, "nodeType": "ExpressionStatement", - "src": "14962:8:8" + "src": "18439:8:6" }, { "condition": { - "argumentTypes": null, - "id": 3198, + "id": 6942, "name": "_isNonFungible", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3190, - "src": "14993:14:8", + "referencedDeclaration": 6934, + "src": "18464:14:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 3214, + "id": 6959, "nodeType": "Block", - "src": "15148:125:8", + "src": "18623:127:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3212, + "id": 6957, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3208, + "id": 6953, "name": "_tokenType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "15162:10:8", + "referencedDeclaration": 6937, + "src": "18638:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9628,24 +11710,22 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3211, + "id": 6956, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3209, + "id": 6954, "name": "typeId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "15175:6:8", + "referencedDeclaration": 6253, + "src": "18651:6:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9654,65 +11734,61 @@ "nodeType": "BinaryOperation", "operator": "<<", "rightExpression": { - "argumentTypes": null, "hexValue": "313238", - "id": 3210, + "id": 6955, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "15185:3:8", - "subdenomination": null, + "src": "18661:3:6", "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, - "src": "15175:13:8", + "src": "18651:13:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "15162:26:8", + "src": "18638:26:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3213, + "id": 6958, "nodeType": "ExpressionStatement", - "src": "15162:26:8" + "src": "18638:26:6" } ] }, - "id": 3215, + "id": 6960, "nodeType": "IfStatement", - "src": "14989:284:8", + "src": "18460:290:6", "trueBody": { - "id": 3207, + "id": 6952, "nodeType": "Block", - "src": "15009:133:8", + "src": "18480:137:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3205, + "id": 6950, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3199, + "id": 6943, "name": "_tokenType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "15023:10:8", + "referencedDeclaration": 6937, + "src": "18495:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9721,24 +11797,22 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3204, + "id": 6949, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3200, + "id": 6944, "name": "TYPE_NF_BIT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2669, - "src": "15036:11:8", + "referencedDeclaration": 6251, + "src": "18508:11:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9747,121 +11821,130 @@ "nodeType": "BinaryOperation", "operator": "|", "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3203, + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, "isConstant": false, + "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3201, - "name": "typeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "15050:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "313238", - "id": 3202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15060:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_128_by_1", - "typeString": "int_const 128" - }, - "value": "128" - }, - "src": "15050:13:8", + "nodeType": "TupleExpression", + "src": "18522:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "15036:27:8", + "src": "18508:29:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "15023:40:8", + "src": "18495:42:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3206, + "id": 6951, "nodeType": "ExpressionStatement", - "src": "15023:40:8" + "src": "18495:42:6" } ] } }, { "expression": { - "argumentTypes": null, - "id": 3216, + "id": 6961, "name": "_tokenType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "15405:10:8", + "referencedDeclaration": 6937, + "src": "18769:10:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 3194, - "id": 3217, + "functionReturnParameters": 6938, + "id": 6962, "nodeType": "Return", - "src": "15398:17:8" + "src": "18762:17:6" } ] }, "documentation": { - "id": 3188, + "id": 6932, "nodeType": "StructuredDocumentation", - "src": "14583:258:8", + "src": "18050:263:6", "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" }, - "id": 3219, + "id": 6964, "implemented": true, "kind": "function", "modifiers": [], "name": "generateTokenType", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 3191, + "id": 6935, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3190, + "id": 6934, "mutability": "mutable", "name": "_isNonFungible", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3219, - "src": "14873:19:8", + "scope": 6964, + "src": "18346:19:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9869,34 +11952,32 @@ "typeString": "bool" }, "typeName": { - "id": 3189, + "id": 6933, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "14873:4:8", + "src": "18346:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "value": null, "visibility": "internal" } ], - "src": "14872:21:8" + "src": "18345:21:6" }, "returnParameters": { - "id": 3194, + "id": 6938, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3193, + "id": 6937, "mutability": "mutable", "name": "_tokenType", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3219, - "src": "14928:18:8", + "scope": 6964, + "src": "18403:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9904,66 +11985,62 @@ "typeString": "uint256" }, "typeName": { - "id": 3192, + "id": 6936, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14928:7:8", + "src": "18403:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "14927:20:8" + "src": "18402:20:6" }, - "scope": 4283, - "src": "14846:576:8", + "scope": 8454, + "src": "18319:468:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "internal" }, { + "baseFunctions": [ + 9352 + ], "body": { - "id": 3279, + "id": 7031, "nodeType": "Block", - "src": "15657:1292:8", + "src": "19219:804:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3230, + "id": 6983, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "15930:14:8", + "referencedDeclaration": 6223, + "src": "19293:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3232, + "id": 6985, "indexExpression": { - "argumentTypes": null, - "id": 3231, + "id": 6984, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "15945:15:8", + "referencedDeclaration": 6967, + "src": "19308:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9974,21 +12051,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "15930:31:8", + "src": "19293:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3233, + "id": 6986, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "15930:38:8", + "referencedDeclaration": 6019, + "src": "19293:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -10002,18 +12079,18 @@ "typeString": "uint8" } ], - "id": 3229, + "id": 6982, "name": "isStateCommitted", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "15913:16:8", + "referencedDeclaration": 6044, + "src": "19276:16:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3234, + "id": 6987, "isConstant": false, "isLValue": false, "isPure": false, @@ -10021,7 +12098,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "15913:56:8", + "src": "19276:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -10029,17 +12106,15 @@ } }, { - "argumentTypes": null, "hexValue": "414c52454144595f50524f434553534544", - "id": 3235, + "id": 6988, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "15971:19:8", - "subdenomination": null, + "src": "19347:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", "typeString": "literal_string \"ALREADY_PROCESSED\"" @@ -10058,7 +12133,7 @@ "typeString": "literal_string \"ALREADY_PROCESSED\"" } ], - "id": 3228, + "id": 6981, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -10066,13 +12141,13 @@ -18 ], "referencedDeclaration": -18, - "src": "15905:7:8", + "src": "19254:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3236, + "id": 6989, "isConstant": false, "isLValue": false, "isPure": false, @@ -10080,29 +12155,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "15905:86:8", + "src": "19254:123:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3237, + "id": 6990, "nodeType": "ExpressionStatement", - "src": "15905:86:8" + "src": "19254:123:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3239, + "id": 6992, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16143:15:8", + "referencedDeclaration": 6967, + "src": "19524:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10116,18 +12189,18 @@ "typeString": "uint256" } ], - "id": 3238, + "id": 6991, "name": "isInValidityPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4282, - "src": "16124:18:8", + "referencedDeclaration": 8343, + "src": "19505:18:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", "typeString": "function (uint256) view returns (bool)" } }, - "id": 3240, + "id": 6993, "isConstant": false, "isLValue": false, "isPure": false, @@ -10135,81 +12208,74 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "16124:35:8", + "src": "19505:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3241, + "id": 6994, "nodeType": "ExpressionStatement", - "src": "16124:35:8" + "src": "19505:35:6" }, { "assignments": [ - 3243 + 6996 ], "declarations": [ { "constant": false, - "id": 3243, + "id": 6996, "mutability": "mutable", "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3279, - "src": "16169:23:8", + "scope": 7031, + "src": "19551:23:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "contractScope": null, - "id": 3242, + "id": 6995, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "16169:7:8", + "referencedDeclaration": 6189, + "src": "19551:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } }, - "value": null, "visibility": "internal" } ], - "id": 3249, + "id": 7002, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3244, + "id": 6997, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "16195:8:8", + "referencedDeclaration": 6204, + "src": "19590:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 3248, + "id": 7001, "indexExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3246, + "id": 6999, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16230:15:8", + "referencedDeclaration": 6967, + "src": "19625:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10223,18 +12289,18 @@ "typeString": "uint256" } ], - "id": 3245, + "id": 6998, "name": "getPromiseIdFromVoucherId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "16204:25:8", + "referencedDeclaration": 8043, + "src": "19599:25:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256) view returns (bytes32)" } }, - "id": 3247, + "id": 7000, "isConstant": false, "isLValue": false, "isPure": false, @@ -10242,7 +12308,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "16204:42:8", + "src": "19599:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -10254,49 +12320,44 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "16195:52:8", + "src": "19590:52:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "16169:78:8" + "src": "19551:91:6" }, { "expression": { - "argumentTypes": null, - "id": 3256, + "id": 7009, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3250, + "id": 7003, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "16671:14:8", + "referencedDeclaration": 6223, + "src": "19655:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3252, + "id": 7005, "indexExpression": { - "argumentTypes": null, - "id": 3251, + "id": 7004, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16686:15:8", + "referencedDeclaration": 6967, + "src": "19670:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10307,21 +12368,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "16671:31:8", + "src": "19655:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3253, + "id": 7006, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "16671:51:8", + "referencedDeclaration": 6025, + "src": "19655:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10330,78 +12391,70 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3254, + "id": 7007, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "16725:5:8", + "src": "19709:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3255, + "id": 7008, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16725:15:8", + "src": "19709:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "16671:69:8", + "src": "19655:69:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3257, + "id": 7010, "nodeType": "ExpressionStatement", - "src": "16671:69:8" + "src": "19655:69:6" }, { "expression": { - "argumentTypes": null, - "id": 3269, + "id": 7022, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3258, + "id": 7011, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "16750:14:8", + "referencedDeclaration": 6223, + "src": "19735:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3260, + "id": 7013, "indexExpression": { - "argumentTypes": null, - "id": 3259, + "id": 7012, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16765:15:8", + "referencedDeclaration": 6967, + "src": "19750:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10412,21 +12465,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "16750:31:8", + "src": "19735:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3261, + "id": 7014, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "16750:38:8", + "referencedDeclaration": 6019, + "src": "19735:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -10435,34 +12488,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3263, + "id": 7016, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "16801:14:8", + "referencedDeclaration": 6223, + "src": "19806:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3265, + "id": 7018, "indexExpression": { - "argumentTypes": null, - "id": 3264, + "id": 7017, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16816:15:8", + "referencedDeclaration": 6967, + "src": "19821:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10473,34 +12521,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "16801:31:8", + "src": "19806:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3266, + "id": 7019, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "16801:38:8", + "referencedDeclaration": 6019, + "src": "19806:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3267, - "name": "idxRedeem", + "id": 7020, + "name": "IDX_REDEEM", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "16841:9:8", + "referencedDeclaration": 5959, + "src": "19859:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -10518,18 +12565,18 @@ "typeString": "uint8" } ], - "id": 3262, - "name": "setChange", + "id": 7015, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "16791:9:8", + "referencedDeclaration": 6139, + "src": "19776:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3268, + "id": 7021, "isConstant": false, "isLValue": false, "isPure": false, @@ -10537,93 +12584,72 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "16791:60:8", + "src": "19776:104:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "16750:101:8", + "src": "19735:145:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3270, + "id": 7023, "nodeType": "ExpressionStatement", - "src": "16750:101:8" + "src": "19735:145:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3272, + "id": 7025, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16894:15:8", + "referencedDeclaration": 6967, + "src": "19931:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3273, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "16911:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16911:10:8", + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3275, + "id": 7027, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3243, - "src": "16923:8:8", + "referencedDeclaration": 6996, + "src": "19986:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3276, + "id": 7028, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "promiseId", "nodeType": "MemberAccess", - "referencedDeclaration": 2585, - "src": "16923:18:8", + "referencedDeclaration": 6172, + "src": "19986:18:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -10637,26 +12663,26 @@ "typeString": "uint256" }, { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" }, { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } ], - "id": 3271, + "id": 7024, "name": "LogVoucherRedeemed", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2697, - "src": "16875:18:8", + "referencedDeclaration": 6293, + "src": "19898:18:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", "typeString": "function (uint256,address,bytes32)" } }, - "id": 3277, + "id": 7029, "isConstant": false, "isLValue": false, "isPure": false, @@ -10664,80 +12690,128 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "16875:67:8", + "src": "19898:117:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3278, + "id": 7030, "nodeType": "EmitStatement", - "src": "16870:72:8" + "src": "19893:122:6" } ] }, "documentation": { - "id": 3220, + "id": 6965, "nodeType": "StructuredDocumentation", - "src": "15437:111:8", - "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher" + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" }, - "functionSelector": "db006a75", - "id": 3280, + "functionSelector": "7bde82f2", + "id": 7032, "implemented": true, "kind": "function", "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, { "arguments": [ { - "argumentTypes": null, - "id": 3225, + "id": 6977, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "15636:15:8", + "referencedDeclaration": 6967, + "src": "19185:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 3226, + "id": 6979, "modifierName": { - "argumentTypes": null, - "id": 3224, + "id": 6976, "name": "onlyVoucherOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "15619:16:8", + "referencedDeclaration": 6417, + "src": "19168:16:6", "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_uint256_$", - "typeString": "modifier (uint256)" + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" } }, "nodeType": "ModifierInvocation", - "src": "15619:33:8" + "src": "19168:45:6" } ], "name": "redeem", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, "parameters": { - "id": 3223, + "id": 6970, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3222, + "id": 6967, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3280, - "src": "15569:23:8", + "scope": 7032, + "src": "19031:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -10745,72 +12819,95 @@ "typeString": "uint256" }, "typeName": { - "id": 3221, + "id": 6966, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "15569:7:8", + "src": "19031:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "15568:25:8" + "src": "19030:45:6" }, "returnParameters": { - "id": 3227, + "id": 6980, "nodeType": "ParameterList", "parameters": [], - "src": "15657:0:8" + "src": "19219:0:6" }, - "scope": 4283, - "src": "15553:1396:8", + "scope": 8454, + "src": "19015:1008:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9360 + ], "body": { - "id": 3328, + "id": 7088, "nodeType": "Block", - "src": "17252:647:8", + "src": "20492:612:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3291, + "id": 7051, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17287:14:8", + "referencedDeclaration": 6223, + "src": "20542:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3293, + "id": 7053, "indexExpression": { - "argumentTypes": null, - "id": 3292, + "id": 7052, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17302:15:8", + "referencedDeclaration": 7035, + "src": "20557:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10821,21 +12918,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17287:31:8", + "src": "20542:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3294, + "id": 7054, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "17287:38:8", + "referencedDeclaration": 6019, + "src": "20542:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -10849,18 +12946,18 @@ "typeString": "uint8" } ], - "id": 3290, + "id": 7050, "name": "isStateCommitted", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "17270:16:8", + "referencedDeclaration": 6044, + "src": "20525:16:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3295, + "id": 7055, "isConstant": false, "isLValue": false, "isPure": false, @@ -10868,7 +12965,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17270:56:8", + "src": "20525:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -10876,17 +12973,15 @@ } }, { - "argumentTypes": null, "hexValue": "494e4150504c494341424c455f535441545553", - "id": 3296, + "id": 7056, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "17328:21:8", - "subdenomination": null, + "src": "20596:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", "typeString": "literal_string \"INAPPLICABLE_STATUS\"" @@ -10905,7 +13000,7 @@ "typeString": "literal_string \"INAPPLICABLE_STATUS\"" } ], - "id": 3289, + "id": 7049, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -10913,13 +13008,13 @@ -18 ], "referencedDeclaration": -18, - "src": "17262:7:8", + "src": "20503:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3297, + "id": 7057, "isConstant": false, "isLValue": false, "isPure": false, @@ -10927,29 +13022,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17262:88:8", + "src": "20503:125:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3298, + "id": 7058, "nodeType": "ExpressionStatement", - "src": "17262:88:8" + "src": "20503:125:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3300, + "id": 7060, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17519:15:8", + "referencedDeclaration": 7035, + "src": "20789:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10963,18 +13056,18 @@ "typeString": "uint256" } ], - "id": 3299, + "id": 7059, "name": "isInValidityPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4282, - "src": "17500:18:8", + "referencedDeclaration": 8343, + "src": "20770:18:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", "typeString": "function (uint256) view returns (bool)" } }, - "id": 3301, + "id": 7061, "isConstant": false, "isLValue": false, "isPure": false, @@ -10982,51 +13075,46 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17500:35:8", + "src": "20770:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3302, + "id": 7062, "nodeType": "ExpressionStatement", - "src": "17500:35:8" + "src": "20770:35:6" }, { "expression": { - "argumentTypes": null, - "id": 3309, + "id": 7069, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3303, + "id": 7063, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17653:14:8", + "referencedDeclaration": 6223, + "src": "20818:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3305, + "id": 7065, "indexExpression": { - "argumentTypes": null, - "id": 3304, + "id": 7064, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17668:15:8", + "referencedDeclaration": 7035, + "src": "20833:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11037,21 +13125,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17653:31:8", + "src": "20818:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3306, + "id": 7066, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "17653:51:8", + "referencedDeclaration": 6025, + "src": "20818:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11060,78 +13148,70 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3307, + "id": 7067, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "17707:5:8", + "src": "20872:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3308, + "id": 7068, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17707:15:8", + "src": "20872:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "17653:69:8", + "src": "20818:69:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3310, + "id": 7070, "nodeType": "ExpressionStatement", - "src": "17653:69:8" + "src": "20818:69:6" }, { "expression": { - "argumentTypes": null, - "id": 3322, + "id": 7082, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3311, + "id": 7071, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17732:14:8", + "referencedDeclaration": 6223, + "src": "20898:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3313, + "id": 7073, "indexExpression": { - "argumentTypes": null, - "id": 3312, + "id": 7072, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17747:15:8", + "referencedDeclaration": 7035, + "src": "20913:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11142,21 +13222,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17732:31:8", + "src": "20898:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3314, + "id": 7074, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "17732:38:8", + "referencedDeclaration": 6019, + "src": "20898:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -11165,34 +13245,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3316, + "id": 7076, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17783:14:8", + "referencedDeclaration": 6223, + "src": "20969:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3318, + "id": 7078, "indexExpression": { - "argumentTypes": null, - "id": 3317, + "id": 7077, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17798:15:8", + "referencedDeclaration": 7035, + "src": "20984:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11203,34 +13278,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "17783:31:8", + "src": "20969:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3319, + "id": 7079, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "17783:38:8", + "referencedDeclaration": 6019, + "src": "20969:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3320, - "name": "idxRefund", + "id": 7080, + "name": "IDX_REFUND", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "17823:9:8", + "referencedDeclaration": 5962, + "src": "21022:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -11248,18 +13322,18 @@ "typeString": "uint8" } ], - "id": 3315, - "name": "setChange", + "id": 7075, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "17773:9:8", + "referencedDeclaration": 6139, + "src": "20939:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3321, + "id": 7081, "isConstant": false, "isLValue": false, "isPure": false, @@ -11267,35 +13341,33 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17773:60:8", + "src": "20939:104:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "17732:101:8", + "src": "20898:145:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3323, + "id": 7083, "nodeType": "ExpressionStatement", - "src": "17732:101:8" + "src": "20898:145:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3325, + "id": 7085, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17876:15:8", + "referencedDeclaration": 7035, + "src": "21080:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11309,18 +13381,18 @@ "typeString": "uint256" } ], - "id": 3324, + "id": 7084, "name": "LogVoucherRefunded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2701, - "src": "17857:18:8", + "referencedDeclaration": 6297, + "src": "21061:18:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 3326, + "id": 7086, "isConstant": false, "isLValue": false, "isPure": false, @@ -11328,80 +13400,128 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17857:35:8", + "src": "21061:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3327, + "id": 7087, "nodeType": "EmitStatement", - "src": "17852:40:8" + "src": "21056:40:6" } ] }, "documentation": { - "id": 3281, + "id": 7033, "nodeType": "StructuredDocumentation", - "src": "17047:96:8", - "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher" + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" }, - "functionSelector": "278ecde1", - "id": 3329, + "functionSelector": "7ad226dc", + "id": 7089, "implemented": true, "kind": "function", "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, { "arguments": [ { - "argumentTypes": null, - "id": 3286, + "id": 7045, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17231:15:8", + "referencedDeclaration": 7035, + "src": "20458:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 3287, + "id": 7047, "modifierName": { - "argumentTypes": null, - "id": 3285, + "id": 7044, "name": "onlyVoucherOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "17214:16:8", + "referencedDeclaration": 6417, + "src": "20441:16:6", "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_uint256_$", - "typeString": "modifier (uint256)" + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" } }, "nodeType": "ModifierInvocation", - "src": "17214:33:8" + "src": "20441:45:6" } ], "name": "refund", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, "parameters": { - "id": 3284, + "id": 7038, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3283, + "id": 7035, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3329, - "src": "17164:23:8", + "scope": 7089, + "src": "20304:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11409,46 +13529,73 @@ "typeString": "uint256" }, "typeName": { - "id": 3282, + "id": 7034, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "17164:7:8", + "src": "20304:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "17163:25:8" + "src": "20303:45:6" }, "returnParameters": { - "id": 3288, + "id": 7048, "nodeType": "ParameterList", "parameters": [], - "src": "17252:0:8" + "src": "20492:0:6" }, - "scope": 4283, - "src": "17148:751:8", + "scope": 8454, + "src": "20288:816:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9368 + ], "body": { - "id": 3561, + "id": 7329, "nodeType": "Block", - "src": "18132:3206:8", + "src": "21505:4150:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3346, + "id": 7114, "isConstant": false, "isLValue": false, "isPure": false, @@ -11456,36 +13603,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "18150:62:8", + "src": "21538:63:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3340, + "id": 7108, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18160:14:8", + "referencedDeclaration": 6223, + "src": "21548:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3342, + "id": 7110, "indexExpression": { - "argumentTypes": null, - "id": 3341, + "id": 7109, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18175:15:8", + "referencedDeclaration": 7092, + "src": "21563:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11496,34 +13638,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18160:31:8", + "src": "21548:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3343, + "id": 7111, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18160:38:8", + "referencedDeclaration": 6019, + "src": "21548:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3344, - "name": "idxComplain", + "id": 7112, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "18200:11:8", + "referencedDeclaration": 5968, + "src": "21588:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -11541,18 +13682,18 @@ "typeString": "uint8" } ], - "id": 3339, + "id": 7107, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "18151:8:8", + "referencedDeclaration": 6121, + "src": "21539:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3345, + "id": 7113, "isConstant": false, "isLValue": false, "isPure": false, @@ -11560,7 +13701,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18151:61:8", + "src": "21539:62:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -11573,17 +13714,15 @@ } }, { - "argumentTypes": null, "hexValue": "414c52454144595f434f4d504c41494e4544", - "id": 3347, + "id": 7115, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "18214:20:8", - "subdenomination": null, + "src": "21616:20:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", "typeString": "literal_string \"ALREADY_COMPLAINED\"" @@ -11602,7 +13741,7 @@ "typeString": "literal_string \"ALREADY_COMPLAINED\"" } ], - "id": 3338, + "id": 7106, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -11610,13 +13749,13 @@ -18 ], "referencedDeclaration": -18, - "src": "18142:7:8", + "src": "21516:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3348, + "id": 7116, "isConstant": false, "isLValue": false, "isPure": false, @@ -11624,24 +13763,22 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18142:93:8", + "src": "21516:131:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3349, + "id": 7117, "nodeType": "ExpressionStatement", - "src": "18142:93:8" + "src": "21516:131:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3358, + "id": 7126, "isConstant": false, "isLValue": false, "isPure": false, @@ -11649,36 +13786,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "18335:59:8", + "src": "21762:60:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3352, + "id": 7120, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18345:14:8", + "referencedDeclaration": 6223, + "src": "21772:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3354, + "id": 7122, "indexExpression": { - "argumentTypes": null, - "id": 3353, + "id": 7121, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18360:15:8", + "referencedDeclaration": 7092, + "src": "21787:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11689,34 +13821,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18345:31:8", + "src": "21772:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3355, + "id": 7123, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18345:38:8", + "referencedDeclaration": 6019, + "src": "21772:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3356, - "name": "idxFinal", + "id": 7124, + "name": "IDX_FINAL", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "18385:8:8", + "referencedDeclaration": 5974, + "src": "21812:9:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -11734,18 +13865,18 @@ "typeString": "uint8" } ], - "id": 3351, + "id": 7119, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "18336:8:8", + "referencedDeclaration": 6121, + "src": "21763:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3357, + "id": 7125, "isConstant": false, "isLValue": false, "isPure": false, @@ -11753,7 +13884,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18336:58:8", + "src": "21763:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -11766,17 +13897,15 @@ } }, { - "argumentTypes": null, "hexValue": "414c52454144595f46494e414c495a4544", - "id": 3359, + "id": 7127, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "18396:19:8", - "subdenomination": null, + "src": "21837:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", "typeString": "literal_string \"ALREADY_FINALIZED\"" @@ -11795,7 +13924,7 @@ "typeString": "literal_string \"ALREADY_FINALIZED\"" } ], - "id": 3350, + "id": 7118, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -11803,13 +13932,13 @@ -18 ], "referencedDeclaration": -18, - "src": "18327:7:8", + "src": "21740:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3360, + "id": 7128, "isConstant": false, "isLValue": false, "isPure": false, @@ -11817,81 +13946,74 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18327:89:8", + "src": "21740:127:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3361, + "id": 7129, "nodeType": "ExpressionStatement", - "src": "18327:89:8" + "src": "21740:127:6" }, { "assignments": [ - 3363 + 7131 ], "declarations": [ { "constant": false, - "id": 3363, + "id": 7131, "mutability": "mutable", "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3561, - "src": "18565:23:8", + "scope": 7329, + "src": "22011:23:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "contractScope": null, - "id": 3362, + "id": 7130, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "18565:7:8", + "referencedDeclaration": 6189, + "src": "22011:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } }, - "value": null, "visibility": "internal" } ], - "id": 3369, + "id": 7137, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3364, + "id": 7132, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "18591:8:8", + "referencedDeclaration": 6204, + "src": "22050:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 3368, + "id": 7136, "indexExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3366, + "id": 7134, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18626:15:8", + "referencedDeclaration": 7092, + "src": "22085:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11905,18 +14027,18 @@ "typeString": "uint256" } ], - "id": 3365, + "id": 7133, "name": "getPromiseIdFromVoucherId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "18600:25:8", + "referencedDeclaration": 8043, + "src": "22059:25:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256) view returns (bytes32)" } }, - "id": 3367, + "id": 7135, "isConstant": false, "isLValue": false, "isPure": false, @@ -11924,7 +14046,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18600:42:8", + "src": "22059:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -11936,56 +14058,50 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18591:52:8", + "src": "22050:52:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "18565:78:8" + "src": "22011:91:6" }, { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 3382, + "id": 7150, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3371, + "id": 7139, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18725:14:8", + "referencedDeclaration": 6223, + "src": "22192:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3373, + "id": 7141, "indexExpression": { - "argumentTypes": null, - "id": 3372, + "id": 7140, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18740:15:8", + "referencedDeclaration": 7092, + "src": "22207:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11996,21 +14112,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18725:31:8", + "src": "22192:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3374, + "id": 7142, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18725:38:8", + "referencedDeclaration": 6019, + "src": "22192:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12024,18 +14140,18 @@ "typeString": "uint8" } ], - "id": 3370, + "id": 7138, "name": "isStateRedemptionSigned", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "18701:23:8", + "referencedDeclaration": 6063, + "src": "22168:23:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3375, + "id": 7143, "isConstant": false, "isLValue": false, "isPure": false, @@ -12043,7 +14159,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18701:63:8", + "src": "22168:63:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -12053,34 +14169,29 @@ "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3377, + "id": 7145, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18804:14:8", + "referencedDeclaration": 6223, + "src": "22264:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3379, + "id": 7147, "indexExpression": { - "argumentTypes": null, - "id": 3378, + "id": 7146, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18819:15:8", + "referencedDeclaration": 7092, + "src": "22279:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12091,21 +14202,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18804:31:8", + "src": "22264:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3380, + "id": 7148, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18804:38:8", + "referencedDeclaration": 6019, + "src": "22264:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12119,18 +14230,18 @@ "typeString": "uint8" } ], - "id": 3376, + "id": 7144, "name": "isStateRefunded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4372, - "src": "18788:15:8", + "referencedDeclaration": 6082, + "src": "22248:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3381, + "id": 7149, "isConstant": false, "isLValue": false, "isPure": false, @@ -12138,14 +14249,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18788:55:8", + "src": "22248:55:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "18701:142:8", + "src": "22168:135:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -12153,34 +14264,29 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3449, + "id": 7217, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19774:14:8", + "referencedDeclaration": 6223, + "src": "23653:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3451, + "id": 7219, "indexExpression": { - "argumentTypes": null, - "id": 3450, + "id": 7218, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19789:15:8", + "referencedDeclaration": 7092, + "src": "23668:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12191,21 +14297,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19774:31:8", + "src": "23653:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3452, + "id": 7220, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19774:38:8", + "referencedDeclaration": 6019, + "src": "23653:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12219,18 +14325,18 @@ "typeString": "uint8" } ], - "id": 3448, + "id": 7216, "name": "isStateExpired", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4390, - "src": "19759:14:8", + "referencedDeclaration": 6101, + "src": "23638:14:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3453, + "id": 7221, "isConstant": false, "isLValue": false, "isPure": false, @@ -12238,7 +14344,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19759:54:8", + "src": "23638:54:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -12247,34 +14353,29 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3516, + "id": 7284, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20670:14:8", + "referencedDeclaration": 6223, + "src": "24864:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3518, + "id": 7286, "indexExpression": { - "argumentTypes": null, - "id": 3517, + "id": 7285, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20685:15:8", + "referencedDeclaration": 7092, + "src": "24879:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12285,34 +14386,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "20670:31:8", + "src": "24864:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3519, + "id": 7287, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20670:38:8", + "referencedDeclaration": 6019, + "src": "24864:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3520, - "name": "idxCancelFault", + "id": 7288, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "20710:14:8", + "referencedDeclaration": 5971, + "src": "24904:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12330,18 +14430,18 @@ "typeString": "uint8" } ], - "id": 3515, + "id": 7283, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "20661:8:8", + "referencedDeclaration": 6121, + "src": "24855:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3521, + "id": 7289, "isConstant": false, "isLValue": false, "isPure": false, @@ -12349,7 +14449,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "20661:64:8", + "src": "24855:66:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -12357,26 +14457,23 @@ } }, "falseBody": { - "id": 3557, + "id": 7325, "nodeType": "Block", - "src": "21170:153:8", + "src": "25496:152:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "494e4150504c494341424c455f535441545553", - "id": 3554, + "id": 7322, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "21191:21:8", - "subdenomination": null, + "src": "25518:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", "typeString": "literal_string \"INAPPLICABLE_STATUS\"" @@ -12391,7 +14488,7 @@ "typeString": "literal_string \"INAPPLICABLE_STATUS\"" } ], - "id": 3553, + "id": 7321, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -12399,13 +14496,13 @@ -19 ], "referencedDeclaration": -19, - "src": "21184:6:8", + "src": "25511:6:6", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, - "id": 3555, + "id": 7323, "isConstant": false, "isLValue": false, "isPure": false, @@ -12413,66 +14510,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21184:29:8", + "src": "25511:29:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3556, + "id": 7324, "nodeType": "ExpressionStatement", - "src": "21184:29:8" + "src": "25511:29:6" } ] }, - "id": 3558, + "id": 7326, "nodeType": "IfStatement", - "src": "20657:666:8", + "src": "24837:811:6", "trueBody": { - "id": 3552, + "id": 7320, "nodeType": "Block", - "src": "20727:437:8", + "src": "24933:557:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3531, + "id": 7299, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3523, + "id": 7291, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "20749:5:8", + "src": "24974:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3524, + "id": 7292, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20749:15:8", + "src": "24974:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12481,42 +14573,37 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3530, + "id": 7298, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3525, + "id": 7293, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20768:14:8", + "referencedDeclaration": 6223, + "src": "25014:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3527, + "id": 7295, "indexExpression": { - "argumentTypes": null, - "id": 3526, + "id": 7294, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20783:15:8", + "referencedDeclaration": 7092, + "src": "25029:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12527,21 +14614,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "20768:31:8", + "src": "25014:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3528, + "id": 7296, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "20768:51:8", + "referencedDeclaration": 6025, + "src": "25014:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12550,42 +14637,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3529, + "id": 7297, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "20822:14:8", + "referencedDeclaration": 6255, + "src": "25093:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "20768:68:8", + "src": "25014:93:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "20749:87:8", + "src": "24974:133:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3532, + "id": 7300, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "20838:24:8", - "subdenomination": null, + "src": "25126:24:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" @@ -12604,7 +14688,7 @@ "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" } ], - "id": 3522, + "id": 7290, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -12612,13 +14696,13 @@ -18 ], "referencedDeclaration": -18, - "src": "20741:7:8", + "src": "24948:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3533, + "id": 7301, "isConstant": false, "isLValue": false, "isPure": false, @@ -12626,51 +14710,46 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "20741:122:8", + "src": "24948:217:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3534, + "id": 7302, "nodeType": "ExpressionStatement", - "src": "20741:122:8" + "src": "24948:217:6" }, { "expression": { - "argumentTypes": null, - "id": 3546, + "id": 7314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3535, + "id": 7303, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20970:14:8", + "referencedDeclaration": 6223, + "src": "25262:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3537, + "id": 7305, "indexExpression": { - "argumentTypes": null, - "id": 3536, + "id": 7304, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20985:15:8", + "referencedDeclaration": 7092, + "src": "25277:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12681,21 +14760,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "20970:31:8", + "src": "25262:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3538, + "id": 7306, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20970:38:8", + "referencedDeclaration": 6019, + "src": "25262:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12704,34 +14783,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3540, + "id": 7308, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "21021:14:8", + "referencedDeclaration": 6223, + "src": "25337:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3542, + "id": 7310, "indexExpression": { - "argumentTypes": null, - "id": 3541, + "id": 7309, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "21036:15:8", + "referencedDeclaration": 7092, + "src": "25352:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12742,34 +14816,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "21021:31:8", + "src": "25337:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3543, + "id": 7311, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "21021:38:8", + "referencedDeclaration": 6019, + "src": "25337:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3544, - "name": "idxComplain", + "id": 7312, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "21061:11:8", + "referencedDeclaration": 5968, + "src": "25394:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12787,18 +14860,18 @@ "typeString": "uint8" } ], - "id": 3539, - "name": "setChange", + "id": 7307, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "21011:9:8", + "referencedDeclaration": 6139, + "src": "25303:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3545, + "id": 7313, "isConstant": false, "isLValue": false, "isPure": false, @@ -12806,35 +14879,33 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21011:62:8", + "src": "25303:118:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "20970:103:8", + "src": "25262:159:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3547, + "id": 7315, "nodeType": "ExpressionStatement", - "src": "20970:103:8" + "src": "25262:159:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3549, + "id": 7317, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "21124:15:8", + "referencedDeclaration": 7092, + "src": "25462:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12848,18 +14919,18 @@ "typeString": "uint256" } ], - "id": 3548, + "id": 7316, "name": "LogVoucherComplain", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2705, - "src": "21105:18:8", + "referencedDeclaration": 6301, + "src": "25443:18:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 3550, + "id": 7318, "isConstant": false, "isLValue": false, "isPure": false, @@ -12867,32 +14938,31 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21105:35:8", + "src": "25443:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3551, + "id": 7319, "nodeType": "EmitStatement", - "src": "21100:40:8" + "src": "25438:40:6" } ] } }, - "id": 3559, + "id": 7327, "nodeType": "IfStatement", - "src": "19755:1568:8", + "src": "23634:2014:6", "trueBody": { - "id": 3514, + "id": 7282, "nodeType": "Block", - "src": "19815:836:8", + "src": "23694:1137:6", "statements": [ { "condition": { - "argumentTypes": null, - "id": 3461, + "id": 7229, "isConstant": false, "isLValue": false, "isPure": false, @@ -12900,36 +14970,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "19833:65:8", + "src": "23731:128:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3455, + "id": 7223, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19843:14:8", + "referencedDeclaration": 6223, + "src": "23763:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3457, + "id": 7225, "indexExpression": { - "argumentTypes": null, - "id": 3456, + "id": 7224, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19858:15:8", + "referencedDeclaration": 7092, + "src": "23778:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12940,34 +15005,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19843:31:8", + "src": "23763:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3458, + "id": 7226, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19843:38:8", + "referencedDeclaration": 6019, + "src": "23763:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3459, - "name": "idxCancelFault", + "id": 7227, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "19883:14:8", + "referencedDeclaration": 5971, + "src": "23824:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -12985,18 +15049,18 @@ "typeString": "uint8" } ], - "id": 3454, + "id": 7222, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "19834:8:8", + "referencedDeclaration": 6121, + "src": "23732:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3460, + "id": 7228, "isConstant": false, "isLValue": false, "isPure": false, @@ -13004,7 +15068,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19834:64:8", + "src": "23732:127:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -13017,49 +15081,44 @@ } }, "falseBody": { - "id": 3487, + "id": 7255, "nodeType": "Block", - "src": "20124:198:8", + "src": "24187:261:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3483, + "id": 7251, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3477, + "id": 7245, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "20150:5:8", + "src": "24236:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3478, + "id": 7246, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20150:15:8", + "src": "24236:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13068,40 +15127,37 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3482, + "id": 7250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3479, + "id": 7247, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3363, - "src": "20169:8:8", + "referencedDeclaration": 7131, + "src": "24255:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3480, + "id": 7248, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "20169:16:8", + "referencedDeclaration": 6180, + "src": "24255:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13110,42 +15166,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3481, + "id": 7249, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "20188:14:8", + "referencedDeclaration": 6255, + "src": "24274:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "20169:33:8", + "src": "24255:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "20150:52:8", + "src": "24236:52:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3484, + "id": 7252, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "20204:24:8", - "subdenomination": null, + "src": "24311:24:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" @@ -13164,7 +15217,7 @@ "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" } ], - "id": 3476, + "id": 7244, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -13172,13 +15225,13 @@ -18 ], "referencedDeclaration": -18, - "src": "20142:7:8", + "src": "24206:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3485, + "id": 7253, "isConstant": false, "isLValue": false, "isPure": false, @@ -13186,66 +15239,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "20142:87:8", + "src": "24206:148:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3486, + "id": 7254, "nodeType": "ExpressionStatement", - "src": "20142:87:8" + "src": "24206:148:6" } ] }, - "id": 3488, + "id": 7256, "nodeType": "IfStatement", - "src": "19829:493:8", + "src": "23709:739:6", "trueBody": { - "id": 3475, + "id": 7243, "nodeType": "Block", - "src": "19900:218:8", + "src": "23875:306:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3471, + "id": 7239, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3463, + "id": 7231, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "19926:5:8", + "src": "23924:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3464, + "id": 7232, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19926:15:8", + "src": "23924:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13254,51 +15302,47 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3470, + "id": 7238, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3468, + "id": 7236, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3465, + "id": 7233, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3363, - "src": "19945:8:8", + "referencedDeclaration": 7131, + "src": "23968:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3466, + "id": 7234, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "19945:16:8", + "referencedDeclaration": 6180, + "src": "23968:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13307,19 +15351,18 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3467, + "id": 7235, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "19964:14:8", + "referencedDeclaration": 6255, + "src": "23987:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19945:33:8", + "src": "23968:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13328,42 +15371,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3469, + "id": 7237, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "19981:17:8", + "referencedDeclaration": 6257, + "src": "24004:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19945:53:8", + "src": "23968:53:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19926:72:8", + "src": "23924:97:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3472, + "id": 7240, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "20000:24:8", - "subdenomination": null, + "src": "24044:24:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" @@ -13382,7 +15422,7 @@ "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" } ], - "id": 3462, + "id": 7230, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -13390,13 +15430,13 @@ -18 ], "referencedDeclaration": -18, - "src": "19918:7:8", + "src": "23894:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3473, + "id": 7241, "isConstant": false, "isLValue": false, "isPure": false, @@ -13404,54 +15444,49 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19918:107:8", + "src": "23894:193:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3474, + "id": 7242, "nodeType": "ExpressionStatement", - "src": "19918:107:8" + "src": "23894:193:6" } ] } }, { "expression": { - "argumentTypes": null, - "id": 3495, + "id": 7263, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3489, + "id": 7257, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20348:14:8", + "referencedDeclaration": 6223, + "src": "24464:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3491, + "id": 7259, "indexExpression": { - "argumentTypes": null, - "id": 3490, + "id": 7258, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20363:15:8", + "referencedDeclaration": 7092, + "src": "24479:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13462,21 +15497,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "20348:31:8", + "src": "24464:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3492, + "id": 7260, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "cancelFaultPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "20348:54:8", + "referencedDeclaration": 6027, + "src": "24464:54:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13485,78 +15520,70 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3493, + "id": 7261, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "20405:5:8", + "src": "24521:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3494, + "id": 7262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20405:15:8", + "src": "24521:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "20348:72:8", + "src": "24464:90:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3496, + "id": 7264, "nodeType": "ExpressionStatement", - "src": "20348:72:8" + "src": "24464:90:6" }, { "expression": { - "argumentTypes": null, - "id": 3508, + "id": 7276, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3497, + "id": 7265, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20434:14:8", + "referencedDeclaration": 6223, + "src": "24569:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3499, + "id": 7267, "indexExpression": { - "argumentTypes": null, - "id": 3498, + "id": 7266, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20449:15:8", + "referencedDeclaration": 7092, + "src": "24584:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13567,21 +15594,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "20434:31:8", + "src": "24569:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3500, + "id": 7268, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20434:38:8", + "referencedDeclaration": 6019, + "src": "24569:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -13590,34 +15617,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3502, + "id": 7270, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20485:14:8", + "referencedDeclaration": 6223, + "src": "24644:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3504, + "id": 7272, "indexExpression": { - "argumentTypes": null, - "id": 3503, + "id": 7271, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20500:15:8", + "referencedDeclaration": 7092, + "src": "24659:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13628,34 +15650,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "20485:31:8", + "src": "24644:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3505, + "id": 7273, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20485:38:8", + "referencedDeclaration": 6019, + "src": "24644:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3506, - "name": "idxComplain", + "id": 7274, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "20525:11:8", + "referencedDeclaration": 5968, + "src": "24701:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -13673,18 +15694,18 @@ "typeString": "uint8" } ], - "id": 3501, - "name": "setChange", + "id": 7269, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "20475:9:8", + "referencedDeclaration": 6139, + "src": "24610:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3507, + "id": 7275, "isConstant": false, "isLValue": false, "isPure": false, @@ -13692,35 +15713,33 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "20475:62:8", + "src": "24610:118:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "20434:103:8", + "src": "24569:159:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3509, + "id": 7277, "nodeType": "ExpressionStatement", - "src": "20434:103:8" + "src": "24569:159:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3511, + "id": 7279, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20588:15:8", + "referencedDeclaration": 7092, + "src": "24769:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13734,18 +15753,18 @@ "typeString": "uint256" } ], - "id": 3510, + "id": 7278, "name": "LogVoucherComplain", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2705, - "src": "20569:18:8", + "referencedDeclaration": 6301, + "src": "24750:18:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 3512, + "id": 7280, "isConstant": false, "isLValue": false, "isPure": false, @@ -13753,32 +15772,31 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "20569:35:8", + "src": "24750:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3513, + "id": 7281, "nodeType": "EmitStatement", - "src": "20564:40:8" + "src": "24745:40:6" } ] } }, - "id": 3560, + "id": 7328, "nodeType": "IfStatement", - "src": "18697:2626:8", + "src": "22150:3498:6", "trueBody": { - "id": 3447, + "id": 7215, "nodeType": "Block", - "src": "18845:904:8", + "src": "22315:1313:6", "statements": [ { "condition": { - "argumentTypes": null, - "id": 3390, + "id": 7158, "isConstant": false, "isLValue": false, "isPure": false, @@ -13786,36 +15804,31 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "18863:65:8", + "src": "22352:128:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3384, + "id": 7152, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18873:14:8", + "referencedDeclaration": 6223, + "src": "22384:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3386, + "id": 7154, "indexExpression": { - "argumentTypes": null, - "id": 3385, + "id": 7153, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18888:15:8", + "referencedDeclaration": 7092, + "src": "22399:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13826,34 +15839,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18873:31:8", + "src": "22384:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3387, + "id": 7155, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18873:38:8", + "referencedDeclaration": 6019, + "src": "22384:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3388, - "name": "idxCancelFault", + "id": 7156, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "18913:14:8", + "referencedDeclaration": 5971, + "src": "22445:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -13871,18 +15883,18 @@ "typeString": "uint8" } ], - "id": 3383, + "id": 7151, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "18864:8:8", + "referencedDeclaration": 6121, + "src": "22353:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3389, + "id": 7157, "isConstant": false, "isLValue": false, "isPure": false, @@ -13890,7 +15902,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18864:64:8", + "src": "22353:127:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -13903,49 +15915,44 @@ } }, "falseBody": { - "id": 3420, + "id": 7188, "nodeType": "Block", - "src": "19189:233:8", + "src": "22901:350:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3416, + "id": 7184, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3408, + "id": 7176, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "19215:5:8", + "src": "22950:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3409, + "id": 7177, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19215:15:8", + "src": "22950:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13954,42 +15961,37 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3415, + "id": 7183, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3410, + "id": 7178, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19234:14:8", + "referencedDeclaration": 6223, + "src": "22994:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3412, + "id": 7180, "indexExpression": { - "argumentTypes": null, - "id": 3411, + "id": 7179, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19249:15:8", + "referencedDeclaration": 7092, + "src": "23009:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14000,21 +16002,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19234:31:8", + "src": "22994:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3413, + "id": 7181, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "19234:51:8", + "referencedDeclaration": 6025, + "src": "22994:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14023,42 +16025,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3414, + "id": 7182, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "19288:14:8", + "referencedDeclaration": 6255, + "src": "23077:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19234:68:8", + "src": "22994:97:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19215:87:8", + "src": "22950:141:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3417, + "id": 7185, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "19304:24:8", - "subdenomination": null, + "src": "23114:24:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" @@ -14077,7 +16076,7 @@ "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" } ], - "id": 3407, + "id": 7175, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -14085,13 +16084,13 @@ -18 ], "referencedDeclaration": -18, - "src": "19207:7:8", + "src": "22920:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3418, + "id": 7186, "isConstant": false, "isLValue": false, "isPure": false, @@ -14099,66 +16098,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19207:122:8", + "src": "22920:237:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3419, + "id": 7187, "nodeType": "ExpressionStatement", - "src": "19207:122:8" + "src": "22920:237:6" } ] }, - "id": 3421, + "id": 7189, "nodeType": "IfStatement", - "src": "18859:563:8", + "src": "22330:921:6", "trueBody": { - "id": 3406, + "id": 7174, "nodeType": "Block", - "src": "18930:253:8", + "src": "22496:399:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3402, + "id": 7170, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3392, + "id": 7160, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "18956:5:8", + "src": "22545:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3393, + "id": 7161, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18956:15:8", + "src": "22545:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14167,53 +16161,47 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3401, + "id": 7169, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3399, + "id": 7167, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3394, + "id": 7162, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18975:14:8", + "referencedDeclaration": 6223, + "src": "22589:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3396, + "id": 7164, "indexExpression": { - "argumentTypes": null, - "id": 3395, + "id": 7163, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18990:15:8", + "referencedDeclaration": 7092, + "src": "22604:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14224,21 +16212,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "18975:31:8", + "src": "22589:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3397, + "id": 7165, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "18975:51:8", + "referencedDeclaration": 6025, + "src": "22589:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14247,19 +16235,18 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3398, + "id": 7166, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "19029:14:8", + "referencedDeclaration": 6255, + "src": "22672:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "18975:68:8", + "src": "22589:97:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14268,42 +16255,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3400, + "id": 7168, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "19046:17:8", + "referencedDeclaration": 6257, + "src": "22718:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "18975:88:8", + "src": "22589:146:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "18956:107:8", + "src": "22545:190:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3403, + "id": 7171, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "19065:24:8", - "subdenomination": null, + "src": "22758:24:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" @@ -14322,7 +16306,7 @@ "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" } ], - "id": 3391, + "id": 7159, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -14330,13 +16314,13 @@ -18 ], "referencedDeclaration": -18, - "src": "18948:7:8", + "src": "22515:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3404, + "id": 7172, "isConstant": false, "isLValue": false, "isPure": false, @@ -14344,54 +16328,49 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18948:142:8", + "src": "22515:286:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3405, + "id": 7173, "nodeType": "ExpressionStatement", - "src": "18948:142:8" + "src": "22515:286:6" } ] } }, { "expression": { - "argumentTypes": null, - "id": 3428, + "id": 7196, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3422, + "id": 7190, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19448:14:8", + "referencedDeclaration": 6223, + "src": "23267:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3424, + "id": 7192, "indexExpression": { - "argumentTypes": null, - "id": 3423, + "id": 7191, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19463:15:8", + "referencedDeclaration": 7092, + "src": "23282:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14402,21 +16381,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19448:31:8", + "src": "23267:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3425, + "id": 7193, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "cancelFaultPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "19448:54:8", + "referencedDeclaration": 6027, + "src": "23267:54:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14425,78 +16404,70 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3426, + "id": 7194, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "19505:5:8", + "src": "23324:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3427, + "id": 7195, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19505:15:8", + "src": "23324:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "19448:72:8", + "src": "23267:90:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3429, + "id": 7197, "nodeType": "ExpressionStatement", - "src": "19448:72:8" + "src": "23267:90:6" }, { "expression": { - "argumentTypes": null, - "id": 3441, + "id": 7209, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3430, + "id": 7198, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19534:14:8", + "referencedDeclaration": 6223, + "src": "23372:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3432, + "id": 7200, "indexExpression": { - "argumentTypes": null, - "id": 3431, + "id": 7199, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19549:15:8", + "referencedDeclaration": 7092, + "src": "23387:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14507,21 +16478,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19534:31:8", + "src": "23372:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3433, + "id": 7201, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19534:38:8", + "referencedDeclaration": 6019, + "src": "23372:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -14530,34 +16501,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3435, + "id": 7203, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19585:14:8", + "referencedDeclaration": 6223, + "src": "23447:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3437, + "id": 7205, "indexExpression": { - "argumentTypes": null, - "id": 3436, + "id": 7204, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19600:15:8", + "referencedDeclaration": 7092, + "src": "23462:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14568,34 +16534,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19585:31:8", + "src": "23447:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3438, + "id": 7206, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19585:38:8", + "referencedDeclaration": 6019, + "src": "23447:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3439, - "name": "idxComplain", + "id": 7207, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "19625:11:8", + "referencedDeclaration": 5968, + "src": "23504:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -14613,18 +16578,18 @@ "typeString": "uint8" } ], - "id": 3434, - "name": "setChange", + "id": 7202, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "19575:9:8", + "referencedDeclaration": 6139, + "src": "23413:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3440, + "id": 7208, "isConstant": false, "isLValue": false, "isPure": false, @@ -14632,35 +16597,33 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19575:62:8", + "src": "23413:118:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "19534:103:8", + "src": "23372:159:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3442, + "id": 7210, "nodeType": "ExpressionStatement", - "src": "19534:103:8" + "src": "23372:159:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3444, + "id": 7212, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19688:15:8", + "referencedDeclaration": 7092, + "src": "23572:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14674,18 +16637,18 @@ "typeString": "uint256" } ], - "id": 3443, + "id": 7211, "name": "LogVoucherComplain", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2705, - "src": "19669:18:8", + "referencedDeclaration": 6301, + "src": "23553:18:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 3445, + "id": 7213, "isConstant": false, "isLValue": false, "isPure": false, @@ -14693,16 +16656,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19669:35:8", + "src": "23553:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3446, + "id": 7214, "nodeType": "EmitStatement", - "src": "19664:40:8" + "src": "23548:40:6" } ] } @@ -14710,66 +16673,114 @@ ] }, "documentation": { - "id": 3330, + "id": 7090, "nodeType": "StructuredDocumentation", - "src": "17914:107:8", - "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher" + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" }, - "functionSelector": "284f0923", - "id": 3562, + "functionSelector": "66db9a09", + "id": 7330, "implemented": true, "kind": "function", "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, { "arguments": [ { - "argumentTypes": null, - "id": 3335, + "id": 7102, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18111:15:8", + "referencedDeclaration": 7092, + "src": "21471:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 3336, + "id": 7104, "modifierName": { - "argumentTypes": null, - "id": 3334, + "id": 7101, "name": "onlyVoucherOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "18094:16:8", + "referencedDeclaration": 6417, + "src": "21454:16:6", "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_uint256_$", - "typeString": "modifier (uint256)" + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" } }, "nodeType": "ModifierInvocation", - "src": "18094:33:8" + "src": "21454:45:6" } ], "name": "complain", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, "parameters": { - "id": 3333, + "id": 7095, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3332, + "id": 7092, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3562, - "src": "18044:23:8", + "scope": 7330, + "src": "21317:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14777,65 +16788,174 @@ "typeString": "uint256" }, "typeName": { - "id": 3331, + "id": 7091, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "18044:7:8", + "src": "21317:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "18043:25:8" + "src": "21316:45:6" }, "returnParameters": { - "id": 3337, + "id": 7105, "nodeType": "ParameterList", "parameters": [], - "src": "18132:0:8" + "src": "21505:0:6" }, - "scope": 4283, - "src": "18026:3312:8", + "scope": 8454, + "src": "21299:4356:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9376 + ], "body": { - "id": 3743, + "id": 7537, "nodeType": "Block", - "src": "21592:2725:8", + "src": "25968:3569:6", "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 3574, + "id": 7352, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3570, - "name": "_tokenIdVoucher", + "id": 7349, + "name": "tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "21627:15:8", + "referencedDeclaration": 7342, + "src": "26091:13:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14849,18 +16969,18 @@ "typeString": "uint256" } ], - "id": 3569, - "name": "getVoucherIssuer", + "id": 7348, + "name": "getSupplyHolder", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4231, - "src": "21610:16:8", + "referencedDeclaration": 8167, + "src": "26075:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", "typeString": "function (uint256) view returns (address)" } }, - "id": 3571, + "id": 7350, "isConstant": false, "isLValue": false, "isPure": false, @@ -14868,7 +16988,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21610:33:8", + "src": "26075:30:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", @@ -14878,52 +16998,33 @@ "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3572, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "21647:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21647:10:8", + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "21610:47:8", + "src": "26075:44:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e415554484f52495a45445f434f46", - "id": 3575, + "id": 7353, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "21658:18:8", - "subdenomination": null, + "src": "26134:18:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", "typeString": "literal_string \"UNAUTHORIZED_COF\"" @@ -14942,7 +17043,7 @@ "typeString": "literal_string \"UNAUTHORIZED_COF\"" } ], - "id": 3568, + "id": 7347, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -14950,13 +17051,13 @@ -18 ], "referencedDeclaration": -18, - "src": "21602:7:8", + "src": "26053:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3576, + "id": 7354, "isConstant": false, "isLValue": false, "isPure": false, @@ -14964,31 +17065,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21602:75:8", + "src": "26053:110:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3577, + "id": 7355, "nodeType": "ExpressionStatement", - "src": "21602:75:8" + "src": "26053:110:6" }, { "assignments": [ - 3579 + 7357 ], "declarations": [ { "constant": false, - "id": 3579, + "id": 7357, "mutability": "mutable", "name": "tStatus", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3743, - "src": "21782:13:8", + "scope": 7537, + "src": "26260:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14996,46 +17096,41 @@ "typeString": "uint8" }, "typeName": { - "id": 3578, + "id": 7356, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "21782:5:8", + "src": "26260:5:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "id": 3584, + "id": 7362, "initialValue": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3580, + "id": 7358, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "21798:14:8", + "referencedDeclaration": 6223, + "src": "26276:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3582, + "id": 7360, "indexExpression": { - "argumentTypes": null, - "id": 3581, + "id": 7359, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "21813:15:8", + "referencedDeclaration": 7333, + "src": "26291:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15046,36 +17141,34 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "21798:31:8", + "src": "26276:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3583, + "id": 7361, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "21798:38:8", + "referencedDeclaration": 6019, + "src": "26276:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "VariableDeclarationStatement", - "src": "21782:54:8" + "src": "26260:54:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3590, + "id": 7368, "isConstant": false, "isLValue": false, "isPure": false, @@ -15083,31 +17176,28 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "21863:34:8", + "src": "26335:36:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3587, + "id": 7365, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "21873:7:8", + "referencedDeclaration": 7357, + "src": "26345:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3588, - "name": "idxCancelFault", + "id": 7366, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "21882:14:8", + "referencedDeclaration": 5971, + "src": "26354:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -15125,18 +17215,18 @@ "typeString": "uint8" } ], - "id": 3586, + "id": 7364, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "21864:8:8", + "referencedDeclaration": 6121, + "src": "26336:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3589, + "id": 7367, "isConstant": false, "isLValue": false, "isPure": false, @@ -15144,7 +17234,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21864:33:8", + "src": "26336:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -15157,17 +17247,15 @@ } }, { - "argumentTypes": null, "hexValue": "414c52454144595f43414e43454c4641554c54", - "id": 3591, + "id": 7369, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "21899:21:8", - "subdenomination": null, + "src": "26373:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", "typeString": "literal_string \"ALREADY_CANCELFAULT\"" @@ -15186,7 +17274,7 @@ "typeString": "literal_string \"ALREADY_CANCELFAULT\"" } ], - "id": 3585, + "id": 7363, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -15194,13 +17282,13 @@ -18 ], "referencedDeclaration": -18, - "src": "21855:7:8", + "src": "26327:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3592, + "id": 7370, "isConstant": false, "isLValue": false, "isPure": false, @@ -15208,24 +17296,22 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21855:66:8", + "src": "26327:68:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3593, + "id": 7371, "nodeType": "ExpressionStatement", - "src": "21855:66:8" + "src": "26327:68:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3599, + "id": 7377, "isConstant": false, "isLValue": false, "isPure": false, @@ -15233,31 +17319,28 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "22021:28:8", + "src": "26496:29:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3596, + "id": 7374, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22031:7:8", + "referencedDeclaration": 7357, + "src": "26506:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3597, - "name": "idxFinal", + "id": 7375, + "name": "IDX_FINAL", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "22040:8:8", + "referencedDeclaration": 5974, + "src": "26515:9:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -15275,18 +17358,18 @@ "typeString": "uint8" } ], - "id": 3595, + "id": 7373, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22022:8:8", + "referencedDeclaration": 6121, + "src": "26497:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3598, + "id": 7376, "isConstant": false, "isLValue": false, "isPure": false, @@ -15294,7 +17377,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22022:27:8", + "src": "26497:28:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -15307,17 +17390,15 @@ } }, { - "argumentTypes": null, "hexValue": "414c52454144595f46494e414c495a4544", - "id": 3600, + "id": 7378, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "22051:19:8", - "subdenomination": null, + "src": "26527:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", "typeString": "literal_string \"ALREADY_FINALIZED\"" @@ -15336,7 +17417,7 @@ "typeString": "literal_string \"ALREADY_FINALIZED\"" } ], - "id": 3594, + "id": 7372, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -15344,13 +17425,13 @@ -18 ], "referencedDeclaration": -18, - "src": "22013:7:8", + "src": "26488:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3601, + "id": 7379, "isConstant": false, "isLValue": false, "isPure": false, @@ -15358,81 +17439,74 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22013:58:8", + "src": "26488:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3602, + "id": 7380, "nodeType": "ExpressionStatement", - "src": "22013:58:8" + "src": "26488:59:6" }, { "assignments": [ - 3604 + 7382 ], "declarations": [ { "constant": false, - "id": 3604, + "id": 7382, "mutability": "mutable", "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3743, - "src": "22172:23:8", + "scope": 7537, + "src": "26642:23:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "contractScope": null, - "id": 3603, + "id": 7381, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "22172:7:8", + "referencedDeclaration": 6189, + "src": "26642:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } }, - "value": null, "visibility": "internal" } ], - "id": 3610, + "id": 7388, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3605, + "id": 7383, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "22198:8:8", + "referencedDeclaration": 6204, + "src": "26681:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 3609, + "id": 7387, "indexExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3607, + "id": 7385, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22233:15:8", + "referencedDeclaration": 7333, + "src": "26716:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15446,18 +17520,18 @@ "typeString": "uint256" } ], - "id": 3606, + "id": 7384, "name": "getPromiseIdFromVoucherId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "22207:25:8", + "referencedDeclaration": 8043, + "src": "26690:25:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256) view returns (bytes32)" } }, - "id": 3608, + "id": 7386, "isConstant": false, "isLValue": false, "isPure": false, @@ -15465,7 +17539,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22207:42:8", + "src": "26690:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -15477,51 +17551,47 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "22198:52:8", + "src": "26681:52:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "22172:78:8" + "src": "26642:91:6" }, { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 3619, + "id": 7397, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3612, + "id": 7390, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22282:7:8", + "referencedDeclaration": 7357, + "src": "26759:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3613, - "name": "idxRedeem", + "id": 7391, + "name": "IDX_REDEEM", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "22291:9:8", + "referencedDeclaration": 5959, + "src": "26768:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -15539,18 +17609,18 @@ "typeString": "uint8" } ], - "id": 3611, + "id": 7389, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22273:8:8", + "referencedDeclaration": 6121, + "src": "26750:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3614, + "id": 7392, "isConstant": false, "isLValue": false, "isPure": false, @@ -15558,7 +17628,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22273:28:8", + "src": "26750:29:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -15568,29 +17638,26 @@ "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3616, + "id": 7394, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22314:7:8", + "referencedDeclaration": 7357, + "src": "26792:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3617, - "name": "idxRefund", + "id": 7395, + "name": "IDX_REFUND", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "22323:9:8", + "referencedDeclaration": 5962, + "src": "26801:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -15608,18 +17675,18 @@ "typeString": "uint8" } ], - "id": 3615, + "id": 7393, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22305:8:8", + "referencedDeclaration": 6121, + "src": "26783:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3618, + "id": 7396, "isConstant": false, "isLValue": false, "isPure": false, @@ -15627,14 +17694,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22305:28:8", + "src": "26783:29:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "22273:60:8", + "src": "26750:62:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -15642,29 +17709,26 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3666, + "id": 7444, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "23100:7:8", + "referencedDeclaration": 7357, + "src": "27829:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3667, - "name": "idxExpire", + "id": 7445, + "name": "IDX_EXPIRE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4301, - "src": "23109:9:8", + "referencedDeclaration": 5965, + "src": "27838:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -15682,18 +17746,18 @@ "typeString": "uint8" } ], - "id": 3665, + "id": 7443, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "23091:8:8", + "referencedDeclaration": 6121, + "src": "27820:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3668, + "id": 7446, "isConstant": false, "isLValue": false, "isPure": false, @@ -15701,7 +17765,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23091:28:8", + "src": "27820:29:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -15710,16 +17774,14 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3705, + "id": 7491, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "23724:7:8", + "referencedDeclaration": 7357, + "src": "28736:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -15733,18 +17795,18 @@ "typeString": "uint8" } ], - "id": 3704, + "id": 7490, "name": "isStateCommitted", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "23707:16:8", + "referencedDeclaration": 6044, + "src": "28719:16:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3706, + "id": 7492, "isConstant": false, "isLValue": false, "isPure": false, @@ -15752,7 +17814,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23707:25:8", + "src": "28719:25:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -15760,26 +17822,23 @@ } }, "falseBody": { - "id": 3725, + "id": 7519, "nodeType": "Block", - "src": "23997:153:8", + "src": "29189:152:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "494e4150504c494341424c455f535441545553", - "id": 3722, + "id": 7516, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "24018:21:8", - "subdenomination": null, + "src": "29211:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", "typeString": "literal_string \"INAPPLICABLE_STATUS\"" @@ -15794,7 +17853,7 @@ "typeString": "literal_string \"INAPPLICABLE_STATUS\"" } ], - "id": 3721, + "id": 7515, "name": "revert", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -15802,13 +17861,13 @@ -19 ], "referencedDeclaration": -19, - "src": "24011:6:8", + "src": "29204:6:6", "typeDescriptions": { "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", "typeString": "function (string memory) pure" } }, - "id": 3723, + "id": 7517, "isConstant": false, "isLValue": false, "isPure": false, @@ -15816,66 +17875,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "24011:29:8", + "src": "29204:29:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3724, + "id": 7518, "nodeType": "ExpressionStatement", - "src": "24011:29:8" + "src": "29204:29:6" } ] }, - "id": 3726, + "id": 7520, "nodeType": "IfStatement", - "src": "23703:447:8", + "src": "28715:626:6", "trueBody": { - "id": 3720, + "id": 7514, "nodeType": "Block", - "src": "23734:257:8", + "src": "28746:437:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3716, + "id": 7502, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3708, + "id": 7494, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "23788:5:8", + "src": "28820:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3709, + "id": 7495, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23788:15:8", + "src": "28820:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15884,51 +17938,47 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3715, + "id": 7501, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3713, + "id": 7499, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3710, + "id": 7496, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3604, - "src": "23807:8:8", + "referencedDeclaration": 7382, + "src": "28860:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3711, + "id": 7497, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "23807:16:8", + "referencedDeclaration": 6180, + "src": "28860:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15937,19 +17987,18 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3712, + "id": 7498, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "23826:14:8", + "referencedDeclaration": 6255, + "src": "28879:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23807:33:8", + "src": "28860:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15958,42 +18007,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3714, + "id": 7500, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "23843:17:8", + "referencedDeclaration": 6257, + "src": "28896:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23807:53:8", + "src": "28860:53:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23788:72:8", + "src": "28820:93:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f46504552494f445f45585049524544", - "id": 3717, + "id": 7503, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "23862:19:8", - "subdenomination": null, + "src": "28932:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", "typeString": "literal_string \"COFPERIOD_EXPIRED\"" @@ -16012,7 +18058,7 @@ "typeString": "literal_string \"COFPERIOD_EXPIRED\"" } ], - "id": 3707, + "id": 7493, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -16020,13 +18066,13 @@ -18 ], "referencedDeclaration": -18, - "src": "23780:7:8", + "src": "28794:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3718, + "id": 7504, "isConstant": false, "isLValue": false, "isPure": false, @@ -16034,32 +18080,128 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23780:102:8", + "src": "28794:172:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3719, + "id": 7505, "nodeType": "ExpressionStatement", - "src": "23780:102:8" + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" } ] } }, - "id": 3727, + "id": 7521, "nodeType": "IfStatement", - "src": "23087:1063:8", + "src": "27816:1525:6", "trueBody": { - "id": 3703, + "id": 7489, "nodeType": "Block", - "src": "23121:576:8", + "src": "27851:858:6", "statements": [ { "condition": { - "argumentTypes": null, - "id": 3673, + "id": 7451, "isConstant": false, "isLValue": false, "isPure": false, @@ -16067,31 +18209,28 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "23164:31:8", + "src": "27896:32:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3670, + "id": 7448, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "23174:7:8", + "referencedDeclaration": 7357, + "src": "27906:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3671, - "name": "idxComplain", + "id": 7449, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "23183:11:8", + "referencedDeclaration": 5968, + "src": "27915:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -16109,18 +18248,18 @@ "typeString": "uint8" } ], - "id": 3669, + "id": 7447, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "23165:8:8", + "referencedDeclaration": 6121, + "src": "27897:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3672, + "id": 7450, "isConstant": false, "isLValue": false, "isPure": false, @@ -16128,7 +18267,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23165:30:8", + "src": "27897:31:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -16141,49 +18280,44 @@ } }, "falseBody": { - "id": 3701, + "id": 7487, "nodeType": "Block", - "src": "23428:246:8", + "src": "28347:351:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3697, + "id": 7483, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3689, + "id": 7475, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "23454:5:8", + "src": "28396:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3690, + "id": 7476, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23454:15:8", + "src": "28396:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16192,42 +18326,37 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3696, + "id": 7482, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3691, + "id": 7477, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "23473:14:8", + "referencedDeclaration": 6223, + "src": "28440:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3693, + "id": 7479, "indexExpression": { - "argumentTypes": null, - "id": 3692, + "id": 7478, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "23488:15:8", + "referencedDeclaration": 7333, + "src": "28455:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16238,21 +18367,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "23473:31:8", + "src": "28440:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3694, + "id": 7480, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelFaultPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "23473:54:8", + "referencedDeclaration": 6027, + "src": "28440:54:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16261,42 +18390,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3695, + "id": 7481, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "23530:17:8", + "referencedDeclaration": 6257, + "src": "28526:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23473:74:8", + "src": "28440:103:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23454:93:8", + "src": "28396:147:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f46504552494f445f45585049524544", - "id": 3698, + "id": 7484, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "23549:19:8", - "subdenomination": null, + "src": "28566:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", "typeString": "literal_string \"COFPERIOD_EXPIRED\"" @@ -16315,7 +18441,7 @@ "typeString": "literal_string \"COFPERIOD_EXPIRED\"" } ], - "id": 3688, + "id": 7474, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -16323,13 +18449,13 @@ -18 ], "referencedDeclaration": -18, - "src": "23446:7:8", + "src": "28366:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3699, + "id": 7485, "isConstant": false, "isLValue": false, "isPure": false, @@ -16337,66 +18463,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23446:123:8", + "src": "28366:238:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3700, + "id": 7486, "nodeType": "ExpressionStatement", - "src": "23446:123:8" + "src": "28366:238:6" } ] }, - "id": 3702, + "id": 7488, "nodeType": "IfStatement", - "src": "23160:514:8", + "src": "27892:806:6", "trueBody": { - "id": 3687, + "id": 7473, "nodeType": "Block", - "src": "23197:225:8", + "src": "27930:411:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3683, + "id": 7461, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3675, + "id": 7453, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "23223:5:8", + "src": "27979:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3676, + "id": 7454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23223:15:8", + "src": "27979:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16405,51 +18526,47 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3682, + "id": 7460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3680, + "id": 7458, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3677, + "id": 7455, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3604, - "src": "23242:8:8", + "referencedDeclaration": 7382, + "src": "28023:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3678, + "id": 7456, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "23242:16:8", + "referencedDeclaration": 6180, + "src": "28023:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16458,19 +18575,18 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3679, + "id": 7457, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "23261:14:8", + "referencedDeclaration": 6255, + "src": "28042:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23242:33:8", + "src": "28023:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16479,42 +18595,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3681, + "id": 7459, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "23278:17:8", + "referencedDeclaration": 6257, + "src": "28059:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23242:53:8", + "src": "28023:53:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "23223:72:8", + "src": "27979:97:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f46504552494f445f45585049524544", - "id": 3684, + "id": 7462, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "23297:19:8", - "subdenomination": null, + "src": "28099:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", "typeString": "literal_string \"COFPERIOD_EXPIRED\"" @@ -16533,7 +18646,7 @@ "typeString": "literal_string \"COFPERIOD_EXPIRED\"" } ], - "id": 3674, + "id": 7452, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -16541,13 +18654,13 @@ -18 ], "referencedDeclaration": -18, - "src": "23215:7:8", + "src": "27949:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3685, + "id": 7463, "isConstant": false, "isLValue": false, "isPure": false, @@ -16555,16 +18668,113 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23215:102:8", + "src": "27949:188:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3686, + "id": 7464, "nodeType": "ExpressionStatement", - "src": "23215:102:8" + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" } ] } @@ -16572,18 +18782,17 @@ ] } }, - "id": 3728, + "id": 7522, "nodeType": "IfStatement", - "src": "22269:1881:8", + "src": "26746:2595:6", "trueBody": { - "id": 3664, + "id": 7442, "nodeType": "Block", - "src": "22335:746:8", + "src": "26814:996:6", "statements": [ { "condition": { - "argumentTypes": null, - "id": 3624, + "id": 7402, "isConstant": false, "isLValue": false, "isPure": false, @@ -16591,31 +18800,28 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "22392:31:8", + "src": "26872:32:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3621, + "id": 7399, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22402:7:8", + "referencedDeclaration": 7357, + "src": "26882:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3622, - "name": "idxComplain", + "id": 7400, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "22411:11:8", + "referencedDeclaration": 5968, + "src": "26891:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -16633,18 +18839,18 @@ "typeString": "uint8" } ], - "id": 3620, + "id": 7398, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22393:8:8", + "referencedDeclaration": 6121, + "src": "26873:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3623, + "id": 7401, "isConstant": false, "isLValue": false, "isPure": false, @@ -16652,7 +18858,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22393:30:8", + "src": "26873:31:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -16665,49 +18871,44 @@ } }, "falseBody": { - "id": 3662, + "id": 7440, "nodeType": "Block", - "src": "22812:246:8", + "src": "27448:351:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3658, + "id": 7436, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3650, + "id": 7428, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "22838:5:8", + "src": "27497:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3651, + "id": 7429, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22838:15:8", + "src": "27497:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16716,42 +18917,37 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3657, + "id": 7435, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3652, + "id": 7430, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "22857:14:8", + "referencedDeclaration": 6223, + "src": "27541:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3654, + "id": 7432, "indexExpression": { - "argumentTypes": null, - "id": 3653, + "id": 7431, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22872:15:8", + "referencedDeclaration": 7333, + "src": "27556:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16762,21 +18958,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "22857:31:8", + "src": "27541:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3655, + "id": 7433, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "cancelFaultPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "22857:54:8", + "referencedDeclaration": 6027, + "src": "27541:54:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16785,42 +18981,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3656, + "id": 7434, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "22914:17:8", + "referencedDeclaration": 6257, + "src": "27627:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "22857:74:8", + "src": "27541:103:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "22838:93:8", + "src": "27497:147:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f46504552494f445f45585049524544", - "id": 3659, + "id": 7437, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "22933:19:8", - "subdenomination": null, + "src": "27667:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", "typeString": "literal_string \"COFPERIOD_EXPIRED\"" @@ -16839,7 +19032,7 @@ "typeString": "literal_string \"COFPERIOD_EXPIRED\"" } ], - "id": 3649, + "id": 7427, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -16847,13 +19040,13 @@ -18 ], "referencedDeclaration": -18, - "src": "22830:7:8", + "src": "27467:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3660, + "id": 7438, "isConstant": false, "isLValue": false, "isPure": false, @@ -16861,66 +19054,61 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22830:123:8", + "src": "27467:238:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3661, + "id": 7439, "nodeType": "ExpressionStatement", - "src": "22830:123:8" + "src": "27467:238:6" } ] }, - "id": 3663, + "id": 7441, "nodeType": "IfStatement", - "src": "22388:670:8", + "src": "26868:931:6", "trueBody": { - "id": 3648, + "id": 7426, "nodeType": "Block", - "src": "22425:381:8", + "src": "26906:536:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3636, + "id": 7414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3626, + "id": 7404, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "22451:5:8", + "src": "26955:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3627, + "id": 7405, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22451:15:8", + "src": "26955:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16929,53 +19117,47 @@ "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3635, + "id": 7413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3633, + "id": 7411, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3628, + "id": 7406, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "22470:14:8", + "referencedDeclaration": 6223, + "src": "26999:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3630, + "id": 7408, "indexExpression": { - "argumentTypes": null, - "id": 3629, + "id": 7407, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22485:15:8", + "referencedDeclaration": 7333, + "src": "27014:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16986,21 +19168,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "22470:31:8", + "src": "26999:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3631, + "id": 7409, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "22470:51:8", + "referencedDeclaration": 6025, + "src": "26999:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17009,19 +19191,18 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3632, + "id": 7410, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "22524:14:8", + "referencedDeclaration": 6255, + "src": "27082:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "22470:68:8", + "src": "26999:97:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17030,42 +19211,39 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3634, + "id": 7412, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "22541:17:8", + "referencedDeclaration": 6257, + "src": "27128:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "22470:88:8", + "src": "26999:146:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "22451:107:8", + "src": "26955:190:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "434f46504552494f445f45585049524544", - "id": 3637, + "id": 7415, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "22560:19:8", - "subdenomination": null, + "src": "27168:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", "typeString": "literal_string \"COFPERIOD_EXPIRED\"" @@ -17084,7 +19262,7 @@ "typeString": "literal_string \"COFPERIOD_EXPIRED\"" } ], - "id": 3625, + "id": 7403, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -17092,13 +19270,13 @@ -18 ], "referencedDeclaration": -18, - "src": "22443:7:8", + "src": "26925:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3638, + "id": 7416, "isConstant": false, "isLValue": false, "isPure": false, @@ -17106,51 +19284,46 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22443:137:8", + "src": "26925:281:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3639, + "id": 7417, "nodeType": "ExpressionStatement", - "src": "22443:137:8" + "src": "26925:281:6" }, { "expression": { - "argumentTypes": null, - "id": 3646, + "id": 7424, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3640, + "id": 7418, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "22688:14:8", + "referencedDeclaration": 6223, + "src": "27303:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3642, + "id": 7420, "indexExpression": { - "argumentTypes": null, - "id": 3641, + "id": 7419, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22703:15:8", + "referencedDeclaration": 7333, + "src": "27318:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17161,21 +19334,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "22688:31:8", + "src": "27303:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3643, + "id": 7421, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "22688:51:8", + "referencedDeclaration": 6025, + "src": "27303:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17184,43 +19357,40 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3644, + "id": 7422, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "22742:5:8", + "src": "27357:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3645, + "id": 7423, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22742:15:8", + "src": "27357:37:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "22688:69:8", + "src": "27303:91:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3647, + "id": 7425, "nodeType": "ExpressionStatement", - "src": "22688:69:8" + "src": "27303:91:6" } ] } @@ -17230,38 +19400,33 @@ }, { "expression": { - "argumentTypes": null, - "id": 3737, + "id": 7531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3729, + "id": 7523, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "24164:14:8", + "referencedDeclaration": 6223, + "src": "29353:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3731, + "id": 7525, "indexExpression": { - "argumentTypes": null, - "id": 3730, + "id": 7524, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "24179:15:8", + "referencedDeclaration": 7333, + "src": "29368:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17272,21 +19437,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "24164:31:8", + "src": "29353:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3732, + "id": 7526, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "24164:38:8", + "referencedDeclaration": 6019, + "src": "29353:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -17295,29 +19460,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3734, + "id": 7528, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "24215:7:8", + "referencedDeclaration": 7357, + "src": "29424:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3735, - "name": "idxCancelFault", + "id": 7529, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "24224:14:8", + "referencedDeclaration": 5971, + "src": "29446:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -17335,18 +19497,18 @@ "typeString": "uint8" } ], - "id": 3733, - "name": "setChange", + "id": 7527, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "24205:9:8", + "referencedDeclaration": 6139, + "src": "29394:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3736, + "id": 7530, "isConstant": false, "isLValue": false, "isPure": false, @@ -17354,35 +19516,33 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "24205:34:8", + "src": "29394:79:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "24164:75:8", + "src": "29353:120:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3738, + "id": 7532, "nodeType": "ExpressionStatement", - "src": "24164:75:8" + "src": "29353:120:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3740, + "id": 7534, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "24285:15:8", + "referencedDeclaration": 7333, + "src": "29513:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17396,18 +19556,18 @@ "typeString": "uint256" } ], - "id": 3739, + "id": 7533, "name": "LogVoucherFaultCancel", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2709, - "src": "24263:21:8", + "referencedDeclaration": 6305, + "src": "29491:21:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 3741, + "id": 7535, "isConstant": false, "isLValue": false, "isPure": false, @@ -17415,46 +19575,68 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "24263:38:8", + "src": "29491:38:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3742, + "id": 7536, "nodeType": "EmitStatement", - "src": "24258:43:8" + "src": "29486:43:6" } ] }, "documentation": { - "id": 3563, + "id": 7331, "nodeType": "StructuredDocumentation", - "src": "21354:164:8", + "src": "25663:167:6", "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" }, - "functionSelector": "765e0fb8", - "id": 3744, + "functionSelector": "f5d7aa18", + "id": 7538, "implemented": true, "kind": "function", - "modifiers": [], + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], "name": "cancelOrFault", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, "parameters": { - "id": 3566, + "id": 7336, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3565, + "id": 7333, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3744, - "src": "21546:23:8", + "scope": 7538, + "src": "25859:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -17462,110 +19644,164 @@ "typeString": "uint256" }, "typeName": { - "id": 3564, + "id": 7332, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "21546:7:8", + "src": "25859:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "21545:25:8" + "src": "25858:45:6" }, "returnParameters": { - "id": 3567, + "id": 7340, "nodeType": "ParameterList", "parameters": [], - "src": "21592:0:8" + "src": "25968:0:6" }, - "scope": 4283, - "src": "21523:2794:8", + "scope": 8454, + "src": "25836:3701:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9386 + ], "body": { - "id": 3771, + "id": 7592, "nodeType": "Block", - "src": "24666:281:8", + "src": "30049:384:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, - "id": 3755, + "id": 7558, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3753, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3747, - "src": "24684:15:8", + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "BinaryOperation", - "operator": "!=", + "operator": "==", "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3754, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24703:1:8", - "subdenomination": null, + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "src": "24684:20:8", + "src": "30068:42:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 3756, + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "24706:16:8", - "subdenomination": null, + "src": "30112:18:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" }, - "value": "UNSPECIFIED_ID" + "value": "UNAUTHORIZED_COF" } ], "expression": { @@ -17575,11 +19811,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" } ], - "id": 3752, + "id": 7553, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -17587,13 +19823,13 @@ -18 ], "referencedDeclaration": -18, - "src": "24676:7:8", + "src": "30060:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3757, + "id": 7560, "isConstant": false, "isLValue": false, "isPure": false, @@ -17601,145 +19837,389 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "24676:47:8", + "src": "30060:71:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3758, + "id": 7561, "nodeType": "ExpressionStatement", - "src": "24676:47:8" + "src": "30060:71:6" }, { - "expression": { - "argumentTypes": null, - "id": 3764, + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3759, - "name": "vouchersStatus", + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "24824:14:8", + "referencedDeclaration": 7563, + "src": "30225:6:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3761, - "indexExpression": { - "argumentTypes": null, - "id": 3760, - "name": "_tokenIdVoucher", + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3747, - "src": "24839:15:8", + "referencedDeclaration": 8956, + "src": "30264:14:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" } }, + "id": 7578, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24824:31:8", + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" } }, - "id": 3762, + "id": 7579, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "memberName": "isPaymentReleased", + "lValueRequested": false, + "memberName": "burn", "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "24824:49:8", + "referencedDeclaration": 8918, + "src": "30264:35:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24876:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "24824:56:8", + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 3765, + "id": 7584, "nodeType": "ExpressionStatement", - "src": "24824:56:8" + "src": "30264:68:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3767, - "name": "_tokenIdVoucher", + "id": 7586, + "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3747, - "src": "24921:15:8", + "referencedDeclaration": 7541, + "src": "30375:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "hexValue": "30", - "id": 3768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24938:1:8", - "subdenomination": null, + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_address", + "typeString": "address" + } } ], "expression": { @@ -17749,22 +20229,22 @@ "typeString": "uint256" }, { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_address", + "typeString": "address" } ], - "id": 3766, - "name": "LogFundsReleased", + "id": 7585, + "name": "LogVoucherSetFaultCancel", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2745, - "src": "24904:16:8", + "referencedDeclaration": 6347, + "src": "30350:24:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", - "typeString": "function (uint256,uint8)" + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" } }, - "id": 3769, + "id": 7588, "isConstant": false, "isLValue": false, "isPure": false, @@ -17772,66 +20252,103 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "24904:36:8", + "src": "30350:49:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3770, + "id": 7589, "nodeType": "EmitStatement", - "src": "24899:41:8" + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" } ] }, "documentation": { - "id": 3745, + "id": 7539, "nodeType": "StructuredDocumentation", - "src": "24432:131:8", - "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" }, - "functionSelector": "75549516", - "id": 3772, + "functionSelector": "455e42f2", + "id": 7593, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 3750, + "id": 7547, "modifierName": { - "argumentTypes": null, - "id": 3749, - "name": "onlyFromCashier", + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "24646:15:8", + "referencedDeclaration": 13649, + "src": "30003:13:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "24646:15:8" + "src": "30003:13:6" } ], - "name": "setPaymentReleased", + "name": "cancelOrFaultVoucherSet", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, "parameters": { - "id": 3748, + "id": 7544, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3747, + "id": 7541, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3772, - "src": "24596:23:8", + "scope": 7593, + "src": "29893:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -17839,62 +20356,115 @@ "typeString": "uint256" }, "typeName": { - "id": 3746, + "id": 7540, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "24596:7:8", + "src": "29893:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "24595:25:8" + "src": "29892:41:6" }, "returnParameters": { - "id": 3751, + "id": 7552, "nodeType": "ParameterList", - "parameters": [], - "src": "24666:0:8" + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" }, - "scope": 4283, - "src": "24568:379:8", + "scope": 8454, + "src": "29860:573:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9328 + ], "body": { - "id": 3799, + "id": 7621, "nodeType": "Block", - "src": "25195:282:8", + "src": "30785:277:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3783, + "id": 7605, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3781, + "id": 7603, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3775, - "src": "25213:15:8", + "referencedDeclaration": 7596, + "src": "30804:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17903,41 +20473,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 3782, + "id": 7604, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "25232:1:8", - "subdenomination": null, + "src": "30823:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "25213:20:8", + "src": "30804:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f4944", - "id": 3784, + "id": 7606, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "25235:16:8", - "subdenomination": null, + "src": "30826:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", "typeString": "literal_string \"UNSPECIFIED_ID\"" @@ -17956,7 +20522,7 @@ "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 3780, + "id": 7602, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -17964,13 +20530,13 @@ -18 ], "referencedDeclaration": -18, - "src": "25205:7:8", + "src": "30796:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3785, + "id": 7607, "isConstant": false, "isLValue": false, "isPure": false, @@ -17978,51 +20544,46 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "25205:47:8", + "src": "30796:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3786, + "id": 7608, "nodeType": "ExpressionStatement", - "src": "25205:47:8" + "src": "30796:47:6" }, { "expression": { - "argumentTypes": null, - "id": 3792, + "id": 7614, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3787, + "id": 7609, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "25353:14:8", + "referencedDeclaration": 6223, + "src": "30944:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3789, + "id": 7611, "indexExpression": { - "argumentTypes": null, - "id": 3788, + "id": 7610, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3775, - "src": "25368:15:8", + "referencedDeclaration": 7596, + "src": "30959:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18033,21 +20594,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "25353:31:8", + "src": "30944:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3790, + "id": 7612, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "isDepositsReleased", + "memberName": "isPaymentReleased", "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "25353:50:8", + "referencedDeclaration": 6021, + "src": "30944:49:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -18056,67 +20617,61 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "74727565", - "id": 3791, + "id": 7613, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "25406:4:8", - "subdenomination": null, + "src": "30996:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "25353:57:8", + "src": "30944:56:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3793, + "id": 7615, "nodeType": "ExpressionStatement", - "src": "25353:57:8" + "src": "30944:56:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3795, + "id": 7617, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3775, - "src": "25451:15:8", + "referencedDeclaration": 7596, + "src": "31035:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, - "hexValue": "31", - "id": 3796, + "hexValue": "30", + "id": 7618, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "25468:1:8", - "subdenomination": null, + "src": "31052:1:6", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - "value": "1" + "value": "0" } ], "expression": { @@ -18126,22 +20681,22 @@ "typeString": "uint256" }, { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" } ], - "id": 3794, + "id": 7616, "name": "LogFundsReleased", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2745, - "src": "25434:16:8", + "referencedDeclaration": 6353, + "src": "31018:16:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", "typeString": "function (uint256,uint8)" } }, - "id": 3797, + "id": 7619, "isConstant": false, "isLValue": false, "isPure": false, @@ -18149,66 +20704,68 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "25434:36:8", + "src": "31018:36:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3798, + "id": 7620, "nodeType": "EmitStatement", - "src": "25429:41:8" + "src": "31013:41:6" } ] }, "documentation": { - "id": 3773, + "id": 7594, "nodeType": "StructuredDocumentation", - "src": "24958:133:8", - "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" }, - "functionSelector": "ebba1b29", - "id": 3800, + "functionSelector": "75549516", + "id": 7622, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 3778, + "id": 7600, "modifierName": { - "argumentTypes": null, - "id": 3777, + "id": 7599, "name": "onlyFromCashier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "25175:15:8", + "referencedDeclaration": 6397, + "src": "30764:15:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "25175:15:8" + "src": "30764:15:6" } ], - "name": "setDepositsReleased", + "name": "setPaymentReleased", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, "parameters": { - "id": 3776, + "id": 7597, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3775, + "id": 7596, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3800, - "src": "25125:23:8", + "scope": 7622, + "src": "30694:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18216,62 +20773,61 @@ "typeString": "uint256" }, "typeName": { - "id": 3774, + "id": 7595, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "25125:7:8", + "src": "30694:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "25124:25:8" + "src": "30693:25:6" }, "returnParameters": { - "id": 3779, + "id": 7601, "nodeType": "ParameterList", "parameters": [], - "src": "25195:0:8" + "src": "30785:0:6" }, - "scope": 4283, - "src": "25096:381:8", + "scope": 8454, + "src": "30666:396:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9334 + ], "body": { - "id": 3854, + "id": 7650, "nodeType": "Block", - "src": "25735:618:8", + "src": "31332:278:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3809, + "id": 7634, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3807, + "id": 7632, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "25753:15:8", + "referencedDeclaration": 7625, + "src": "31351:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18280,41 +20836,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 3808, + "id": 7633, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "25772:1:8", - "subdenomination": null, + "src": "31370:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "25753:20:8", + "src": "31351:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f4944", - "id": 3810, + "id": 7635, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "25775:16:8", - "subdenomination": null, + "src": "31373:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", "typeString": "literal_string \"UNSPECIFIED_ID\"" @@ -18333,7 +20885,7 @@ "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 3806, + "id": 7631, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -18341,13 +20893,13 @@ -18 ], "referencedDeclaration": -18, - "src": "25745:7:8", + "src": "31343:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3811, + "id": 7636, "isConstant": false, "isLValue": false, "isPure": false, @@ -18355,181 +20907,533 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "25745:47:8", + "src": "31343:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3812, + "id": 7637, "nodeType": "ExpressionStatement", - "src": "25745:47:8" + "src": "31343:47:6" }, { - "assignments": [ - 3814 - ], - "declarations": [ - { - "constant": false, - "id": 3814, - "mutability": "mutable", - "name": "tPromise", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3854, - "src": "25902:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise" - }, - "typeName": { - "contractScope": null, - "id": 3813, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "25902:7:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3820, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3815, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "25928:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 3819, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3817, - "name": "_tokenIdVoucher", + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "25963:15:8", + "referencedDeclaration": 6223, + "src": "31491:14:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } - } - ], - "expression": { - "argumentTypes": [ - { + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - ], - "id": 3816, - "name": "getPromiseIdFromVoucherId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "25937:25:8", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3818, + "id": 7641, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25937:42:8", - "tryCall": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "25928:52:8", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "VariableDeclarationStatement", - "src": "25902:78:8" + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" }, { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 3832, + "id": 7684, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3825, + "id": 7677, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3821, + "id": 7673, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3814, - "src": "26003:8:8", + "referencedDeclaration": 7666, + "src": "32092:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3822, + "id": 7674, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "26003:16:8", + "referencedDeclaration": 6180, + "src": "32092:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18538,35 +21442,32 @@ "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3823, + "id": 7675, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "26022:5:8", + "src": "32111:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3824, + "id": 7676, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26022:15:8", + "src": "32111:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "26003:34:8", + "src": "32092:34:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -18575,34 +21476,29 @@ "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3827, + "id": 7679, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26070:14:8", + "referencedDeclaration": 6223, + "src": "32160:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3829, + "id": 7681, "indexExpression": { - "argumentTypes": null, - "id": 3828, + "id": 7680, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26085:15:8", + "referencedDeclaration": 7654, + "src": "32175:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18613,21 +21509,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26070:31:8", + "src": "32160:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3830, + "id": 7682, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26070:38:8", + "referencedDeclaration": 6019, + "src": "32160:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -18641,18 +21537,18 @@ "typeString": "uint8" } ], - "id": 3826, + "id": 7678, "name": "isStateCommitted", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "26053:16:8", + "referencedDeclaration": 6044, + "src": "32143:16:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3831, + "id": 7683, "isConstant": false, "isLValue": false, "isPure": false, @@ -18660,62 +21556,56 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26053:56:8", + "src": "32143:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "26003:106:8", + "src": "32092:107:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3853, + "id": 7705, "nodeType": "IfStatement", - "src": "25999:346:8", + "src": "32074:394:6", "trueBody": { - "id": 3852, + "id": 7704, "nodeType": "Block", - "src": "26124:221:8", + "src": "32211:257:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3844, + "id": 7696, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3833, + "id": 7685, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26142:14:8", + "referencedDeclaration": 6223, + "src": "32226:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3835, + "id": 7687, "indexExpression": { - "argumentTypes": null, - "id": 3834, + "id": 7686, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26157:15:8", + "referencedDeclaration": 7654, + "src": "32241:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18726,21 +21616,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26142:31:8", + "src": "32226:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3836, + "id": 7688, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26142:38:8", + "referencedDeclaration": 6019, + "src": "32226:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -18749,34 +21639,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3838, + "id": 7690, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26193:14:8", + "referencedDeclaration": 6223, + "src": "32301:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3840, + "id": 7692, "indexExpression": { - "argumentTypes": null, - "id": 3839, + "id": 7691, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26208:15:8", + "referencedDeclaration": 7654, + "src": "32316:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18787,34 +21672,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26193:31:8", + "src": "32301:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3841, + "id": 7693, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26193:38:8", + "referencedDeclaration": 6019, + "src": "32301:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3842, - "name": "idxExpire", + "id": 7694, + "name": "IDX_EXPIRE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4301, - "src": "26233:9:8", + "referencedDeclaration": 5965, + "src": "32358:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -18832,18 +21716,18 @@ "typeString": "uint8" } ], - "id": 3837, - "name": "setChange", + "id": 7689, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "26183:9:8", + "referencedDeclaration": 6139, + "src": "32267:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3843, + "id": 7695, "isConstant": false, "isLValue": false, "isPure": false, @@ -18851,64 +21735,59 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26183:60:8", + "src": "32267:116:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "26142:101:8", + "src": "32226:157:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3845, + "id": 7697, "nodeType": "ExpressionStatement", - "src": "26142:101:8" + "src": "32226:157:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3847, + "id": 7699, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26306:15:8", + "referencedDeclaration": 7654, + "src": "32428:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3848, + "id": 7700, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "26323:3:8", + "src": "32445:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 3849, + "id": 7701, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26323:10:8", + "src": "32445:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -18926,18 +21805,18 @@ "typeString": "address payable" } ], - "id": 3846, + "id": 7698, "name": "LogExpirationTriggered", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2715, - "src": "26283:22:8", + "referencedDeclaration": 6311, + "src": "32405:22:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", "typeString": "function (uint256,address)" } }, - "id": 3850, + "id": 7702, "isConstant": false, "isLValue": false, "isPure": false, @@ -18945,16 +21824,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26283:51:8", + "src": "32405:51:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3851, + "id": 7703, "nodeType": "EmitStatement", - "src": "26278:56:8" + "src": "32400:56:6" } ] } @@ -18962,32 +21841,36 @@ ] }, "documentation": { - "id": 3801, + "id": 7652, "nodeType": "StructuredDocumentation", - "src": "25496:112:8", + "src": "31618:115:6", "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" }, "functionSelector": "d40ffcf8", - "id": 3855, + "id": 7707, "implemented": true, "kind": "function", "modifiers": [], "name": "triggerExpiration", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, "parameters": { - "id": 3804, + "id": 7655, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3803, + "id": 7654, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3855, - "src": "25689:23:8", + "scope": 7707, + "src": "31766:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18995,62 +21878,61 @@ "typeString": "uint256" }, "typeName": { - "id": 3802, + "id": 7653, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "25689:7:8", + "src": "31766:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "25688:25:8" + "src": "31765:25:6" }, "returnParameters": { - "id": 3805, + "id": 7657, "nodeType": "ParameterList", "parameters": [], - "src": "25735:0:8" + "src": "31809:0:6" }, - "scope": 4283, - "src": "25662:691:8", + "scope": 8454, + "src": "31739:736:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9412 + ], "body": { - "id": 4007, + "id": 7860, "nodeType": "Block", - "src": "26616:2060:8", + "src": "32688:2186:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3864, + "id": 7717, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3862, + "id": 7715, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "26634:15:8", + "referencedDeclaration": 7710, + "src": "32707:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19059,41 +21941,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 3863, + "id": 7716, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "26653:1:8", - "subdenomination": null, + "src": "32726:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "26634:20:8", + "src": "32707:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f4944", - "id": 3865, + "id": 7718, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "26656:16:8", - "subdenomination": null, + "src": "32729:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", "typeString": "literal_string \"UNSPECIFIED_ID\"" @@ -19112,7 +21990,7 @@ "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 3861, + "id": 7714, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -19120,13 +21998,13 @@ -18 ], "referencedDeclaration": -18, - "src": "26626:7:8", + "src": "32699:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3866, + "id": 7719, "isConstant": false, "isLValue": false, "isPure": false, @@ -19134,31 +22012,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26626:47:8", + "src": "32699:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3867, + "id": 7720, "nodeType": "ExpressionStatement", - "src": "26626:47:8" + "src": "32699:47:6" }, { "assignments": [ - 3869 + 7722 ], "declarations": [ { "constant": false, - "id": 3869, + "id": 7722, "mutability": "mutable", "name": "tStatus", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4007, - "src": "26783:13:8", + "scope": 7860, + "src": "32849:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19166,46 +22043,41 @@ "typeString": "uint8" }, "typeName": { - "id": 3868, + "id": 7721, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "26783:5:8", + "src": "32849:5:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "id": 3874, + "id": 7727, "initialValue": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3870, + "id": 7723, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26799:14:8", + "referencedDeclaration": 6223, + "src": "32865:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3872, + "id": 7725, "indexExpression": { - "argumentTypes": null, - "id": 3871, + "id": 7724, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "26814:15:8", + "referencedDeclaration": 7710, + "src": "32880:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19216,36 +22088,34 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "26799:31:8", + "src": "32865:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3873, + "id": 7726, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26799:38:8", + "referencedDeclaration": 6019, + "src": "32865:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "VariableDeclarationStatement", - "src": "26783:54:8" + "src": "32849:54:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3880, + "id": 7733, "isConstant": false, "isLValue": false, "isPure": false, @@ -19253,31 +22123,28 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "26864:28:8", + "src": "32924:29:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3877, + "id": 7730, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "26874:7:8", + "referencedDeclaration": 7722, + "src": "32934:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3878, - "name": "idxFinal", + "id": 7731, + "name": "IDX_FINAL", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "26883:8:8", + "referencedDeclaration": 5974, + "src": "32943:9:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -19295,18 +22162,18 @@ "typeString": "uint8" } ], - "id": 3876, + "id": 7729, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "26865:8:8", + "referencedDeclaration": 6121, + "src": "32925:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3879, + "id": 7732, "isConstant": false, "isLValue": false, "isPure": false, @@ -19314,7 +22181,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26865:27:8", + "src": "32925:28:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -19327,17 +22194,15 @@ } }, { - "argumentTypes": null, "hexValue": "414c52454144595f46494e414c495a4544", - "id": 3881, + "id": 7734, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "26894:19:8", - "subdenomination": null, + "src": "32955:19:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", "typeString": "literal_string \"ALREADY_FINALIZED\"" @@ -19356,7 +22221,7 @@ "typeString": "literal_string \"ALREADY_FINALIZED\"" } ], - "id": 3875, + "id": 7728, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -19364,13 +22229,13 @@ -18 ], "referencedDeclaration": -18, - "src": "26856:7:8", + "src": "32916:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3882, + "id": 7735, "isConstant": false, "isLValue": false, "isPure": false, @@ -19378,31 +22243,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26856:58:8", + "src": "32916:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3883, + "id": 7736, "nodeType": "ExpressionStatement", - "src": "26856:58:8" + "src": "32916:59:6" }, { "assignments": [ - 3885 + 7738 ], "declarations": [ { "constant": false, - "id": 3885, + "id": 7738, "mutability": "mutable", "name": "mark", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4007, - "src": "27024:9:8", + "scope": 7860, + "src": "33070:9:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19410,88 +22274,79 @@ "typeString": "bool" }, "typeName": { - "id": 3884, + "id": 7737, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "27024:4:8", + "src": "33070:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "value": null, "visibility": "internal" } ], - "id": 3886, - "initialValue": null, + "id": 7739, "nodeType": "VariableDeclarationStatement", - "src": "27024:9:8" + "src": "33070:9:6" }, { "assignments": [ - 3888 + 7741 ], "declarations": [ { "constant": false, - "id": 3888, + "id": 7741, "mutability": "mutable", "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4007, - "src": "27043:23:8", + "scope": 7860, + "src": "33090:23:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "contractScope": null, - "id": 3887, + "id": 7740, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "27043:7:8", + "referencedDeclaration": 6189, + "src": "33090:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } }, - "value": null, "visibility": "internal" } ], - "id": 3894, + "id": 7747, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3889, + "id": 7742, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "27069:8:8", + "referencedDeclaration": 6204, + "src": "33129:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 3893, + "id": 7746, "indexExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3891, + "id": 7744, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "27104:15:8", + "referencedDeclaration": 7710, + "src": "33164:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19505,18 +22360,18 @@ "typeString": "uint256" } ], - "id": 3890, + "id": 7743, "name": "getPromiseIdFromVoucherId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "27078:25:8", + "referencedDeclaration": 8043, + "src": "33138:25:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256) view returns (bytes32)" } }, - "id": 3892, + "id": 7745, "isConstant": false, "isLValue": false, "isPure": false, @@ -19524,7 +22379,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27078:42:8", + "src": "33138:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -19536,40 +22391,37 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "27069:52:8", + "src": "33129:52:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "27043:78:8" + "src": "33090:91:6" }, { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3896, + "id": 7749, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27153:7:8", + "referencedDeclaration": 7722, + "src": "33207:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3897, - "name": "idxComplain", + "id": 7750, + "name": "IDX_COMPLAIN", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "27162:11:8", + "referencedDeclaration": 5968, + "src": "33216:12:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -19587,18 +22439,18 @@ "typeString": "uint8" } ], - "id": 3895, + "id": 7748, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "27144:8:8", + "referencedDeclaration": 6121, + "src": "33198:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3898, + "id": 7751, "isConstant": false, "isLValue": false, "isPure": false, @@ -19606,7 +22458,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27144:30:8", + "src": "33198:31:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -19615,40 +22467,36 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 3938, + "id": 7791, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3926, + "id": 7779, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27586:7:8", + "referencedDeclaration": 7722, + "src": "33708:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3927, - "name": "idxCancelFault", + "id": 7780, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "27595:14:8", + "referencedDeclaration": 5971, + "src": "33717:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -19666,18 +22514,18 @@ "typeString": "uint8" } ], - "id": 3925, + "id": 7778, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "27577:8:8", + "referencedDeclaration": 6121, + "src": "33699:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3928, + "id": 7781, "isConstant": false, "isLValue": false, "isPure": false, @@ -19685,7 +22533,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27577:33:8", + "src": "33699:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -19695,40 +22543,36 @@ "nodeType": "BinaryOperation", "operator": "&&", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3937, + "id": 7790, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3929, + "id": 7782, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "27634:5:8", + "src": "33751:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3930, + "id": 7783, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27634:15:8", + "src": "33751:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19737,42 +22581,37 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3936, + "id": 7789, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3931, + "id": 7784, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "27653:14:8", + "referencedDeclaration": 6223, + "src": "33783:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3933, + "id": 7786, "indexExpression": { - "argumentTypes": null, - "id": 3932, + "id": 7785, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "27668:15:8", + "referencedDeclaration": 7710, + "src": "33798:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19783,21 +22622,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "27653:31:8", + "src": "33783:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3934, + "id": 7787, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "27653:51:8", + "referencedDeclaration": 6025, + "src": "33783:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19806,31 +22645,30 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3935, + "id": 7788, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "27707:14:8", + "referencedDeclaration": 6255, + "src": "33837:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27653:68:8", + "src": "33783:68:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27634:87:8", + "src": "33751:100:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "27577:144:8", + "src": "33699:152:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19838,27 +22676,24 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 3950, + "id": 7803, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3945, + "id": 7798, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27882:7:8", + "referencedDeclaration": 7722, + "src": "34005:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -19872,18 +22707,18 @@ "typeString": "uint8" } ], - "id": 3944, + "id": 7797, "name": "isStateRedemptionSigned", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "27858:23:8", + "referencedDeclaration": 6063, + "src": "33981:23:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3946, + "id": 7799, "isConstant": false, "isLValue": false, "isPure": false, @@ -19891,7 +22726,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27858:32:8", + "src": "33981:32:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -19901,16 +22736,14 @@ "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3948, + "id": 7801, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27930:7:8", + "referencedDeclaration": 7722, + "src": "34033:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -19924,18 +22757,18 @@ "typeString": "uint8" } ], - "id": 3947, + "id": 7800, "name": "isStateRefunded", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4372, - "src": "27914:15:8", + "referencedDeclaration": 6082, + "src": "34017:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3949, + "id": 7802, "isConstant": false, "isLValue": false, "isPure": false, @@ -19943,14 +22776,14 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27914:24:8", + "src": "34017:24:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "27858:80:8", + "src": "33981:60:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19958,16 +22791,14 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3968, + "id": 7821, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "28233:7:8", + "referencedDeclaration": 7722, + "src": "34408:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -19981,18 +22812,18 @@ "typeString": "uint8" } ], - "id": 3967, + "id": 7820, "name": "isStateExpired", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4390, - "src": "28218:14:8", + "referencedDeclaration": 6101, + "src": "34393:14:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8) pure returns (bool)" } }, - "id": 3969, + "id": 7822, "isConstant": false, "isLValue": false, "isPure": false, @@ -20000,58 +22831,53 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "28218:23:8", + "src": "34393:23:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3984, + "id": 7837, "nodeType": "IfStatement", - "src": "28214:245:8", + "src": "34389:237:6", "trueBody": { - "id": 3983, + "id": 7836, "nodeType": "Block", - "src": "28243:216:8", + "src": "34418:208:6", "statements": [ { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3976, + "id": 7829, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3970, + "id": 7823, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "28338:5:8", + "src": "34515:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3971, + "id": 7824, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28338:15:8", + "src": "34515:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20060,40 +22886,37 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3975, + "id": 7828, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3972, + "id": 7825, "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3888, - "src": "28357:8:8", + "referencedDeclaration": 7741, + "src": "34534:8:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3973, + "id": 7826, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "28357:16:8", + "referencedDeclaration": 6180, + "src": "34534:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20102,55 +22925,51 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3974, + "id": 7827, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "28376:14:8", + "referencedDeclaration": 6255, + "src": "34553:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28357:33:8", + "src": "34534:33:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28338:52:8", + "src": "34515:52:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3982, + "id": 7835, "nodeType": "IfStatement", - "src": "28334:102:8", + "src": "34511:104:6", "trueBody": { - "id": 3981, + "id": 7834, "nodeType": "Block", - "src": "28392:44:8", + "src": "34569:46:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3979, + "id": 7832, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3977, + "id": 7830, "name": "mark", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "28410:4:8", + "referencedDeclaration": 7738, + "src": "34588:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20159,32 +22978,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "74727565", - "id": 3978, + "id": 7831, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "28417:4:8", - "subdenomination": null, + "src": "34595:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "28410:11:8", + "src": "34588:11:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3980, + "id": 7833, "nodeType": "ExpressionStatement", - "src": "28410:11:8" + "src": "34588:11:6" } ] } @@ -20192,50 +23009,46 @@ ] } }, - "id": 3985, + "id": 7838, "nodeType": "IfStatement", - "src": "27854:605:8", + "src": "33963:663:6", "trueBody": { - "id": 3966, + "id": 7819, "nodeType": "Block", - "src": "27940:268:8", + "src": "34053:330:6", "statements": [ { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3959, + "id": 7812, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3951, + "id": 7804, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "28052:5:8", + "src": "34185:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3952, + "id": 7805, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28052:15:8", + "src": "34185:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20244,42 +23057,37 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3958, + "id": 7811, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3953, + "id": 7806, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "28071:14:8", + "referencedDeclaration": 6223, + "src": "34221:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3955, + "id": 7808, "indexExpression": { - "argumentTypes": null, - "id": 3954, + "id": 7807, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "28086:15:8", + "referencedDeclaration": 7710, + "src": "34236:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20290,21 +23098,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "28071:31:8", + "src": "34221:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3956, + "id": 7809, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "complainPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "28071:51:8", + "referencedDeclaration": 6025, + "src": "34221:51:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20313,55 +23121,51 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3957, + "id": 7810, "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "28125:14:8", + "referencedDeclaration": 6255, + "src": "34296:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28071:68:8", + "src": "34221:89:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "28052:87:8", + "src": "34185:125:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3965, + "id": 7818, "nodeType": "IfStatement", - "src": "28048:137:8", + "src": "34163:209:6", "trueBody": { - "id": 3964, + "id": 7817, "nodeType": "Block", - "src": "28141:44:8", + "src": "34326:46:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3962, + "id": 7815, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3960, + "id": 7813, "name": "mark", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "28159:4:8", + "referencedDeclaration": 7738, + "src": "34345:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20370,32 +23174,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "74727565", - "id": 3961, + "id": 7814, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "28166:4:8", - "subdenomination": null, + "src": "34352:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "28159:11:8", + "src": "34345:11:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3963, + "id": 7816, "nodeType": "ExpressionStatement", - "src": "28159:11:8" + "src": "34345:11:6" } ] } @@ -20403,30 +23205,28 @@ ] } }, - "id": 3986, + "id": 7839, "nodeType": "IfStatement", - "src": "27573:886:8", + "src": "33681:945:6", "trueBody": { - "id": 3943, + "id": 7796, "nodeType": "Block", - "src": "27744:104:8", + "src": "33863:94:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3941, + "id": 7794, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3939, + "id": 7792, "name": "mark", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "27813:4:8", + "referencedDeclaration": 7738, + "src": "33934:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20435,69 +23235,64 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "74727565", - "id": 3940, + "id": 7793, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "27820:4:8", - "subdenomination": null, + "src": "33941:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "27813:11:8", + "src": "33934:11:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3942, + "id": 7795, "nodeType": "ExpressionStatement", - "src": "27813:11:8" + "src": "33934:11:6" } ] } }, - "id": 3987, + "id": 7840, "nodeType": "IfStatement", - "src": "27140:1319:8", + "src": "33194:1432:6", "trueBody": { - "id": 3924, + "id": 7777, "nodeType": "Block", - "src": "27176:391:8", + "src": "33231:444:6", "statements": [ { "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3900, + "id": 7753, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27203:7:8", + "referencedDeclaration": 7722, + "src": "33259:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3901, - "name": "idxCancelFault", + "id": 7754, + "name": "IDX_CANCEL_FAULT", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "27212:14:8", + "referencedDeclaration": 5971, + "src": "33268:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -20515,18 +23310,18 @@ "typeString": "uint8" } ], - "id": 3899, + "id": 7752, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "27194:8:8", + "referencedDeclaration": 6121, + "src": "33250:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3902, + "id": 7755, "isConstant": false, "isLValue": false, "isPure": false, @@ -20534,7 +23329,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27194:33:8", + "src": "33250:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -20543,40 +23338,36 @@ }, "falseBody": { "condition": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3916, + "id": 7769, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3908, + "id": 7761, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -4, - "src": "27349:5:8", + "src": "33411:5:6", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, - "id": 3909, + "id": 7762, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27349:15:8", + "src": "33411:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20585,42 +23376,37 @@ "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3915, + "id": 7768, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3910, + "id": 7763, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "27368:14:8", + "referencedDeclaration": 6223, + "src": "33447:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3912, + "id": 7765, "indexExpression": { - "argumentTypes": null, - "id": 3911, + "id": 7764, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "27383:15:8", + "referencedDeclaration": 7710, + "src": "33462:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20631,21 +23417,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "27368:31:8", + "src": "33447:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3913, + "id": 7766, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "complainPeriodStart", + "memberName": "cancelFaultPeriodStart", "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "27368:51:8", + "referencedDeclaration": 6027, + "src": "33447:54:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20654,55 +23440,51 @@ "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { - "argumentTypes": null, - "id": 3914, + "id": 7767, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "27422:17:8", + "referencedDeclaration": 6257, + "src": "33525:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27368:71:8", + "src": "33447:95:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "27349:90:8", + "src": "33411:131:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 3922, + "id": 7775, "nodeType": "IfStatement", - "src": "27345:199:8", + "src": "33389:275:6", "trueBody": { - "id": 3921, + "id": 7774, "nodeType": "Block", - "src": "27441:103:8", + "src": "33558:106:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3919, + "id": 7772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3917, + "id": 7770, "name": "mark", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "27518:4:8", + "referencedDeclaration": 7738, + "src": "33637:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20711,60 +23493,56 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "74727565", - "id": 3918, + "id": 7771, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "27525:4:8", - "subdenomination": null, + "src": "33644:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "27518:11:8", + "src": "33637:11:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3920, + "id": 7773, "nodeType": "ExpressionStatement", - "src": "27518:11:8" + "src": "33637:11:6" } ] } }, - "id": 3923, + "id": 7776, "nodeType": "IfStatement", - "src": "27190:354:8", + "src": "33246:418:6", "trueBody": { - "id": 3907, + "id": 7760, "nodeType": "Block", - "src": "27229:110:8", + "src": "33287:96:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3905, + "id": 7758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 3903, + "id": 7756, "name": "mark", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "27296:4:8", + "referencedDeclaration": 7738, + "src": "33356:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20773,32 +23551,30 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "hexValue": "74727565", - "id": 3904, + "id": 7757, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "27303:4:8", - "subdenomination": null, + "src": "33363:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, - "src": "27296:11:8", + "src": "33356:11:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 3906, + "id": 7759, "nodeType": "ExpressionStatement", - "src": "27296:11:8" + "src": "33356:11:6" } ] } @@ -20808,61 +23584,54 @@ }, { "condition": { - "argumentTypes": null, - "id": 3988, + "id": 7841, "name": "mark", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "28481:4:8", + "referencedDeclaration": 7738, + "src": "34642:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": null, - "id": 4006, + "id": 7859, "nodeType": "IfStatement", - "src": "28477:182:8", + "src": "34638:229:6", "trueBody": { - "id": 4005, + "id": 7858, "nodeType": "Block", - "src": "28487:172:8", + "src": "34648:219:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 3997, + "id": 7850, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3989, + "id": 7842, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "28501:14:8", + "referencedDeclaration": 6223, + "src": "34663:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3991, + "id": 7844, "indexExpression": { - "argumentTypes": null, - "id": 3990, + "id": 7843, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "28516:15:8", + "referencedDeclaration": 7710, + "src": "34678:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20873,21 +23642,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "28501:31:8", + "src": "34663:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3992, + "id": 7845, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "28501:38:8", + "referencedDeclaration": 6019, + "src": "34663:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -20896,29 +23665,26 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3994, + "id": 7847, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "28552:7:8", + "referencedDeclaration": 7722, + "src": "34738:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3995, - "name": "idxFinal", + "id": 7848, + "name": "IDX_FINAL", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "28561:8:8", + "referencedDeclaration": 5974, + "src": "34764:9:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -20936,18 +23702,18 @@ "typeString": "uint8" } ], - "id": 3993, - "name": "setChange", + "id": 7846, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "28542:9:8", + "referencedDeclaration": 6139, + "src": "34704:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3996, + "id": 7849, "isConstant": false, "isLValue": false, "isPure": false, @@ -20955,64 +23721,59 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "28542:28:8", + "src": "34704:84:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "28501:69:8", + "src": "34663:125:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3998, + "id": 7851, "nodeType": "ExpressionStatement", - "src": "28501:69:8" + "src": "34663:125:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 4000, + "id": 7853, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "28608:15:8", + "referencedDeclaration": 7710, + "src": "34827:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 4001, + "id": 7854, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "28625:3:8", + "src": "34844:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4002, + "id": 7855, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28625:10:8", + "src": "34844:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -21030,18 +23791,18 @@ "typeString": "address payable" } ], - "id": 3999, + "id": 7852, "name": "LogFinalizeVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2721, - "src": "28589:18:8", + "referencedDeclaration": 6317, + "src": "34808:18:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", "typeString": "function (uint256,address)" } }, - "id": 4003, + "id": 7856, "isConstant": false, "isLValue": false, "isPure": false, @@ -21049,16 +23810,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "28589:47:8", + "src": "34808:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4004, + "id": 7857, "nodeType": "EmitStatement", - "src": "28584:52:8" + "src": "34803:52:6" } ] } @@ -21066,32 +23827,285 @@ ] }, "documentation": { - "id": 3856, + "id": 7708, "nodeType": "StructuredDocumentation", - "src": "26364:121:8", + "src": "32483:124:6", "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" }, "functionSelector": "65c303bc", - "id": 4008, + "id": 7861, "implemented": true, "kind": "function", "modifiers": [], "name": "triggerFinalizeVoucher", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, "parameters": { - "id": 3859, + "id": 7711, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3858, + "id": 7710, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4008, - "src": "26570:23:8", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21099,62 +24113,85 @@ "typeString": "uint256" }, "typeName": { - "id": 3857, + "id": 7863, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "26570:7:8", + "src": "35255:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "26569:25:8" + "src": "35244:69:6" }, "returnParameters": { - "id": 3860, + "id": 7871, "nodeType": "ParameterList", "parameters": [], - "src": "26616:0:8" + "src": "35348:0:6" }, - "scope": 4283, - "src": "26538:2138:8", + "scope": 8454, + "src": "35210:258:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { - "id": 4036, + "id": 7914, "nodeType": "Block", - "src": "29002:286:8", + "src": "35725:295:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, - "id": 4022, + "id": 7900, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 4017, - "name": "_cashierAddress", + "id": 7895, + "name": "_bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4011, - "src": "29020:15:8", + "referencedDeclaration": 7889, + "src": "35744:19:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -21163,20 +24200,17 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "hexValue": "30", - "id": 4020, + "id": 7898, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "29047:1:8", - "subdenomination": null, + "src": "35775:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" @@ -21191,29 +24225,26 @@ "typeString": "int_const 0" } ], - "id": 4019, + "id": 7897, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "29039:7:8", + "src": "35767:7:6", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": { - "id": 4018, + "id": 7896, "name": "address", "nodeType": "ElementaryTypeName", - "src": "29039:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "src": "35767:7:6", + "typeDescriptions": {} } }, - "id": 4021, + "id": 7899, "isConstant": false, "isLValue": false, "isPure": true, @@ -21221,31 +24252,29 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "29039:10:8", + "src": "35767:10:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "29020:29:8", + "src": "35744:33:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f41444452455353", - "id": 4023, + "id": 7901, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "29051:21:8", - "subdenomination": null, + "src": "35779:21:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" @@ -21264,7 +24293,7 @@ "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" } ], - "id": 4016, + "id": 7894, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -21272,13 +24301,13 @@ -18 ], "referencedDeclaration": -18, - "src": "29012:7:8", + "src": "35736:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 4024, + "id": 7902, "isConstant": false, "isLValue": false, "isPure": false, @@ -21286,33 +24315,31 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "29012:61:8", + "src": "35736:65:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4025, + "id": 7903, "nodeType": "ExpressionStatement", - "src": "29012:61:8" + "src": "35736:65:6" }, { "expression": { - "argumentTypes": null, - "id": 4028, + "id": 7906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 4026, - "name": "cashierAddress", + "id": 7904, + "name": "bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2606, - "src": "29183:14:8", + "referencedDeclaration": 6198, + "src": "35904:18:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -21321,69 +24348,63 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 4027, - "name": "_cashierAddress", + "id": 7905, + "name": "_bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4011, - "src": "29200:15:8", + "referencedDeclaration": 7889, + "src": "35925:19:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "29183:32:8", + "src": "35904:40:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 4029, + "id": 7907, "nodeType": "ExpressionStatement", - "src": "29183:32:8" + "src": "35904:40:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 4031, - "name": "_cashierAddress", + "id": 7909, + "name": "_bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4011, - "src": "29253:15:8", + "referencedDeclaration": 7889, + "src": "35980:19:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 4032, + "id": 7910, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "29270:3:8", + "src": "36001:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4033, + "id": 7911, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29270:10:8", + "src": "36001:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -21401,18 +24422,18 @@ "typeString": "address payable" } ], - "id": 4030, - "name": "LogCashierSet", + "id": 7908, + "name": "LogBosonRouterSet", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2727, - "src": "29239:13:8", + "referencedDeclaration": 6323, + "src": "35962:17:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", "typeString": "function (address,address)" } }, - "id": 4034, + "id": 7912, "isConstant": false, "isLValue": false, "isPure": false, @@ -21420,66 +24441,62 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "29239:42:8", + "src": "35962:50:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4035, + "id": 7913, "nodeType": "EmitStatement", - "src": "29234:47:8" + "src": "35957:55:6" } ] }, "documentation": { - "id": 4009, + "id": 7887, "nodeType": "StructuredDocumentation", - "src": "28772:134:8", - "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the Cashier contract" + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" }, - "functionSelector": "c099a7c4", - "id": 4037, + "functionSelector": "bd17de40", + "id": 7915, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 4014, + "id": 7892, "modifierName": { - "argumentTypes": null, - "id": 4013, + "id": 7891, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "28988:9:8", + "referencedDeclaration": 12093, + "src": "35710:9:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "28988:9:8" + "src": "35710:9:6" } ], - "name": "setCashierAddress", + "name": "setBosonRouterAddress", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 4012, + "id": 7890, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4011, + "id": 7889, "mutability": "mutable", - "name": "_cashierAddress", + "name": "_bosonRouterAddress", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4037, - "src": "28938:23:8", + "scope": 7915, + "src": "35654:27:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21487,127 +24504,495 @@ "typeString": "address" }, "typeName": { - "id": 4010, + "id": 7888, "name": "address", "nodeType": "ElementaryTypeName", - "src": "28938:7:8", + "src": "35654:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "28937:25:8" + "src": "35653:29:6" }, "returnParameters": { - "id": 4015, + "id": 7893, "nodeType": "ParameterList", "parameters": [], - "src": "29002:0:8" + "src": "35725:0:6" }, - "scope": 4283, - "src": "28911:377:8", + "scope": 8454, + "src": "35623:397:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9432 + ], "body": { - "id": 4055, + "id": 7944, "nodeType": "Block", - "src": "29644:126:8", + "src": "36278:275:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 4047, + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 4045, - "name": "complainPeriod", + "id": 7934, + "name": "cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "29654:14:8", + "referencedDeclaration": 6200, + "src": "36453:14:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 4046, - "name": "_complainPeriod", + "id": 7935, + "name": "_cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4040, - "src": "29671:15:8", + "referencedDeclaration": 7918, + "src": "36470:15:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "29654:32:8", + "src": "36453:32:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 4048, + "id": 7937, "nodeType": "ExpressionStatement", - "src": "29654:32:8" + "src": "36453:32:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 4050, - "name": "_complainPeriod", + "id": 7939, + "name": "_cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4040, - "src": "29735:15:8", + "referencedDeclaration": 7918, + "src": "36517:15:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 4051, + "id": 7940, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "29752:3:8", + "src": "36534:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4052, + "id": 7941, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29752:10:8", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -21625,18 +25010,18 @@ "typeString": "address payable" } ], - "id": 4049, + "id": 7958, "name": "LogComplainPeriodChanged", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2733, - "src": "29710:24:8", + "referencedDeclaration": 6335, + "src": "36988:24:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", "typeString": "function (uint256,address)" } }, - "id": 4053, + "id": 7962, "isConstant": false, "isLValue": false, "isPure": false, @@ -21644,66 +25029,68 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "29710:53:8", + "src": "36988:53:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4054, + "id": 7963, "nodeType": "EmitStatement", - "src": "29705:58:8" + "src": "36983:58:6" } ] }, "documentation": { - "id": 4038, + "id": 7946, "nodeType": "StructuredDocumentation", - "src": "29303:245:8", + "src": "36561:248:6", "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" }, "functionSelector": "8990834b", - "id": 4056, + "id": 7965, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 4043, + "id": 7952, "modifierName": { - "argumentTypes": null, - "id": 4042, + "id": 7951, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "29630:9:8", + "referencedDeclaration": 12093, + "src": "36912:9:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "29630:9:8" + "src": "36912:9:6" } ], "name": "setComplainPeriod", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, "parameters": { - "id": 4041, + "id": 7949, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4040, + "id": 7948, "mutability": "mutable", "name": "_complainPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4056, - "src": "29580:23:8", + "scope": 7965, + "src": "36842:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21711,55 +25098,55 @@ "typeString": "uint256" }, "typeName": { - "id": 4039, + "id": 7947, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "29580:7:8", + "src": "36842:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "29579:25:8" + "src": "36841:25:6" }, "returnParameters": { - "id": 4044, + "id": 7953, "nodeType": "ParameterList", "parameters": [], - "src": "29644:0:8" + "src": "36927:0:6" }, - "scope": 4283, - "src": "29553:217:8", + "scope": 8454, + "src": "36815:234:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9426 + ], "body": { - "id": 4074, + "id": 7984, "nodeType": "Block", - "src": "30145:138:8", + "src": "37442:134:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 4066, + "id": 7976, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "id": 4064, + "id": 7974, "name": "cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "30155:17:8", + "referencedDeclaration": 6257, + "src": "37453:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21768,69 +25155,63 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "id": 4065, + "id": 7975, "name": "_cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "30175:18:8", + "referencedDeclaration": 7968, + "src": "37473:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "30155:38:8", + "src": "37453:38:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 4067, + "id": 7977, "nodeType": "ExpressionStatement", - "src": "30155:38:8" + "src": "37453:38:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 4069, + "id": 7979, "name": "_cancelFaultPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "30245:18:8", + "referencedDeclaration": 7968, + "src": "37537:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 4070, + "id": 7980, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, - "src": "30265:3:8", + "src": "37557:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 4071, + "id": 7981, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "30265:10:8", + "src": "37557:10:6", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -21848,18 +25229,18 @@ "typeString": "address payable" } ], - "id": 4068, + "id": 7978, "name": "LogCancelFaultPeriodChanged", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2739, - "src": "30217:27:8", + "referencedDeclaration": 6341, + "src": "37509:27:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", "typeString": "function (uint256,address)" } }, - "id": 4072, + "id": 7982, "isConstant": false, "isLValue": false, "isPure": false, @@ -21867,66 +25248,68 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "30217:59:8", + "src": "37509:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4073, + "id": 7983, "nodeType": "EmitStatement", - "src": "30212:64:8" + "src": "37504:64:6" } ] }, "documentation": { - "id": 4057, + "id": 7966, "nodeType": "StructuredDocumentation", - "src": "29785:258:8", + "src": "37057:261:6", "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" }, "functionSelector": "ede80897", - "id": 4075, + "id": 7985, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 4062, + "id": 7972, "modifierName": { - "argumentTypes": null, - "id": 4061, + "id": 7971, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "30131:9:8", + "referencedDeclaration": 12093, + "src": "37427:9:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "30131:9:8" + "src": "37427:9:6" } ], "name": "setCancelFaultPeriod", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, "parameters": { - "id": 4060, + "id": 7969, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4059, + "id": 7968, "mutability": "mutable", "name": "_cancelFaultPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4075, - "src": "30078:26:8", + "scope": 7985, + "src": "37354:26:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21934,64 +25317,63 @@ "typeString": "uint256" }, "typeName": { - "id": 4058, + "id": 7967, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30078:7:8", + "src": "37354:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30077:28:8" + "src": "37353:28:6" }, "returnParameters": { - "id": 4063, + "id": 7973, "nodeType": "ParameterList", "parameters": [], - "src": "30145:0:8" + "src": "37442:0:6" }, - "scope": 4283, - "src": "30048:235:8", + "scope": 8454, + "src": "37324:252:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9446 + ], "body": { - "id": 4087, + "id": 7998, "nodeType": "Block", - "src": "30622:41:8", + "src": "37936:43:6", "statements": [ { "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4083, + "id": 7994, "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "30639:11:8", + "referencedDeclaration": 6215, + "src": "37954:11:6", "typeDescriptions": { "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", "typeString": "bytes32[] storage ref" } }, - "id": 4085, + "id": 7996, "indexExpression": { - "argumentTypes": null, - "id": 4084, + "id": 7995, "name": "_idx", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4078, - "src": "30651:4:8", + "referencedDeclaration": 7988, + "src": "37966:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22002,46 +25384,50 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "30639:17:8", + "src": "37954:17:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 4082, - "id": 4086, + "functionReturnParameters": 7993, + "id": 7997, "nodeType": "Return", - "src": "30632:24:8" + "src": "37947:24:6" } ] }, "documentation": { - "id": 4076, + "id": 7986, "nodeType": "StructuredDocumentation", - "src": "30381:149:8", + "src": "37660:153:6", "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" }, "functionSelector": "81dc8119", - "id": 4088, + "id": 7999, "implemented": true, "kind": "function", "modifiers": [], "name": "getPromiseKey", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, "parameters": { - "id": 4079, + "id": 7989, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4078, + "id": 7988, "mutability": "mutable", "name": "_idx", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4088, - "src": "30558:12:8", + "scope": 7999, + "src": "37842:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22049,34 +25435,32 @@ "typeString": "uint256" }, "typeName": { - "id": 4077, + "id": 7987, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30558:7:8", + "src": "37842:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30557:14:8" + "src": "37841:14:6" }, "returnParameters": { - "id": 4082, + "id": 7993, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4081, + "id": 7992, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4088, - "src": "30609:7:8", + "scope": 7999, + "src": "37922:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22084,53 +25468,53 @@ "typeString": "bytes32" }, "typeName": { - "id": 4080, + "id": 7991, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "30609:7:8", + "src": "37922:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "30608:9:8" + "src": "37921:9:6" }, - "scope": 4283, - "src": "30535:128:8", + "scope": 8454, + "src": "37819:160:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9488 + ], "body": { - "id": 4100, + "id": 8012, "nodeType": "Block", - "src": "30972:51:8", + "src": "38316:53:6", "statements": [ { "expression": { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4098, + "id": 8010, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 4096, + "id": 8008, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4091, - "src": "30989:15:8", + "referencedDeclaration": 8002, + "src": "38334:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22139,58 +25523,61 @@ "nodeType": "BinaryOperation", "operator": "&", "rightExpression": { - "argumentTypes": null, - "id": 4097, + "id": 8009, "name": "MASK_TYPE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2657, - "src": "31007:9:8", + "referencedDeclaration": 6239, + "src": "38352:9:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "30989:27:8", + "src": "38334:27:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 4095, - "id": 4099, + "functionReturnParameters": 8007, + "id": 8011, "nodeType": "Return", - "src": "30982:34:8" + "src": "38327:34:6" } ] }, "documentation": { - "id": 4089, + "id": 8000, "nodeType": "StructuredDocumentation", - "src": "30678:182:8", + "src": "37987:186:6", "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" }, "functionSelector": "1af2a6a8", - "id": 4101, + "id": 8013, "implemented": true, "kind": "function", "modifiers": [], "name": "getIdSupplyFromVoucher", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, "parameters": { - "id": 4092, + "id": 8003, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4091, + "id": 8002, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4101, - "src": "30897:23:8", + "scope": 8013, + "src": "38211:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22198,34 +25585,32 @@ "typeString": "uint256" }, "typeName": { - "id": 4090, + "id": 8001, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30897:7:8", + "src": "38211:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30896:25:8" + "src": "38210:25:6" }, "returnParameters": { - "id": 4095, + "id": 8007, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4094, + "id": 8006, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4101, - "src": "30959:7:8", + "scope": 8013, + "src": "38302:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22233,56 +25618,55 @@ "typeString": "uint256" }, "typeName": { - "id": 4093, + "id": 8005, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30959:7:8", + "src": "38302:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30958:9:8" + "src": "38301:9:6" }, - "scope": 4283, - "src": "30865:158:8", + "scope": 8454, + "src": "38179:190:6", "stateMutability": "pure", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9496 + ], "body": { - "id": 4129, + "id": 8042, "nodeType": "Block", - "src": "31325:302:8", + "src": "38699:298:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 4112, + "id": 8025, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 4110, + "id": 8023, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4104, - "src": "31343:15:8", + "referencedDeclaration": 8016, + "src": "38718:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22291,41 +25675,37 @@ "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, "hexValue": "30", - "id": 4111, + "id": 8024, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "31362:1:8", - "subdenomination": null, + "src": "38737:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "31343:20:8", + "src": "38718:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, "hexValue": "554e5350454349464945445f4944", - "id": 4113, + "id": 8026, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "31365:16:8", - "subdenomination": null, + "src": "38740:16:6", "typeDescriptions": { "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", "typeString": "literal_string \"UNSPECIFIED_ID\"" @@ -22344,7 +25724,7 @@ "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 4109, + "id": 8022, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -22352,13 +25732,13 @@ -18 ], "referencedDeclaration": -18, - "src": "31335:7:8", + "src": "38710:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 4114, + "id": 8027, "isConstant": false, "isLValue": false, "isPure": false, @@ -22366,31 +25746,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "31335:47:8", + "src": "38710:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 4115, + "id": 8028, "nodeType": "ExpressionStatement", - "src": "31335:47:8" + "src": "38710:47:6" }, { "assignments": [ - 4117 + 8030 ], "declarations": [ { "constant": false, - "id": 4117, + "id": 8030, "mutability": "mutable", "name": "tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4129, - "src": "31492:21:8", + "scope": 8042, + "src": "38860:21:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22398,31 +25777,28 @@ "typeString": "uint256" }, "typeName": { - "id": 4116, + "id": 8029, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31492:7:8", + "src": "38860:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "id": 4121, + "id": 8034, "initialValue": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 4119, + "id": 8032, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4104, - "src": "31539:15:8", + "referencedDeclaration": 8016, + "src": "38907:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22436,18 +25812,18 @@ "typeString": "uint256" } ], - "id": 4118, + "id": 8031, "name": "getIdSupplyFromVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4101, - "src": "31516:22:8", + "referencedDeclaration": 8013, + "src": "38884:22:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256) pure returns (uint256)" } }, - "id": 4120, + "id": 8033, "isConstant": false, "isLValue": false, "isPure": false, @@ -22455,7 +25831,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "31516:39:8", + "src": "38884:39:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", @@ -22463,51 +25839,45 @@ } }, "nodeType": "VariableDeclarationStatement", - "src": "31492:63:8" + "src": "38860:63:6" }, { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4122, + "id": 8035, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "31572:8:8", + "referencedDeclaration": 6204, + "src": "38941:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4126, + "id": 8039, "indexExpression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4123, + "id": 8036, "name": "ordersPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2621, - "src": "31581:13:8", + "referencedDeclaration": 6219, + "src": "38950:13:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", "typeString": "mapping(uint256 => bytes32)" } }, - "id": 4125, + "id": 8038, "indexExpression": { - "argumentTypes": null, - "id": 4124, + "id": 8037, "name": "tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4117, - "src": "31595:13:8", + "referencedDeclaration": 8030, + "src": "38964:13:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22518,7 +25888,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "31581:28:8", + "src": "38950:28:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -22529,60 +25899,64 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "31572:38:8", + "src": "38941:38:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4127, + "id": 8040, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "promiseId", "nodeType": "MemberAccess", - "referencedDeclaration": 2585, - "src": "31572:48:8", + "referencedDeclaration": 6172, + "src": "38941:48:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 4108, - "id": 4128, + "functionReturnParameters": 8021, + "id": 8041, "nodeType": "Return", - "src": "31565:55:8" + "src": "38934:55:6" } ] }, "documentation": { - "id": 4102, + "id": 8014, "nodeType": "StructuredDocumentation", - "src": "31038:172:8", + "src": "38377:176:6", "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" }, "functionSelector": "bc0d753d", - "id": 4130, + "id": 8043, "implemented": true, "kind": "function", "modifiers": [], "name": "getPromiseIdFromVoucherId", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, "parameters": { - "id": 4105, + "id": 8017, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4104, + "id": 8016, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4130, - "src": "31250:23:8", + "scope": 8043, + "src": "38594:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22590,34 +25964,32 @@ "typeString": "uint256" }, "typeName": { - "id": 4103, + "id": 8015, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31250:7:8", + "src": "38594:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "31249:25:8" + "src": "38593:25:6" }, "returnParameters": { - "id": 4108, + "id": 8021, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4107, + "id": 8020, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4130, - "src": "31312:7:8", + "scope": 8043, + "src": "38685:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22625,108 +25997,215 @@ "typeString": "bytes32" }, "typeName": { - "id": 4106, + "id": 8019, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "31312:7:8", + "src": "38685:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "31311:9:8" + "src": "38684:9:6" }, - "scope": 4283, - "src": "31215:412:8", + "scope": 8454, + "src": "38559:438:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9518 + ], "body": { - "id": 4142, + "id": 8062, "nodeType": "Block", - "src": "31914:47:8", + "src": "39427:84:6", "statements": [ { "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4138, - "name": "accountSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "31931:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } - }, - "id": 4140, - "indexExpression": { - "argumentTypes": null, - "id": 4139, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4133, - "src": "31945:8:8", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" } }, + "id": 8060, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "31931:23:8", + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 4137, - "id": 4141, + "functionReturnParameters": 8053, + "id": 8061, "nodeType": "Return", - "src": "31924:30:8" + "src": "39438:65:6" } ] }, "documentation": { - "id": 4131, + "id": 8044, "nodeType": "StructuredDocumentation", - "src": "31642:145:8", - "text": " @notice Get the current supply of tokens of an account\n @param _account Address to query\n @return Balance" + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" }, - "functionSelector": "68da10ae", - "id": 4143, + "functionSelector": "e31a0079", + "id": 8063, "implemented": true, "kind": "function", "modifiers": [], - "name": "getTotalSupply", + "name": "getRemQtyForSupply", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, "parameters": { - "id": 4134, + "id": 8049, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4133, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, "mutability": "mutable", - "name": "_account", + "name": "_owner", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4143, - "src": "31846:16:8", + "scope": 8063, + "src": "39331:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22734,35 +26213,33 @@ "typeString": "address" }, "typeName": { - "id": 4132, + "id": 8047, "name": "address", "nodeType": "ElementaryTypeName", - "src": "31846:7:8", + "src": "39331:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "31845:18:8" + "src": "39306:40:6" }, "returnParameters": { - "id": 4137, + "id": 8053, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4136, + "id": 8052, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4143, - "src": "31901:7:8", + "scope": 8063, + "src": "39413:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22770,224 +26247,48 @@ "typeString": "uint256" }, "typeName": { - "id": 4135, + "id": 8051, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31901:7:8", + "src": "39413:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "31900:9:8" + "src": "39412:9:6" }, - "scope": 4283, - "src": "31822:139:8", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 4157, - "nodeType": "Block", - "src": "32241:56:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4151, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32259:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 4153, - "indexExpression": { - "argumentTypes": null, - "id": 4152, - "name": "_promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4146, - "src": "32268:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "32259:20:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "id": 4154, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositSe", - "nodeType": "MemberAccess", - "referencedDeclaration": 2597, - "src": "32259:30:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 4155, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "32258:32:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 4150, - "id": 4156, - "nodeType": "Return", - "src": "32251:39:8" - } - ] - }, - "documentation": { - "id": 4144, - "nodeType": "StructuredDocumentation", - "src": "31976:161:8", - "text": " @notice Get the seller's deposit for a promise\n @param _promiseId ID of the promise\n @return Deposit of the seller" - }, - "functionSelector": "03770046", - "id": 4158, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPromiseDepositSe", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4147, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4146, - "mutability": "mutable", - "name": "_promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4158, - "src": "32171:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 4145, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "32171:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32170:20:8" - }, - "returnParameters": { - "id": 4150, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4149, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4158, - "src": "32228:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4148, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "32228:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "32227:9:8" - }, - "scope": 4283, - "src": "32142:155:8", + "scope": 8454, + "src": "39279:232:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9508 + ], "body": { - "id": 4190, + "id": 8096, "nodeType": "Block", - "src": "32652:176:8", + "src": "39947:229:6", "statements": [ { "assignments": [ - 4171 + 8077 ], "declarations": [ { "constant": false, - "id": 4171, + "id": 8077, "mutability": "mutable", "name": "promiseKey", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4190, - "src": "32662:18:8", + "scope": 8096, + "src": "39958:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22995,44 +26296,40 @@ "typeString": "bytes32" }, "typeName": { - "id": 4170, + "id": 8076, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "32662:7:8", + "src": "39958:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "id": 4175, + "id": 8081, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4172, + "id": 8078, "name": "ordersPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2621, - "src": "32683:13:8", + "referencedDeclaration": 6219, + "src": "39979:13:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", "typeString": "mapping(uint256 => bytes32)" } }, - "id": 4174, + "id": 8080, "indexExpression": { - "argumentTypes": null, - "id": 4173, + "id": 8079, "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4161, - "src": "32697:14:8", + "referencedDeclaration": 8066, + "src": "39993:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23043,45 +26340,40 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "32683:29:8", + "src": "39979:29:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", - "src": "32662:50:8" + "src": "39958:50:6" }, { "expression": { - "argumentTypes": null, "components": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4176, + "id": 8082, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32730:8:8", + "referencedDeclaration": 6204, + "src": "40041:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4178, + "id": 8084, "indexExpression": { - "argumentTypes": null, - "id": 4177, + "id": 8083, "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "32739:10:8", + "referencedDeclaration": 8077, + "src": "40050:10:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -23092,52 +26384,48 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "32730:20:8", + "src": "40041:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4179, + "id": 8085, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 2595, - "src": "32730:26:8", + "referencedDeclaration": 6182, + "src": "40041:26:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4180, + "id": 8086, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32758:8:8", + "referencedDeclaration": 6204, + "src": "40082:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4182, + "id": 8088, "indexExpression": { - "argumentTypes": null, - "id": 4181, + "id": 8087, "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "32767:10:8", + "referencedDeclaration": 8077, + "src": "40091:10:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -23148,52 +26436,48 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "32758:20:8", + "src": "40082:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4183, + "id": 8089, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "depositSe", "nodeType": "MemberAccess", - "referencedDeclaration": 2597, - "src": "32758:30:8", + "referencedDeclaration": 6184, + "src": "40082:30:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4184, + "id": 8090, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32790:8:8", + "referencedDeclaration": 6204, + "src": "40127:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4186, + "id": 8092, "indexExpression": { - "argumentTypes": null, - "id": 4185, + "id": 8091, "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "32799:10:8", + "referencedDeclaration": 8077, + "src": "40136:10:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -23204,74 +26488,78 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "32790:20:8", + "src": "40127:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4187, + "id": 8093, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "depositBu", "nodeType": "MemberAccess", - "referencedDeclaration": 2599, - "src": "32790:30:8", + "referencedDeclaration": 6186, + "src": "40127:30:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 4188, + "id": 8094, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "32729:92:8", + "src": "40026:142:6", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256,uint256)" } }, - "functionReturnParameters": 4169, - "id": 4189, + "functionReturnParameters": 8075, + "id": 8095, "nodeType": "Return", - "src": "32722:99:8" + "src": "40019:149:6" } ] }, "documentation": { - "id": 4159, + "id": 8064, "nodeType": "StructuredDocumentation", - "src": "32308:224:8", - "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tupple (Payment amount, Seller's deposit, Buyer's deposit)" + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" }, "functionSelector": "d887b4e7", - "id": 4191, + "id": 8097, "implemented": true, "kind": "function", "modifiers": [], "name": "getOrderCosts", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, "parameters": { - "id": 4162, + "id": 8067, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4161, + "id": 8066, "mutability": "mutable", "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32560:22:8", + "scope": 8097, + "src": "39775:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23279,34 +26567,32 @@ "typeString": "uint256" }, "typeName": { - "id": 4160, + "id": 8065, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32560:7:8", + "src": "39775:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "32559:24:8" + "src": "39774:24:6" }, "returnParameters": { - "id": 4169, + "id": 8075, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4164, + "id": 8070, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32621:7:8", + "scope": 8097, + "src": "39879:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23314,27 +26600,25 @@ "typeString": "uint256" }, "typeName": { - "id": 4163, + "id": 8069, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32621:7:8", + "src": "39879:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 4166, + "id": 8072, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32630:7:8", + "scope": 8097, + "src": "39901:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23342,27 +26626,25 @@ "typeString": "uint256" }, "typeName": { - "id": 4165, + "id": 8071, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32630:7:8", + "src": "39901:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 4168, + "id": 8074, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32639:7:8", + "scope": 8097, + "src": "39923:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23370,122 +26652,136 @@ "typeString": "uint256" }, "typeName": { - "id": 4167, + "id": 8073, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32639:7:8", + "src": "39923:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "32620:27:8" + "src": "39864:77:6" }, - "scope": 4283, - "src": "32537:291:8", + "scope": 8454, + "src": "39752:424:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9472 + ], "body": { - "id": 4217, + "id": 8124, "nodeType": "Block", - "src": "33142:167:8", + "src": "40558:147:6", "statements": [ { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4203, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "33160:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 4205, - "indexExpression": { - "argumentTypes": null, - "id": 4204, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4194, - "src": "33175:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "33160:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 4206, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "33160:38:8", + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4207, - "name": "vouchersStatus", + "id": 8114, + "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "33200:14:8", + "referencedDeclaration": 6204, + "src": "40638:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4209, + "id": 8116, "indexExpression": { - "argumentTypes": null, - "id": 4208, - "name": "_tokenIdVoucher", + "id": 8115, + "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4194, - "src": "33215:15:8", + "referencedDeclaration": 8109, + "src": "40647:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "isConstant": false, @@ -23493,55 +26789,51 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "33200:31:8", + "src": "40638:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4210, + "id": 8117, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "isPaymentReleased", + "memberName": "price", "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "33200:49:8", + "referencedDeclaration": 6182, + "src": "40638:26:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4211, - "name": "vouchersStatus", + "id": 8118, + "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "33251:14:8", + "referencedDeclaration": 6204, + "src": "40666:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4213, + "id": 8120, "indexExpression": { - "argumentTypes": null, - "id": 4212, - "name": "_tokenIdVoucher", + "id": 8119, + "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4194, - "src": "33266:15:8", + "referencedDeclaration": 8109, + "src": "40675:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "isConstant": false, @@ -23549,74 +26841,78 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "33251:31:8", + "src": "40666:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4214, + "id": 8121, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "isDepositsReleased", + "memberName": "depositBu", "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "33251:50:8", + "referencedDeclaration": 6186, + "src": "40666:30:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], - "id": 4215, + "id": 8122, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "33159:143:8", + "src": "40637:60:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "tuple(uint8,bool,bool)" + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" } }, - "functionReturnParameters": 4202, - "id": 4216, + "functionReturnParameters": 8107, + "id": 8123, "nodeType": "Return", - "src": "33152:150:8" + "src": "40630:67:6" } ] }, "documentation": { - "id": 4192, + "id": 8098, "nodeType": "StructuredDocumentation", - "src": "32843:183:8", - "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" }, - "functionSelector": "325a7a84", - "id": 4218, + "functionSelector": "fad4ee94", + "id": 8125, "implemented": true, "kind": "function", "modifiers": [], - "name": "getVoucherStatus", + "name": "getBuyerOrderCosts", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, "parameters": { - "id": 4195, + "id": 8101, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4194, + "id": 8100, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33057:23:8", + "scope": 8125, + "src": "40445:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23624,149 +26920,148 @@ "typeString": "uint256" }, "typeName": { - "id": 4193, + "id": 8099, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33057:7:8", + "src": "40445:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33056:25:8" + "src": "40444:24:6" }, "returnParameters": { - "id": 4202, + "id": 8107, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4197, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33119:5:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 4196, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "33119:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4199, + "id": 8104, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33126:4:8", + "scope": 8125, + "src": "40535:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4198, - "name": "bool", + "id": 8103, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33126:4:8", + "src": "40535:7:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 4201, + "id": 8106, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33132:4:8", + "scope": 8125, + "src": "40544:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4200, - "name": "bool", + "id": 8105, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33132:4:8", + "src": "40544:7:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33118:19:8" + "src": "40534:18:6" }, - "scope": 4283, - "src": "33031:278:8", + "scope": 8454, + "src": "40417:288:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9480 + ], "body": { - "id": 4230, + "id": 8145, "nodeType": "Block", - "src": "33594:55:8", + "src": "41008:117:6", "statements": [ { - "expression": { - "argumentTypes": null, + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { "baseExpression": { - "argumentTypes": null, - "id": 4226, - "name": "voucherIssuers", + "id": 8136, + "name": "ordersPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2629, - "src": "33611:14:8", + "referencedDeclaration": 6219, + "src": "41040:13:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } }, - "id": 4228, + "id": 8138, "indexExpression": { - "argumentTypes": null, - "id": 4227, - "name": "_tokenIdVoucher", + "id": 8137, + "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4221, - "src": "33626:15:8", + "referencedDeclaration": 8128, + "src": "41054:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23777,46 +27072,106 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "33611:31:8", + "src": "41040:29:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "functionReturnParameters": 4225, - "id": 4229, + "functionReturnParameters": 8133, + "id": 8144, "nodeType": "Return", - "src": "33604:38:8" + "src": "41080:37:6" } ] }, "documentation": { - "id": 4219, + "id": 8126, "nodeType": "StructuredDocumentation", - "src": "33324:164:8", - "text": " @notice Get the issuer of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the issuer" + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" }, - "functionSelector": "46d07cb5", - "id": 4231, + "functionSelector": "88106323", + "id": 8146, "implemented": true, "kind": "function", "modifiers": [], - "name": "getVoucherIssuer", + "name": "getSellerDeposit", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, "parameters": { - "id": 4222, + "id": 8129, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4221, + "id": 8128, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4231, - "src": "33519:23:8", + "scope": 8146, + "src": "40904:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23824,170 +27179,232 @@ "typeString": "uint256" }, "typeName": { - "id": 4220, + "id": 8127, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33519:7:8", + "src": "40904:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33518:25:8" + "src": "40903:24:6" }, "returnParameters": { - "id": 4225, + "id": 8133, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4224, + "id": 8132, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4231, - "src": "33581:7:8", + "scope": 8146, + "src": "40994:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4223, - "name": "address", + "id": 8131, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33581:7:8", - "stateMutability": "nonpayable", + "src": "40994:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33580:9:8" + "src": "40993:9:6" }, - "scope": 4283, - "src": "33493:156:8", + "scope": 8454, + "src": "40878:247:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9550 + ], "body": { - "id": 4244, + "id": 8166, "nodeType": "Block", - "src": "33934:63:8", + "src": "41487:114:6", "statements": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4241, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "33974:15:8", + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } - ], + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } - ], - "expression": { - "argumentTypes": null, - "id": 4239, - "name": "tokensContract", + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "33951:14:8", + "referencedDeclaration": 8156, + "src": "41575:10:6", "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 4240, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "ownerOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1426, - "src": "33951:22:8", + "nodeType": "IndexAccess", + "src": "41566:20:6", "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4242, + "id": 8164, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33951:39:8", - "tryCall": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 4238, - "id": 4243, + "functionReturnParameters": 8154, + "id": 8165, "nodeType": "Return", - "src": "33944:46:8" + "src": "41559:34:6" } ] }, "documentation": { - "id": 4232, + "id": 8147, "nodeType": "StructuredDocumentation", - "src": "33664:164:8", - "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" }, - "functionSelector": "f75951ce", - "id": 4245, + "functionSelector": "1f38585f", + "id": 8167, "implemented": true, "kind": "function", "modifiers": [], - "name": "getVoucherHolder", + "name": "getSupplyHolder", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, "parameters": { - "id": 4235, + "id": 8150, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4234, + "id": 8149, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4245, - "src": "33859:23:8", + "scope": 8167, + "src": "41383:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23995,34 +27412,32 @@ "typeString": "uint256" }, "typeName": { - "id": 4233, + "id": 8148, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33859:7:8", + "src": "41383:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33858:25:8" + "src": "41382:24:6" }, "returnParameters": { - "id": 4238, + "id": 8154, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4237, + "id": 8153, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4245, - "src": "33921:7:8", + "scope": 8167, + "src": "41473:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -24030,132 +27445,91 @@ "typeString": "address" }, "typeName": { - "id": 4236, + "id": 8152, "name": "address", "nodeType": "ElementaryTypeName", - "src": "33921:7:8", + "src": "41473:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "33920:9:8" + "src": "41472:9:6" }, - "scope": 4283, - "src": "33833:164:8", + "scope": 8454, + "src": "41358:243:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9628 + ], "body": { - "id": 4281, + "id": 8202, "nodeType": "Block", - "src": "34139:494:8", + "src": "41981:173:6", "statements": [ { "assignments": [ - 4254 + 8185 ], "declarations": [ { "constant": false, - "id": 4254, + "id": 8185, "mutability": "mutable", "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4281, - "src": "34181:23:8", + "scope": 8202, + "src": "41992:23:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "contractScope": null, - "id": 4253, + "id": 8184, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "34181:7:8", + "referencedDeclaration": 6189, + "src": "41992:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } }, - "value": null, "visibility": "internal" } ], - "id": 4260, + "id": 8189, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4255, + "id": 8186, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "34207:8:8", + "referencedDeclaration": 6204, + "src": "42018:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 4259, + "id": 8188, "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4257, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4248, - "src": "34242:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4256, - "name": "getPromiseIdFromVoucherId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "34216:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 4258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34216:42:8", - "tryCall": false, + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -24166,1924 +27540,1198 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "34207:52:8", + "src": "42018:21:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "34181:78:8" + "src": "41992:47:6" }, { "expression": { - "argumentTypes": null, - "arguments": [ + "components": [ { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } }, - "id": 4266, + "id": 8191, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4262, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4254, - "src": "34277:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 4263, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 2591, - "src": "34277:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4264, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "34299:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34299:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "34277:37:8", + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, { - "argumentTypes": null, - "hexValue": "494e56414c49445f56414c49444954595f46524f4d", - "id": 4267, + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", + "isLValue": true, + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "34316:23:8", - "subdenomination": null, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", - "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" - }, - "value": "INVALID_VALIDITY_FROM" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", - "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" - } - ], - "id": 4261, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "34269:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34269:71:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4269, - "nodeType": "ExpressionStatement", - "src": "34269:71:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } }, - "id": 4275, + "id": 8195, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4271, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4254, - "src": "34441:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 4272, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "34441:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4273, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "34461:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34461:15:8", + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" } }, - "src": "34441:35:8", + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, { - "argumentTypes": null, - "hexValue": "494e56414c49445f56414c49444954595f544f", - "id": 4276, + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", + "isLValue": true, + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "34478:21:8", - "subdenomination": null, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", - "typeString": "literal_string \"INVALID_VALIDITY_TO\"" - }, - "value": "INVALID_VALIDITY_TO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", - "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 4270, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "34433:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" } - }, - "id": 4277, + ], + "id": 8200, "isConstant": false, + "isInlineArray": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34433:67:8", - "tryCall": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" } }, - "id": 4278, - "nodeType": "ExpressionStatement", - "src": "34433:67:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34621:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4252, - "id": 4280, + "functionReturnParameters": 8183, + "id": 8201, "nodeType": "Return", - "src": "34614:11:8" + "src": "42050:95:6" } ] }, "documentation": { - "id": 4246, + "id": 8168, "nodeType": "StructuredDocumentation", - "src": "34012:20:8", - "text": " " + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" }, - "functionSelector": "9a0271e1", - "id": 4282, + "functionSelector": "a1e5e3f9", + "id": 8203, "implemented": true, "kind": "function", "modifiers": [], - "name": "isInValidityPeriod", + "name": "getPromiseData", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, "parameters": { - "id": 4249, + "id": 8171, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4248, + "id": 8170, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_promiseKey", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4282, - "src": "34066:23:8", + "scope": 8203, + "src": "41841:19:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 4247, - "name": "uint256", + "id": 8169, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "34066:7:8", + "src": "41841:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "34065:25:8" + "src": "41840:21:6" }, "returnParameters": { - "id": 4252, + "id": 8183, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4251, + "id": 8174, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4282, - "src": "34128:4:8", + "scope": 8203, + "src": "41930:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 4250, - "name": "bool", + "id": 8173, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "34128:4:8", + "src": "41930:7:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "34127:6:8" + "src": "41929:46:6" }, - "scope": 4283, - "src": "34038:595:8", + "scope": 8454, + "src": "41817:337:6", "stateMutability": "view", "virtual": false, - "visibility": "public" - } - ], - "scope": 4284, - "src": "790:33854:8" - } - ], - "src": "47:34597:8" - }, - "legacyAST": { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/VoucherKernel.sol", - "exportedSymbols": { - "VoucherKernel": [ - 4283 - ] - }, - "id": 4284, - "license": "LGPL-3.0-or-later", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2572, - "literals": [ - "solidity", - ">=", - "0.6", - ".2", - "<", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "47:31:8" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/Address.sol", - "file": "@openzeppelin/contracts/utils/Address.sol", - "id": 2573, - "nodeType": "ImportDirective", - "scope": 4284, - "sourceUnit": 4817, - "src": "80:51:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/ERC1155ERC721.sol", - "file": "./ERC1155ERC721.sol", - "id": 2574, - "nodeType": "ImportDirective", - "scope": 4284, - "sourceUnit": 2211, - "src": "132:29:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/usingHelpers.sol", - "file": "./usingHelpers.sol", - "id": 2575, - "nodeType": "ImportDirective", - "scope": 4284, - "sourceUnit": 4426, - "src": "162:28:8", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2577, - "name": "usingHelpers", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4425, - "src": "816:12:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_usingHelpers_$4425", - "typeString": "contract usingHelpers" - } - }, - "id": 2578, - "nodeType": "InheritanceSpecifier", - "src": "816:12:8" - } - ], - "contractDependencies": [ - 4425 - ], - "contractKind": "contract", - "documentation": { - "id": 2576, - "nodeType": "StructuredDocumentation", - "src": "237:552:8", - "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes: \n - Since this is a demo app, it is not yet optimized. \n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined with day-precision and the demo app is not covering all edge cases.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" - }, - "fullyImplemented": true, - "id": 4283, - "linearizedBaseContracts": [ - 4283, - 4425 - ], - "name": "VoucherKernel", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 2581, - "libraryName": { - "contractScope": null, - "id": 2579, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4816, - "src": "845:7:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4816", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "839:26:8", - "typeName": { - "id": 2580, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "857:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - { - "constant": false, - "id": 2583, - "mutability": "mutable", - "name": "tokensContract", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "1032:28:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - }, - "typeName": { - "contractScope": null, - "id": 2582, - "name": "ERC1155ERC721", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2210, - "src": "1032:13:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "value": null, - "visibility": "internal" + "visibility": "external" }, { - "canonicalName": "VoucherKernel.Promise", - "id": 2602, - "members": [ - { - "constant": false, - "id": 2585, - "mutability": "mutable", - "name": "promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1184:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2584, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1184:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2587, - "mutability": "mutable", - "name": "assetTitle", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1211:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2586, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1211:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2589, - "mutability": "mutable", - "name": "seller", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1271:14:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2588, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1271:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2591, - "mutability": "mutable", - "name": "validFrom", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1536:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2590, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1536:7:8", + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2593, - "mutability": "mutable", - "name": "validTo", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1563:15:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2592, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1563:7:8", + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2595, - "mutability": "mutable", - "name": "price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1588:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" }, - "typeName": { - "id": 2594, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1588:7:8", + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2597, - "mutability": "mutable", - "name": "depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1611:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" }, - "typeName": { - "id": 2596, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1611:7:8", + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2599, - "mutability": "mutable", - "name": "depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1638:17:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" }, - "typeName": { - "id": 2598, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1638:7:8", + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2601, - "mutability": "mutable", - "name": "idx", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2602, - "src": "1865:8:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, - "typeName": { - "id": 2600, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1865:4:8", + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "Promise", - "nodeType": "StructDefinition", - "scope": 4283, - "src": "1159:721:8", - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "8da5cb5b", - "id": 2604, - "mutability": "mutable", - "name": "owner", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "1890:20:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2603, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1890:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" }, - "value": null, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, "visibility": "public" }, { - "constant": false, - "functionSelector": "4f755c3e", - "id": 2606, - "mutability": "mutable", - "name": "cashierAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "1943:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2605, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1943:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "cc2f84cb", - "id": 2610, - "mutability": "mutable", - "name": "promises", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2022:43:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" - }, - "typeName": { - "id": 2609, - "keyType": { - "id": 2607, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2030:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "2022:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" - }, - "valueType": { - "contractScope": null, - "id": 2608, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "2041:7:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "16ed9e0e", - "id": 2613, - "mutability": "mutable", - "name": "promiseKeys", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2114:28:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[]" - }, - "typeName": { - "baseType": { - "id": 2611, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2114:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2612, - "length": null, - "nodeType": "ArrayTypeName", - "src": "2114:9:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", - "typeString": "bytes32[]" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "e598d697", - "id": 2617, - "mutability": "mutable", - "name": "accountSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2153:48:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 2616, - "keyType": { - "id": 2614, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2161:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2153:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2615, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2172:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "75a83102", - "id": 2621, - "mutability": "mutable", - "name": "ordersPromise", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2207:48:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" - }, - "typeName": { - "id": 2620, - "keyType": { - "id": 2618, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2215:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2207:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" - }, - "valueType": { - "id": 2619, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2226:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "ec29c17d", - "id": 2625, - "mutability": "mutable", - "name": "vouchersStatus", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2324:55:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus)" - }, - "typeName": { - "id": 2624, - "keyType": { - "id": 2622, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2332:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2324:33:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus)" - }, - "valueType": { - "contractScope": null, - "id": 2623, - "name": "VoucherStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4321, - "src": "2343:13:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage_ptr", - "typeString": "struct usingHelpers.VoucherStatus" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "9be905a1", - "id": 2629, - "mutability": "mutable", - "name": "voucherIssuers", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2423:49:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - }, - "typeName": { - "id": 2628, - "keyType": { - "id": 2626, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2431:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2423:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - }, - "valueType": { - "id": 2627, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2442:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 2635, - "mutability": "mutable", - "name": "balances", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2526:65:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "typeName": { - "id": 2634, - "keyType": { - "id": 2630, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2535:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2526:48:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(address => uint256))" - }, - "valueType": { - "id": 2633, - "keyType": { - "id": 2631, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2554:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2546:27:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 2632, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2565:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "id": 2641, - "mutability": "mutable", - "name": "operatorApprovals", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2634:71:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - }, - "typeName": { - "id": 2640, - "keyType": { - "id": 2636, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2643:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2634:45:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", - "typeString": "mapping(address => mapping(address => bool))" - }, - "valueType": { - "id": 2639, - "keyType": { - "id": 2637, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2662:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "2654:24:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "valueType": { - "id": 2638, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2673:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - } - }, - "value": null, - "visibility": "private" - }, - { - "constant": false, - "functionSelector": "99c849b8", - "id": 2645, - "mutability": "mutable", - "name": "typeCounters", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2768:48:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "typeName": { - "id": 2644, - "keyType": { - "id": 2642, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2777:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "2768:28:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 2643, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2788:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "7ed06c44", - "id": 2657, - "mutability": "constant", - "name": "MASK_TYPE", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "2877:63:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2646, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2877:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { "arguments": [ { - "argumentTypes": null, - "id": 2652, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "~", - "prefix": true, - "src": "2929:2:8", - "subExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2651, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2930:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 2650, + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, "isConstant": false, "isLValue": false, - "isPure": true, + "isPure": false, "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2921:7:8", + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint128_$", - "typeString": "type(uint128)" - }, - "typeName": { - "id": 2649, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "2921:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" } }, - "id": 2653, + "id": 8257, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "typeConversion", + "isPure": false, + "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2921:11:8", + "src": "43275:48:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint128", - "typeString": "uint128" + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 2648, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2913:7:8", + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2647, + "id": 8245, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "2913:7:8", + "src": "43152:7:6", "typeDescriptions": { - "typeIdentifier": null, - "typeString": null + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - } - }, - "id": 2654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2913:20:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "313238", - "id": 2655, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2937:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_128_by_1", - "typeString": "int_const 128" - }, - "value": "128" - }, - "src": "2913:27:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "21d6f3a7", - "id": 2664, - "mutability": "constant", - "name": "MASK_NF_INDEX", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "3248:51:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2658, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3248:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2662, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "~", - "prefix": true, - "src": "3296:2:8", - "subExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2661, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3297:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } + "visibility": "internal" } ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 2660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3288:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint128_$", - "typeString": "type(uint128)" - }, - "typeName": { - "id": 2659, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "3288:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2663, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3288:11:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "visibility": "public" - }, - { - "constant": true, - "functionSelector": "d905af55", - "id": 2669, - "mutability": "constant", - "name": "TYPE_NF_BIT", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "3623:46:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2665, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3623:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - }, - "id": 2668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3661:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 2667, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3666:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "3661:8:8", - "typeDescriptions": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "8f940f63", - "id": 2671, - "mutability": "mutable", - "name": "typeId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "3982:21:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2670, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3982:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "src": "43151:25:6" }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f3223bed", - "id": 2673, - "mutability": "mutable", - "name": "complainPeriod", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "4670:29:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2672, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4670:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "76942aed", - "id": 2675, - "mutability": "mutable", - "name": "cancelFaultPeriod", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4283, - "src": "4753:32:8", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4753:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 2689, - "name": "LogPromiseCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 2688, + "returnParameters": { + "id": 8251, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2677, - "indexed": true, + "id": 8250, "mutability": "mutable", - "name": "_promiseId", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4882:26:8", + "scope": 8260, + "src": "43243:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 2676, - "name": "bytes32", + "id": 8249, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "4882:7:8", + "src": "43243:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2679, - "indexed": true, + "id": 8263, "mutability": "mutable", - "name": "_assetTitle", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4918:26:8", + "scope": 8275, + "src": "43588:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2678, - "name": "string", + "id": 8262, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4918:6:8", + "src": "43588:7:6", "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2681, - "indexed": true, + "id": 8267, "mutability": "mutable", - "name": "_seller", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4954:23:8", + "scope": 8275, + "src": "43678:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26091,58 +28739,127 @@ "typeString": "address" }, "typeName": { - "id": 2680, + "id": 8266, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4954:7:8", + "src": "43678:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ { - "constant": false, - "id": 2683, - "indexed": false, - "mutability": "mutable", - "name": "_validFrom", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "4987:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2682, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4987:7:8", + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, - "visibility": "internal" - }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2685, - "indexed": false, + "id": 8278, "mutability": "mutable", - "name": "_validTo", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "5015:16:8", + "scope": 8290, + "src": "44029:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26150,72 +28867,160 @@ "typeString": "uint256" }, "typeName": { - "id": 2684, + "id": 8277, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5015:7:8", + "src": "44029:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2687, - "indexed": false, + "id": 8282, "mutability": "mutable", - "name": "_idx", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2689, - "src": "5200:12:8", + "scope": 8290, + "src": "44119:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 2686, - "name": "uint256", + "id": 8281, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "5200:7:8", + "src": "44119:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "4872:346:8" + "src": "44118:9:6" }, - "src": "4849:370:8" + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" }, { - "anonymous": false, - "documentation": null, - "id": 2697, - "name": "LogVoucherRedeemed", - "nodeType": "EventDefinition", + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, "parameters": { - "id": 2696, + "id": 8294, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2691, - "indexed": false, + "id": 8293, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2697, - "src": "5263:23:8", + "scope": 8305, + "src": "44451:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26223,190 +29028,503 @@ "typeString": "uint256" }, "typeName": { - "id": 2690, + "id": 8292, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5263:7:8", + "src": "44451:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2693, - "indexed": false, + "id": 8297, "mutability": "mutable", - "name": "_holder", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2697, - "src": "5296:15:8", + "scope": 8305, + "src": "44541:5:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2692, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5296:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2695, - "indexed": false, - "mutability": "mutable", - "name": "_promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2697, - "src": "5321:18:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 2694, - "name": "bytes32", + "id": 8296, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "5321:7:8", + "src": "44541:5:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "src": "5253:92:8" + "src": "44540:7:6" }, - "src": "5229:117:8" + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" }, { - "anonymous": false, - "documentation": null, - "id": 2701, - "name": "LogVoucherRefunded", - "nodeType": "EventDefinition", - "parameters": { - "id": 2700, - "nodeType": "ParameterList", - "parameters": [ + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ { - "constant": false, - "id": 2699, - "indexed": false, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2701, - "src": "5390:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2698, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5390:7:8", + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "5380:39:8" - }, - "src": "5356:64:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 2705, - "name": "LogVoucherComplain", - "nodeType": "EventDefinition", - "parameters": { - "id": 2704, - "nodeType": "ParameterList", - "parameters": [ + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, { - "constant": false, - "id": 2703, - "indexed": false, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2705, - "src": "5464:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "typeName": { - "id": 2702, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5464:7:8", + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "value": null, - "visibility": "internal" + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" } - ], - "src": "5454:39:8" + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" }, - "src": "5430:64:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 2709, - "name": "LogVoucherFaultCancel", - "nodeType": "EventDefinition", "parameters": { - "id": 2708, + "id": 8309, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2707, - "indexed": false, + "id": 8308, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2709, - "src": "5541:23:8", + "scope": 8343, + "src": "44841:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26414,221 +29532,386 @@ "typeString": "uint256" }, "typeName": { - "id": 2706, + "id": 8307, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5541:7:8", + "src": "44841:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "5531:39:8" + "src": "44840:25:6" }, - "src": "5504:67:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 2715, - "name": "LogExpirationTriggered", - "nodeType": "EventDefinition", - "parameters": { - "id": 2714, + "returnParameters": { + "id": 8313, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2711, - "indexed": false, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2715, - "src": "5619:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2710, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5619:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2713, - "indexed": false, + "id": 8312, "mutability": "mutable", - "name": "_triggeredBy", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2715, - "src": "5652:20:8", + "scope": 8343, + "src": "44932:4:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, "typeName": { - "id": 2712, - "name": "address", + "id": 8311, + "name": "bool", "nodeType": "ElementaryTypeName", - "src": "5652:7:8", - "stateMutability": "nonpayable", + "src": "44932:4:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, "visibility": "internal" } ], - "src": "5609:69:8" + "src": "44931:6:6" }, - "src": "5581:98:8" + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" }, { - "anonymous": false, - "documentation": null, - "id": 2721, - "name": "LogFinalizeVoucher", - "nodeType": "EventDefinition", - "parameters": { - "id": 2720, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2717, - "indexed": false, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "5723:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2716, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5723:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ { - "constant": false, - "id": 2719, - "indexed": false, - "mutability": "mutable", - "name": "_triggeredBy", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2721, - "src": "5756:20:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2718, - "name": "address", + "id": 8345, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5756:7:8", - "stateMutability": "nonpayable", + "src": "45704:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "5713:69:8" + "src": "45703:25:6" }, - "src": "5689:94:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 2727, - "name": "LogCashierSet", - "nodeType": "EventDefinition", - "parameters": { - "id": 2726, + "returnParameters": { + "id": 8351, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2723, - "indexed": false, + "id": 8350, "mutability": "mutable", - "name": "_newCashier", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2727, - "src": "5822:19:8", + "scope": 8365, + "src": "45795:4:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, "typeName": { - "id": 2722, - "name": "address", + "id": 8349, + "name": "bool", "nodeType": "ElementaryTypeName", - "src": "5822:7:8", - "stateMutability": "nonpayable", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, - "visibility": "internal" - }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2725, - "indexed": false, + "id": 8370, "mutability": "mutable", - "name": "_triggeredBy", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2727, - "src": "5851:20:8", + "scope": 8375, + "src": "46226:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26636,73 +29919,206 @@ "typeString": "address" }, "typeName": { - "id": 2724, + "id": 8369, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5851:7:8", + "src": "46226:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "5812:65:8" + "src": "46225:9:6" }, - "src": "5793:85:8" + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" }, { - "anonymous": false, - "documentation": null, - "id": 2733, - "name": "LogComplainPeriodChanged", - "nodeType": "EventDefinition", + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, "parameters": { - "id": 2732, + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2729, - "indexed": false, + "id": 8380, "mutability": "mutable", - "name": "_newComplainPeriod", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2733, - "src": "5928:26:8", + "scope": 8385, + "src": "46538:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 2728, - "name": "uint256", + "id": 8379, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "5928:7:8", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "internal" - }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2731, - "indexed": false, + "id": 8388, "mutability": "mutable", - "name": "_triggeredBy", + "name": "_seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2733, - "src": "5964:20:8", + "scope": 8399, + "src": "46770:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26710,44 +30126,33 @@ "typeString": "address" }, "typeName": { - "id": 2730, + "id": 8387, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5964:7:8", + "src": "46770:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "5918:72:8" + "src": "46769:17:6" }, - "src": "5888:103:8" - }, - { - "anonymous": false, - "documentation": null, - "id": 2739, - "name": "LogCancelFaultPeriodChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 2738, + "returnParameters": { + "id": 8393, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2735, - "indexed": false, + "id": 8392, "mutability": "mutable", - "name": "_newCancelFaultPeriod", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2739, - "src": "6044:29:8", + "scope": 8399, + "src": "46855:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26755,73 +30160,185 @@ "typeString": "uint256" }, "typeName": { - "id": 2734, + "id": 8391, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6044:7:8", + "src": "46855:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2737, - "indexed": false, + "id": 8404, "mutability": "mutable", - "name": "_triggeredBy", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2739, - "src": "6083:20:8", + "scope": 8409, + "src": "47095:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2736, - "name": "address", + "id": 8403, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6083:7:8", - "stateMutability": "nonpayable", + "src": "47095:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "6034:75:8" + "src": "47094:9:6" }, - "src": "6001:109:8" + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" }, { - "anonymous": false, - "documentation": null, - "id": 2745, - "name": "LogFundsReleased", - "nodeType": "EventDefinition", + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, "parameters": { - "id": 2744, + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2741, - "indexed": false, + "id": 8414, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2745, - "src": "6156:23:8", + "scope": 8419, + "src": "47336:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26829,741 +30346,204 @@ "typeString": "uint256" }, "typeName": { - "id": 2740, + "id": 8413, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6156:7:8", + "src": "47336:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 2743, - "indexed": false, + "id": 8424, "mutability": "mutable", - "name": "_type", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2745, - "src": "6189:11:8", + "scope": 8429, + "src": "47602:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2742, - "name": "uint8", + "id": 8423, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6189:5:8", + "src": "47602:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "6146:94:8" + "src": "47601:9:6" }, - "src": "6124:117:8" + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" }, { + "baseFunctions": [ + 9636 + ], "body": { - "id": 2756, + "id": 8442, "nodeType": "Block", - "src": "6269:160:8", + "src": "47992:55:6", "statements": [ { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2748, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "6287:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6287:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2750, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "6301:5:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6287:19:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f4f", - "id": 2752, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6308:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", - "typeString": "literal_string \"UNAUTHORIZED_O\"" - }, - "value": "UNAUTHORIZED_O" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_66c322bb1fe23e7af9b87a20d4642a6419daf2ab57768ee94f75c472f3ebabb5", - "typeString": "literal_string \"UNAUTHORIZED_O\"" - } - ], - "id": 2747, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6279:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2753, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6279:46:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2754, - "nodeType": "ExpressionStatement", - "src": "6279:46:8" - }, - { - "id": 2755, - "nodeType": "PlaceholderStatement", - "src": "6421:1:8" - } - ] - }, - "documentation": null, - "id": 2757, - "name": "onlyOwner", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 2746, - "nodeType": "ParameterList", - "parameters": [], - "src": "6266:2:8" - }, - "src": "6248:181:8", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2778, - "nodeType": "Block", - "src": "6466:330:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2760, - "name": "cashierAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2606, - "src": "6484:14:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6510:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2762, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "6502:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2761, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6502:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2764, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6502:10:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6484:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f43415348494552", - "id": 2766, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6514:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_355ef3ceecaf23aa0abe4f0994c54ae288965bb10a11151e3280e2f1478e2286", - "typeString": "literal_string \"UNSPECIFIED_CASHIER\"" - }, - "value": "UNSPECIFIED_CASHIER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_355ef3ceecaf23aa0abe4f0994c54ae288965bb10a11151e3280e2f1478e2286", - "typeString": "literal_string \"UNSPECIFIED_CASHIER\"" - } - ], - "id": 2759, - "name": "require", + "baseExpression": { + "id": 8438, + "name": "ordersPromise", "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6476:7:8", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } }, - "id": 2767, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6476:60:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2768, - "nodeType": "ExpressionStatement", - "src": "6476:60:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2773, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2770, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "6645:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6645:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2772, - "name": "cashierAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2606, - "src": "6659:14:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6645:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f43", - "id": 2774, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6675:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", - "typeString": "literal_string \"UNAUTHORIZED_C\"" - }, - "value": "UNAUTHORIZED_C" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", - "typeString": "literal_string \"UNAUTHORIZED_C\"" - } - ], - "id": 2769, - "name": "require", + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6637:7:8", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 2775, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6637:55:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 2776, - "nodeType": "ExpressionStatement", - "src": "6637:55:8" - }, - { - "id": 2777, - "nodeType": "PlaceholderStatement", - "src": "6788:1:8" + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" } ] }, - "documentation": null, - "id": 2779, - "name": "onlyFromCashier", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 2758, - "nodeType": "ParameterList", - "parameters": [], - "src": "6463:2:8" + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" }, - "src": "6439:357:8", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 2795, - "nodeType": "Block", - "src": "6857:224:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2790, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2786, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2781, - "src": "6928:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2784, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "6905:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 2785, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "ownerOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1426, - "src": "6905:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" - } - }, - "id": 2787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6905:39:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2788, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "6948:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2789, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6948:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6905:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f56", - "id": 2791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6960:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", - "typeString": "literal_string \"UNAUTHORIZED_V\"" - }, - "value": "UNAUTHORIZED_V" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", - "typeString": "literal_string \"UNAUTHORIZED_V\"" - } - ], - "id": 2783, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6897:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2792, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6897:80:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2793, - "nodeType": "ExpressionStatement", - "src": "6897:80:8" - }, - { - "id": 2794, - "nodeType": "PlaceholderStatement", - "src": "7073:1:8" - } - ] + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" }, - "documentation": null, - "id": 2796, - "name": "onlyVoucherOwner", - "nodeType": "ModifierDefinition", - "overrides": null, "parameters": { - "id": 2782, + "id": 8433, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2781, + "id": 8432, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2796, - "src": "6832:23:8", + "scope": 8443, + "src": "47885:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -27571,375 +30551,125 @@ "typeString": "uint256" }, "typeName": { - "id": 2780, + "id": 8431, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6832:7:8", + "src": "47885:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "6831:25:8" + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" }, - "src": "6806:275:8", + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", "virtual": false, - "visibility": "internal" + "visibility": "external" }, { + "baseFunctions": [ + 9642 + ], "body": { - "id": 2824, + "id": 8452, "nodeType": "Block", - "src": "7196:315:8", + "src": "48302:40:6", "statements": [ { "expression": { - "argumentTypes": null, - "id": 2804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2801, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2604, - "src": "7206:5:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2802, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "7214:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7214:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7206:18:8", + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 2805, - "nodeType": "ExpressionStatement", - "src": "7206:18:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2810, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2806, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "7234:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2808, - "name": "_tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2798, - "src": "7265:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2807, - "name": "ERC1155ERC721", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2210, - "src": "7251:13:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC1155ERC721_$2210_$", - "typeString": "type(contract ERC1155ERC721)" - } - }, - "id": 2809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7251:30:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "src": "7234:47:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 2811, - "nodeType": "ExpressionStatement", - "src": "7234:47:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2812, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "7437:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_604800_by_1", - "typeString": "int_const 604800" - }, - "id": 2815, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "37", - "id": 2813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7454:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_7_by_1", - "typeString": "int_const 7" - }, - "value": "7" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2814, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7458:6:8", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "1" - }, - "src": "7454:10:8", - "typeDescriptions": { - "typeIdentifier": "t_rational_604800_by_1", - "typeString": "int_const 604800" - } - }, - "src": "7437:27:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2817, - "nodeType": "ExpressionStatement", - "src": "7437:27:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2818, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "7474:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_604800_by_1", - "typeString": "int_const 604800" - }, - "id": 2821, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "37", - "id": 2819, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7494:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_7_by_1", - "typeString": "int_const 7" - }, - "value": "7" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2820, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7498:6:8", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_86400_by_1", - "typeString": "int_const 86400" - }, - "value": "1" - }, - "src": "7494:10:8", - "typeDescriptions": { - "typeIdentifier": "t_rational_604800_by_1", - "typeString": "int_const 604800" - } - }, - "src": "7474:30:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 2823, - "nodeType": "ExpressionStatement", - "src": "7474:30:8" + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" } ] }, - "documentation": null, - "id": 2825, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, "implemented": true, - "kind": "constructor", + "kind": "function", "modifiers": [], - "name": "", + "name": "getTokensContractAddress", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, "parameters": { - "id": 2799, + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 2798, + "id": 8448, "mutability": "mutable", - "name": "_tokensContract", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2825, - "src": "7146:23:8", + "scope": 8453, + "src": "48288:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -27947,2479 +30677,1556 @@ "typeString": "address" }, "typeName": { - "id": 2797, + "id": 8447, "name": "address", "nodeType": "ElementaryTypeName", - "src": "7146:7:8", + "src": "48288:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "7102:73:8" - }, - "returnParameters": { - "id": 2800, - "nodeType": "ParameterList", - "parameters": [], - "src": "7196:0:8" + "src": "48287:9:6" }, - "scope": 4283, - "src": "7091:420:8", - "stateMutability": "nonpayable", + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", "virtual": false, - "visibility": "public" + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" }, { - "body": { - "id": 2932, - "nodeType": "Block", - "src": "8449:1324:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2848, - "name": "_validFrom", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8476:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 2849, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8490:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8476:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f56414c49444954595f46524f4d", - "id": 2851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8500:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", - "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" - }, - "value": "INVALID_VALIDITY_FROM" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", - "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" - } - ], - "id": 2847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8468:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8468:56:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2853, - "nodeType": "ExpressionStatement", - "src": "8468:56:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2858, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2855, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8628:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2856, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "8640:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 2857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8640:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8628:27:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f56414c49444954595f544f", - "id": 2859, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8657:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", - "typeString": "literal_string \"INVALID_VALIDITY_TO\"" - }, - "value": "INVALID_VALIDITY_TO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", - "typeString": "literal_string \"INVALID_VALIDITY_TO\"" - } - ], - "id": 2854, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8620:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8620:59:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2861, - "nodeType": "ExpressionStatement", - "src": "8620:59:8" + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - { - "assignments": [ - 2863 - ], - "declarations": [ - { - "constant": false, - "id": 2863, - "mutability": "mutable", - "name": "key", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2932, - "src": "8783:11:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2862, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8783:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2864, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "8783:11:8" + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } }, - { - "expression": { - "argumentTypes": null, - "id": 2874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2865, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "8804:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2869, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2830, - "src": "8837:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "argumentTypes": null, - "id": 2870, - "name": "_validFrom", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "8850:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2871, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "8862:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2867, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "8820:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 2868, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8820:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 2872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8820:51:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 2866, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "8810:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 2873, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8810:62:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "8804:68:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 2875, - "nodeType": "ExpressionStatement", - "src": "8804:68:8" + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2879, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2876, - "name": "promiseKeys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "8895:11:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8895:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 2878, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8916:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8895:22:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2893, - "nodeType": "IfStatement", - "src": "8891:125:8", - "trueBody": { - "id": 2892, - "nodeType": "Block", - "src": "8919:97:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 2888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2881, - "name": "promiseKeys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "8941:11:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2886, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2882, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "8953:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 2884, - "indexExpression": { - "argumentTypes": null, - "id": 2883, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "8962:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8953:13:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "id": 2885, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "idx", - "nodeType": "MemberAccess", - "referencedDeclaration": 2601, - "src": "8953:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8941:30:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 2887, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "8975:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "8941:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "50524f4d4953455f414c52454144595f455849535453", - "id": 2889, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8980:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", - "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" - }, - "value": "PROMISE_ALREADY_EXISTS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", - "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" - } - ], - "id": 2880, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "8933:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2890, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8933:72:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2891, - "nodeType": "ExpressionStatement", - "src": "8933:72:8" - } - ] + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - { - "expression": { - "argumentTypes": null, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2894, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "9034:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 2896, - "indexExpression": { - "argumentTypes": null, - "id": 2895, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9043:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9034:13:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2898, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9083:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2899, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2830, - "src": "9112:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "argumentTypes": null, - "id": 2900, - "name": "_seller", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2828, - "src": "9145:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2901, - "name": "_validFrom", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "9206:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2902, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "9239:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2903, - "name": "_price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2836, - "src": "9268:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2904, - "name": "_depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2838, - "src": "9299:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2905, - "name": "_depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2840, - "src": "9334:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2906, - "name": "promiseKeys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "9463:11:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2907, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9463:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2897, - "name": "Promise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2602, - "src": "9050:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Promise_$2602_storage_ptr_$", - "typeString": "type(struct VoucherKernel.Promise storage pointer)" - } - }, - "id": 2908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "promiseId", - "assetTitle", - "seller", - "validFrom", - "validTo", - "price", - "depositSe", - "depositBu", - "idx" - ], - "nodeType": "FunctionCall", - "src": "9050:442:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "src": "9034:458:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "id": 2910, - "nodeType": "ExpressionStatement", - "src": "9034:458:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2914, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9528:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "expression": { - "argumentTypes": null, - "id": 2911, - "name": "promiseKeys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "9511:11:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9511:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", - "typeString": "function (bytes32)" - } - }, - "id": 2915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9511:21:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2916, - "nodeType": "ExpressionStatement", - "src": "9511:21:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2918, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9574:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 2919, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2830, - "src": "9579:11:8", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2920, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "9592:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 2921, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9592:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2922, - "name": "_validFrom", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2832, - "src": "9604:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2923, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2834, - "src": "9616:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 2924, - "name": "promiseKeys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "9714:11:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 2925, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9714:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 2926, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9735:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "9714:22:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2917, - "name": "LogPromiseCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2689, - "src": "9556:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_string_memory_ptr_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (bytes32,string memory,address,uint256,uint256,uint256)" - } - }, - "id": 2928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9556:181:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2929, - "nodeType": "EmitStatement", - "src": "9551:186:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 2930, - "name": "key", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2863, - "src": "9763:3:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 2846, - "id": 2931, - "nodeType": "Return", - "src": "9756:10:8" - } - ] - }, - "documentation": { - "id": 2826, - "nodeType": "StructuredDocumentation", - "src": "7526:514:8", - "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (but not in prototype).\n @param _seller seller of the promise\n @param _assetTitle Name of the asset\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" - }, - "functionSelector": "3a2b95b9", - "id": 2933, - "implemented": true, - "kind": "function", - "modifiers": [ + "visibility": "internal" + }, { - "arguments": null, - "id": 2843, - "modifierName": { - "argumentTypes": null, - "id": 2842, - "name": "onlyFromCashier", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "8403:15:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "nodeType": "ModifierInvocation", - "src": "8403:15:8" - } - ], - "name": "createAssetPromise", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2828, - "mutability": "mutable", - "name": "_seller", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8082:15:8", - "stateVariable": false, - "storageLocation": "default", + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" - }, - "typeName": { - "id": 2827, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8082:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" + } }, - { - "constant": false, - "id": 2830, - "mutability": "mutable", - "name": "_assetTitle", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8108:27:8", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2829, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8108:6:8", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "constant": false, - "id": 2832, - "mutability": "mutable", - "name": "_validFrom", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8173:18:8", - "stateVariable": false, - "storageLocation": "default", + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "typeName": { - "id": 2831, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8173:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + } }, - { - "constant": false, - "id": 2834, - "mutability": "mutable", - "name": "_validTo", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8201:16:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2833, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8201:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - { - "constant": false, - "id": 2836, - "mutability": "mutable", - "name": "_price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8227:14:8", - "stateVariable": false, - "storageLocation": "default", + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "typeName": { - "id": 2835, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8227:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + } }, - { - "constant": false, - "id": 2838, - "mutability": "mutable", - "name": "_depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8251:18:8", - "stateVariable": false, - "storageLocation": "default", + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "typeName": { - "id": 2837, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8251:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + } }, - { - "constant": false, - "id": 2840, - "mutability": "mutable", - "name": "_depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8279:18:8", - "stateVariable": false, - "storageLocation": "default", + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "typeName": { - "id": 2839, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "8279:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "src": "8072:303:8" + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } }, - "returnParameters": { - "id": 2846, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2845, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2933, - "src": "8436:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 2844, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "8436:7:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "src": "8435:9:8" + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } }, - "scope": 4283, - "src": "8045:1728:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" + "visibility": "private" }, { - "body": { - "id": 3003, - "nodeType": "Block", - "src": "10316:775:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 2953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2948, - "name": "_promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2938, - "src": "10334:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2951, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10356:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2950, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "10348:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_bytes32_$", - "typeString": "type(bytes32)" - }, - "typeName": { - "id": 2949, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10348:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2952, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10348:10:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "10334:24:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f50524f4d495345", - "id": 2954, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10360:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", - "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" - }, - "value": "UNSPECIFIED_PROMISE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", - "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" - } - ], - "id": 2947, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10326:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10326:56:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2956, - "nodeType": "ExpressionStatement", - "src": "10326:56:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2963, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2958, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "10492:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 2960, - "indexExpression": { - "argumentTypes": null, - "id": 2959, - "name": "_promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2938, - "src": "10501:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10492:20:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "id": 2961, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "seller", - "nodeType": "MemberAccess", - "referencedDeclaration": 2589, - "src": "10492:27:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 2962, - "name": "_seller", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2936, - "src": "10523:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "10492:38:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f434f", - "id": 2964, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10532:17:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", - "typeString": "literal_string \"UNAUTHORIZED_CO\"" - }, - "value": "UNAUTHORIZED_CO" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", - "typeString": "literal_string \"UNAUTHORIZED_CO\"" - } - ], - "id": 2957, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10484:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2965, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10484:66:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2966, - "nodeType": "ExpressionStatement", - "src": "10484:66:8" - }, - { - "expression": { - "argumentTypes": null, + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { "arguments": [ { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 2970, + "id": 6234, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2968, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2940, - "src": "10655:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { "hexValue": "30", - "id": 2969, + "id": 6233, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "10667:1:8", - "subdenomination": null, + "src": "3057:1:6", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, - "src": "10655:13:8", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f5155414e54495459", - "id": 2971, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10670:18:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", - "typeString": "literal_string \"INVALID_QUANTITY\"" - }, - "value": "INVALID_QUANTITY" } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", - "typeString": "literal_string \"INVALID_QUANTITY\"" + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" } ], - "id": 2967, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "10647:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10647:42:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2973, - "nodeType": "ExpressionStatement", - "src": "10647:42:8" - }, - { - "assignments": [ - 2975 - ], - "declarations": [ - { - "constant": false, - "id": 2975, - "mutability": "mutable", - "name": "tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3003, - "src": "10791:21:8", - "stateVariable": false, - "storageLocation": "default", + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" }, "typeName": { - "id": 2974, - "name": "uint256", + "id": 6231, + "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "10791:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2979, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2977, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10833:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 2976, - "name": "generateTokenType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3219, - "src": "10815:17:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", - "typeString": "function (bool) returns (uint256)" + "src": "3048:7:6", + "typeDescriptions": {} } }, - "id": 2978, + "id": 6235, "isConstant": false, "isLValue": false, - "isPure": false, - "kind": "functionCall", + "isPure": true, + "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10815:23:8", + "src": "3048:11:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" }, - "nodeType": "VariableDeclarationStatement", - "src": "10791:47:8" + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2983, - "name": "_seller", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2936, - "src": "10910:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2984, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2975, - "src": "10919:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2985, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2940, - "src": "10934:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 2986, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10945:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "id": 2980, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "10890:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1599, - "src": "10890:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,uint256,bytes memory) external" - } - }, - "id": 2987, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, "isConstant": false, "isLValue": false, - "isPure": false, - "kind": "functionCall", + "isPure": true, + "kind": "number", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10890:58:8", - "tryCall": false, + "nodeType": "Literal", + "src": "3428:1:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "id": 2988, - "nodeType": "ExpressionStatement", - "src": "10890:58:8" + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "id": 2993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2989, - "name": "ordersPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2621, - "src": "10967:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" - } - }, - "id": 2991, - "indexExpression": { - "argumentTypes": null, - "id": 2990, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2975, - "src": "10981:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10967:28:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 2992, - "name": "_promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2938, - "src": "10998:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "10967:41:8", + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 2994, - "nodeType": "ExpressionStatement", - "src": "10967:41:8" + "visibility": "internal" }, { - "expression": { - "argumentTypes": null, - "id": 2999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 2995, - "name": "accountSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "11018:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 2997, - "indexExpression": { - "argumentTypes": null, - "id": 2996, - "name": "_seller", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2936, - "src": "11032:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11018:22:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 2998, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2940, - "src": "11044:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11018:35:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 3000, - "nodeType": "ExpressionStatement", - "src": "11018:35:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3001, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2975, - "src": "11071:13:8", + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 2946, - "id": 3002, - "nodeType": "Return", - "src": "11064:20:8" - } - ] - }, - "documentation": { - "id": 2934, - "nodeType": "StructuredDocumentation", - "src": "9792:370:8", - "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" - }, - "functionSelector": "ae083814", - "id": 3004, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 2943, - "modifierName": { - "argumentTypes": null, - "id": 2942, - "name": "onlyFromCashier", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "10270:15:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } + "visibility": "internal" }, - "nodeType": "ModifierInvocation", - "src": "10270:15:8" - } - ], - "name": "createOrder", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2941, - "nodeType": "ParameterList", - "parameters": [ { "constant": false, - "id": 2936, + "id": 6263, + "indexed": true, "mutability": "mutable", "name": "_seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10188:15:8", + "scope": 6271, + "src": "5003:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30427,56 +32234,54 @@ "typeString": "address" }, "typeName": { - "id": 2935, + "id": 6262, "name": "address", "nodeType": "ElementaryTypeName", - "src": "10188:7:8", + "src": "5003:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2938, + "id": 6265, + "indexed": false, "mutability": "mutable", - "name": "_promiseId", + "name": "_validFrom", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10205:18:8", + "scope": 6271, + "src": "5037:18:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 2937, - "name": "bytes32", + "id": 6264, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10205:7:8", + "src": "5037:7:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 2940, + "id": 6267, + "indexed": false, "mutability": "mutable", - "name": "_quantity", + "name": "_validTo", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10225:17:8", + "scope": 6271, + "src": "5066:16:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30484,34 +32289,26 @@ "typeString": "uint256" }, "typeName": { - "id": 2939, + "id": 6266, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10225:7:8", + "src": "5066:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - } - ], - "src": "10187:56:8" - }, - "returnParameters": { - "id": 2946, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 2945, + "id": 6269, + "indexed": false, "mutability": "mutable", - "name": "", + "name": "_idx", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3004, - "src": "10303:7:8", + "scope": 6271, + "src": "5093:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30519,261 +32316,67 @@ "typeString": "uint256" }, "typeName": { - "id": 2944, + "id": 6268, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "10303:7:8", + "src": "5093:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "10302:9:8" + "src": "4922:190:6" }, - "scope": 4283, - "src": "10167:924:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" + "src": "4899:214:6" }, { - "body": { - "id": 3030, - "nodeType": "Block", - "src": "11580:170:8", - "statements": [ + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3019, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "11626:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 3020, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3009, - "src": "11642:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3021, - "name": "_holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3011, - "src": "11651:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3018, - "name": "checkOrderFillable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3085, - "src": "11607:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", - "typeString": "function (uint256,address,address) view" - } - }, - "id": 3022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11607:52:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 3023, - "nodeType": "ExpressionStatement", - "src": "11607:52:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3025, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3009, - "src": "11710:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3026, - "name": "_holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3011, - "src": "11719:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3027, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3007, - "src": "11728:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3024, - "name": "extract721", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3187, - "src": "11699:10:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,address,uint256) returns (uint256)" - } - }, - "id": 3028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11699:44:8", - "tryCall": false, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 3017, - "id": 3029, - "nodeType": "Return", - "src": "11692:51:8" - } - ] - }, - "documentation": { - "id": 3005, - "nodeType": "StructuredDocumentation", - "src": "11107:320:8", - "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" - }, - "functionSelector": "ae4606fe", - "id": 3031, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 3014, - "modifierName": { - "argumentTypes": null, - "id": 3013, - "name": "onlyFromCashier", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "11534:15:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } + "visibility": "internal" }, - "nodeType": "ModifierInvocation", - "src": "11534:15:8" - } - ], - "name": "fillOrder", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3012, - "nodeType": "ParameterList", - "parameters": [ { "constant": false, - "id": 3007, + "id": 6275, + "indexed": false, "mutability": "mutable", - "name": "_tokenIdSupply", + "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11451:22:8", + "scope": 6285, + "src": "5198:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30781,27 +32384,26 @@ "typeString": "uint256" }, "typeName": { - "id": 3006, + "id": 6274, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11451:7:8", + "src": "5198:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3009, + "id": 6277, + "indexed": false, "mutability": "mutable", "name": "_issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11475:15:8", + "scope": 6285, + "src": "5232:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30809,28 +32411,27 @@ "typeString": "address" }, "typeName": { - "id": 3008, + "id": 6276, "name": "address", "nodeType": "ElementaryTypeName", - "src": "11475:7:8", + "src": "5232:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3011, + "id": 6279, + "indexed": false, "mutability": "mutable", "name": "_holder", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11492:15:8", + "scope": 6285, + "src": "5258:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30838,35 +32439,95 @@ "typeString": "address" }, "typeName": { - "id": 3010, + "id": 6278, "name": "address", "nodeType": "ElementaryTypeName", - "src": "11492:7:8", + "src": "5258:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "visibility": "internal" } ], - "src": "11450:58:8" + "src": "5146:196:6" }, - "returnParameters": { - "id": 3017, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3016, + "id": 6287, + "indexed": false, "mutability": "mutable", - "name": "", + "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3031, - "src": "11567:7:8", + "scope": 6293, + "src": "5386:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -30874,765 +32535,287 @@ "typeString": "uint256" }, "typeName": { - "id": 3015, + "id": 6286, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "11567:7:8", + "src": "5386:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, "visibility": "internal" } ], - "src": "11566:9:8" + "src": "5375:96:6" }, - "scope": 4283, - "src": "11432:318:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" + "src": "5351:121:6" }, { - "body": { - "id": 3084, - "nodeType": "Block", - "src": "12168:746:8", - "statements": [ + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3044, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3042, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3034, - "src": "12186:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3043, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12204:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12186:19:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 3045, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12207:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - }, - "value": "UNSPECIFIED_ID" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - } - ], - "id": 3041, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12178:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3046, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12178:46:8", - "tryCall": false, + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3047, - "nodeType": "ExpressionStatement", - "src": "12178:46:8" + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "condition": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3048, - "name": "_holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "12329:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 4641, - "src": "12329:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3050, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12329:20:8", - "tryCall": false, + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "falseBody": null, - "id": 3062, - "nodeType": "IfStatement", - "src": "12325:233:8", - "trueBody": { - "id": 3061, - "nodeType": "Block", - "src": "12351:207:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30783135306237613032", - "id": 3056, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12408:10:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_353073666_by_1", - "typeString": "int_const 353073666" - }, - "value": "0x150b7a02" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_353073666_by_1", - "typeString": "int_const 353073666" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3053, - "name": "_holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "12381:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3052, - "name": "IERC165", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2379, - "src": "12373:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC165_$2379_$", - "typeString": "type(contract IERC165)" - } - }, - "id": 3054, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12373:16:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC165_$2379", - "typeString": "contract IERC165" - } - }, - "id": 3055, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "supportsInterface", - "nodeType": "MemberAccess", - "referencedDeclaration": 2378, - "src": "12373:34:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", - "typeString": "function (bytes4) view external returns (bool)" - } - }, - "id": 3057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12373:46:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", - "id": 3058, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12421:29:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", - "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" - }, - "value": "UNSUPPORTED_ERC721_RECEIVED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", - "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" - } - ], - "id": 3051, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12365:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3059, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12365:86:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3060, - "nodeType": "ExpressionStatement", - "src": "12365:86:8" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 3069, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3064, - "name": "_holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3038, - "src": "12592:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 3067, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12611:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 3066, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12603:7:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3065, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12603:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3068, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12603:10:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "12592:21:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f41444452455353", - "id": 3070, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12615:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - }, - "value": "UNSPECIFIED_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - } - ], - "id": 3063, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12584:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3071, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12584:53:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3072, - "nodeType": "ExpressionStatement", - "src": "12584:53:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3080, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3076, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3036, - "src": "12771:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3077, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3034, - "src": "12780:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3074, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "12746:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 3075, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1374, - "src": "12746:24:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,uint256) view external returns (uint256)" - } - }, - "id": 3078, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12746:49:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3079, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12798:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12746:53:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4f464645525f454d505459", - "id": 3081, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12801:13:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", - "typeString": "literal_string \"OFFER_EMPTY\"" - }, - "value": "OFFER_EMPTY" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", - "typeString": "literal_string \"OFFER_EMPTY\"" - } - ], - "id": 3073, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12738:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3082, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12738:77:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3083, - "nodeType": "ExpressionStatement", - "src": "12738:77:8" + "visibility": "internal" } - ] - }, - "documentation": { - "id": 3032, - "nodeType": "StructuredDocumentation", - "src": "11765:277:8", - "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721) " + ], + "src": "5685:47:6" }, - "id": 3085, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "checkOrderFillable", - "nodeType": "FunctionDefinition", - "overrides": null, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", "parameters": { - "id": 3039, + "id": 6316, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3034, + "id": 6313, + "indexed": false, "mutability": "mutable", - "name": "_tokenIdSupply", + "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "12076:22:8", + "scope": 6317, + "src": "5766:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -31640,27 +32823,68 @@ "typeString": "uint256" }, "typeName": { - "id": 3033, + "id": 6312, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "12076:7:8", + "src": "5766:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3036, + "id": 6315, + "indexed": false, "mutability": "mutable", - "name": "_issuer", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "12100:15:8", + "scope": 6323, + "src": "5845:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -31668,28 +32892,27 @@ "typeString": "address" }, "typeName": { - "id": 3035, + "id": 6318, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12100:7:8", + "src": "5845:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3038, + "id": 6321, + "indexed": false, "mutability": "mutable", - "name": "_holder", + "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3085, - "src": "12117:15:8", + "scope": 6323, + "src": "5870:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -31697,1351 +32920,207 @@ "typeString": "address" }, "typeName": { - "id": 3037, + "id": 6320, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12117:7:8", + "src": "5870:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "12075:58:8" + "src": "5844:47:6" }, - "returnParameters": { - "id": 3040, - "nodeType": "ParameterList", - "parameters": [], - "src": "12168:0:8" - }, - "scope": 4283, - "src": "12048:866:8", - "stateMutability": "view", - "virtual": false, - "visibility": "internal" + "src": "5821:71:6" }, { - "body": { - "id": 3186, - "nodeType": "Block", - "src": "13481:1087:8", - "statements": [ + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ { - "condition": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "id": 3097, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "13495:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isContract", - "nodeType": "MemberAccess", - "referencedDeclaration": 4641, - "src": "13495:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", - "typeString": "function (address) view returns (bool)" - } - }, - "id": 3099, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13495:16:8", - "tryCall": false, + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "falseBody": null, - "id": 3121, - "nodeType": "IfStatement", - "src": "13491:391:8", - "trueBody": { - "id": 3120, - "nodeType": "Block", - "src": "13513:369:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - }, - "id": 3116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3105, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "13577:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3106, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "13586:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13586:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 3108, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "13598:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 3109, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13614:2:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3102, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "13555:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3101, - "name": "ERC721TokenReceiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2513, - "src": "13535:19:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$2513_$", - "typeString": "type(contract ERC721TokenReceiver)" - } - }, - "id": 3103, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13535:24:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC721TokenReceiver_$2513", - "typeString": "contract ERC721TokenReceiver" - } - }, - "id": 3104, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "onERC721Received", - "nodeType": "MemberAccess", - "referencedDeclaration": 2512, - "src": "13535:41:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", - "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" - } - }, - "id": 3110, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13535:82:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3112, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "13641:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 3111, - "name": "ERC721TokenReceiver", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2513, - "src": "13621:19:8", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$2513_$", - "typeString": "type(contract ERC721TokenReceiver)" - } - }, - "id": 3113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13621:24:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC721TokenReceiver_$2513", - "typeString": "contract ERC721TokenReceiver" - } - }, - "id": 3114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "onERC721Received", - "nodeType": "MemberAccess", - "referencedDeclaration": 2512, - "src": "13621:41:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", - "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" - } - }, - "id": 3115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "selector", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13621:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - }, - "src": "13535:136:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", - "id": 3117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13673:29:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", - "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" - }, - "value": "UNSUPPORTED_ERC721_RECEIVED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", - "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" - } - ], - "id": 3100, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "13527:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13527:176:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3119, - "nodeType": "ExpressionStatement", - "src": "13527:176:8" - } - ] - } + "visibility": "internal" }, { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3125, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "13913:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3126, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "13922:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 3127, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "13938:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "expression": { - "argumentTypes": null, - "id": 3122, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "13893:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 3124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "burn", - "nodeType": "MemberAccess", - "referencedDeclaration": 1869, - "src": "13893:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256) external" - } - }, - "id": 3128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "13893:47:8", - "tryCall": false, + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3129, - "nodeType": "ExpressionStatement", - "src": "13893:47:8" - }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "id": 3133, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "13950:24:8", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3130, - "name": "accountSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "13950:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 3132, - "indexExpression": { - "argumentTypes": null, - "id": 3131, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "13964:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "13950:22:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3134, - "nodeType": "ExpressionStatement", - "src": "13950:24:8" + "visibility": "internal" }, { - "assignments": [ - 3136 - ], - "declarations": [ - { - "constant": false, - "id": 3136, - "mutability": "mutable", - "name": "voucherTokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3186, - "src": "14030:22:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3135, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "14030:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3143, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3137, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "14055:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "|", - "rightExpression": { - "argumentTypes": null, - "id": 3141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "14072:30:8", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3138, - "name": "typeCounters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2645, - "src": "14074:12:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 3140, - "indexExpression": { - "argumentTypes": null, - "id": 3139, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3092, - "src": "14087:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14074:28:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "14055:47:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "14030:72:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3155, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3144, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14142:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3146, - "indexExpression": { - "argumentTypes": null, - "id": 3145, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14157:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14142:30:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3147, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "14142:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3149, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14192:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3151, - "indexExpression": { - "argumentTypes": null, - "id": 3150, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14207:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14192:30:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3152, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "14192:37:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3153, - "name": "idxCommit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4292, - "src": "14231:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3148, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "14182:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } - }, - "id": 3154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14182:59:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "14142:99:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3156, - "nodeType": "ExpressionStatement", - "src": "14142:99:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3157, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14251:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3159, - "indexExpression": { - "argumentTypes": null, - "id": 3158, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14266:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14251:30:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3160, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "14251:48:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 3161, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14302:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14251:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3163, - "nodeType": "ExpressionStatement", - "src": "14251:56:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3169, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3164, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "14317:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3166, - "indexExpression": { - "argumentTypes": null, - "id": 3165, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14332:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "14317:30:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3167, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "14317:49:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 3168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "14369:5:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "14317:57:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3170, - "nodeType": "ExpressionStatement", - "src": "14317:57:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3174, - "name": "_to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3090, - "src": "14451:3:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3175, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14456:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3171, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "14431:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 3173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "mint", - "nodeType": "MemberAccess", - "referencedDeclaration": 1682, - "src": "14431:19:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3176, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "14431:40:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3177, - "nodeType": "ExpressionStatement", - "src": "14431:40:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3178, - "name": "voucherIssuers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2629, - "src": "14481:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - } - }, - "id": 3180, - "indexExpression": { - "argumentTypes": null, - "id": 3179, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14496:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "14481:30:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 3181, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3088, - "src": "14514:7:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "14481:40:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3183, - "nodeType": "ExpressionStatement", - "src": "14481:40:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3184, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3136, - "src": "14547:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "functionReturnParameters": 3096, - "id": 3185, - "nodeType": "Return", - "src": "14540:21:8" + "visibility": "internal" } - ] - }, - "documentation": { - "id": 3086, - "nodeType": "StructuredDocumentation", - "src": "12925:430:8", - "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + ], + "src": "6001:75:6" }, - "id": 3187, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "extract721", - "nodeType": "FunctionDefinition", - "overrides": null, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", "parameters": { - "id": 3093, + "id": 6340, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3088, + "id": 6337, + "indexed": false, "mutability": "mutable", - "name": "_issuer", + "name": "_newCancelFaultPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13380:15:8", + "scope": 6341, + "src": "6129:29:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 3087, - "name": "address", + "id": 6336, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13380:7:8", - "stateMutability": "nonpayable", + "src": "6129:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" }, { "constant": false, - "id": 3090, + "id": 6339, + "indexed": false, "mutability": "mutable", - "name": "_to", + "name": "_triggeredBy", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13397:11:8", + "scope": 6341, + "src": "6169:20:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -33049,28 +33128,41 @@ "typeString": "address" }, "typeName": { - "id": 3089, + "id": 6338, "name": "address", "nodeType": "ElementaryTypeName", - "src": "13397:7:8", + "src": "6169:7:6", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 3092, + "id": 6343, + "indexed": false, "mutability": "mutable", "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13410:22:8", + "scope": 6347, + "src": "6236:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -33078,562 +33170,232 @@ "typeString": "uint256" }, "typeName": { - "id": 3091, + "id": 6342, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "13410:7:8", + "src": "6236:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - } - ], - "src": "13379:54:8" - }, - "returnParameters": { - "id": 3096, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 3095, + "id": 6345, + "indexed": false, "mutability": "mutable", - "name": "", + "name": "_issuer", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3187, - "src": "13468:7:8", + "scope": 6347, + "src": "6260:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 3094, - "name": "uint256", + "id": 6344, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "13468:7:8", + "src": "6260:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "13467:9:8" + "src": "6235:41:6" }, - "scope": 4283, - "src": "13360:1208:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" + "src": "6205:72:6" }, { - "body": { - "id": 3218, - "nodeType": "Block", - "src": "14952:470:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3196, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "14962:8:8", - "subExpression": { - "argumentTypes": null, - "id": 3195, - "name": "typeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "14962:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3197, - "nodeType": "ExpressionStatement", - "src": "14962:8:8" - }, - { - "condition": { - "argumentTypes": null, - "id": 3198, - "name": "_isNonFungible", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3190, - "src": "14993:14:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3214, - "nodeType": "Block", - "src": "15148:125:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3212, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3208, - "name": "_tokenType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "15162:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3209, - "name": "typeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "15175:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "313238", - "id": 3210, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15185:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_128_by_1", - "typeString": "int_const 128" - }, - "value": "128" - }, - "src": "15175:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15162:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3213, - "nodeType": "ExpressionStatement", - "src": "15162:26:8" - } - ] - }, - "id": 3215, - "nodeType": "IfStatement", - "src": "14989:284:8", - "trueBody": { - "id": 3207, - "nodeType": "Block", - "src": "15009:133:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3199, - "name": "_tokenType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "15023:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3204, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3200, - "name": "TYPE_NF_BIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2669, - "src": "15036:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "|", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3201, - "name": "typeId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2671, - "src": "15050:6:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": { - "argumentTypes": null, - "hexValue": "313238", - "id": 3202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "15060:3:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_128_by_1", - "typeString": "int_const 128" - }, - "value": "128" - }, - "src": "15050:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15036:27:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "15023:40:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 3206, - "nodeType": "ExpressionStatement", - "src": "15023:40:8" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 3216, - "name": "_tokenType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "15405:10:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 3194, - "id": 3217, - "nodeType": "Return", - "src": "15398:17:8" - } - ] - }, - "documentation": { - "id": 3188, - "nodeType": "StructuredDocumentation", - "src": "14583:258:8", - "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" - }, - "id": 3219, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "generateTokenType", - "nodeType": "FunctionDefinition", - "overrides": null, + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", "parameters": { - "id": 3191, + "id": 6352, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3190, + "id": 6349, + "indexed": false, "mutability": "mutable", - "name": "_isNonFungible", + "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3219, - "src": "14873:19:8", + "scope": 6353, + "src": "6318:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 3189, - "name": "bool", + "id": 6348, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "14873:4:8", + "src": "6318:7:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" - } - ], - "src": "14872:21:8" - }, - "returnParameters": { - "id": 3194, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 3193, + "id": 6351, + "indexed": false, "mutability": "mutable", - "name": "_tokenType", + "name": "_type", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3219, - "src": "14928:18:8", + "scope": 6353, + "src": "6352:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 3192, - "name": "uint256", + "id": 6350, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "14928:7:8", + "src": "6352:5:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "src": "14927:20:8" + "src": "6307:93:6" }, - "scope": 4283, - "src": "14846:576:8", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" + "src": "6285:116:6" }, { "body": { - "id": 3279, + "id": 6374, "nodeType": "Block", - "src": "15657:1292:8", + "src": "6435:335:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3230, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "15930:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3232, - "indexExpression": { - "argumentTypes": null, - "id": 3231, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "15945:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, "isConstant": false, - "isLValue": true, - "isPure": false, + "isLValue": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "15930:31:8", + "nodeType": "Literal", + "src": "6484:1:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" } - }, - "id": 3233, + ], + "id": 6358, "isConstant": false, - "isLValue": true, - "isPure": false, + "isLValue": false, + "isPure": true, "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "15930:38:8", + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} } - ], - "id": 3229, - "name": "isStateCommitted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "15913:16:8", + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 3234, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "15913:56:8", - "tryCall": false, + "src": "6454:32:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "414c52454144595f50524f434553534544", - "id": 3235, + "hexValue": "554e5350454349464945445f4252", + "id": 6362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "15971:19:8", - "subdenomination": null, + "src": "6488:16:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", - "typeString": "literal_string \"ALREADY_PROCESSED\"" + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" }, - "value": "ALREADY_PROCESSED" + "value": "UNSPECIFIED_BR" } ], "expression": { @@ -33643,11 +33405,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", - "typeString": "literal_string \"ALREADY_PROCESSED\"" + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" } ], - "id": 3228, + "id": 6355, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -33655,13 +33417,13 @@ -18 ], "referencedDeclaration": -18, - "src": "15905:7:8", + "src": "6446:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3236, + "id": 6363, "isConstant": false, "isLValue": false, "isPure": false, @@ -33669,54 +33431,119 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "15905:86:8", + "src": "6446:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3237, + "id": 6364, "nodeType": "ExpressionStatement", - "src": "15905:86:8" + "src": "6446:59:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3239, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16143:15:8", + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" } ], - "id": 3238, - "name": "isInValidityPeriod", + "id": 6365, + "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4282, - "src": "16124:18:8", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 3240, + "id": 6371, "isConstant": false, "isLValue": false, "isPure": false, @@ -33724,528 +33551,299 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "16124:35:8", + "src": "6606:60:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 3241, + "id": 6372, "nodeType": "ExpressionStatement", - "src": "16124:35:8" + "src": "6606:60:6" }, { - "assignments": [ - 3243 - ], - "declarations": [ - { - "constant": false, - "id": 3243, - "mutability": "mutable", - "name": "tPromise", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3279, - "src": "16169:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise" - }, - "typeName": { - "contractScope": null, - "id": 3242, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "16169:7:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3249, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3244, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "16195:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 3248, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3246, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16230:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3245, - "name": "getPromiseIdFromVoucherId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "16204:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 3247, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16204:42:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16195:52:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "16169:78:8" - }, + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ { "expression": { - "argumentTypes": null, - "id": 3256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3250, - "name": "vouchersStatus", + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "16671:14:8", + "referencedDeclaration": 6200, + "src": "6824:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3252, - "indexExpression": { - "argumentTypes": null, - "id": 3251, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16686:15:8", + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16671:31:8", + "src": "6824:28:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 3253, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "16671:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3254, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "16725:5:8", + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" } - }, - "id": 3255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16725:15:8", + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "src": "16671:69:8", + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 3257, + "id": 6386, "nodeType": "ExpressionStatement", - "src": "16671:69:8" + "src": "6816:55:6" }, { "expression": { - "argumentTypes": null, - "id": 3269, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3258, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "16750:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3260, - "indexExpression": { - "argumentTypes": null, - "id": 3259, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16765:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" }, + "id": 6391, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16750:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3261, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "16750:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, + "leftExpression": { "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3263, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "16801:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3265, - "indexExpression": { - "argumentTypes": null, - "id": 3264, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16816:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "16801:31:8", + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 3266, + "id": 6389, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "status", + "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "16801:38:8", + "src": "6980:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - { - "argumentTypes": null, - "id": 3267, - "name": "idxRedeem", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "16841:9:8", + "referencedDeclaration": 6200, + "src": "6994:14:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 3262, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "16791:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } - }, - "id": 3268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "16791:60:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "16750:101:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3270, - "nodeType": "ExpressionStatement", - "src": "16750:101:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3272, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "16894:15:8", + }, + "src": "6980:28:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3273, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "16911:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3274, + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "string", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "16911:10:8", + "nodeType": "Literal", + "src": "7010:16:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3275, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3243, - "src": "16923:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" }, - "id": 3276, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "promiseId", - "nodeType": "MemberAccess", - "referencedDeclaration": 2585, - "src": "16923:18:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } + "value": "UNAUTHORIZED_C" } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_bool", + "typeString": "bool" }, { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" } ], - "id": 3271, - "name": "LogVoucherRedeemed", + "id": 6387, + "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2697, - "src": "16875:18:8", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (uint256,address,bytes32)" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 3277, + "id": 6393, "isConstant": false, "isLValue": false, "isPure": false, @@ -34253,234 +33851,190 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "16875:67:8", + "src": "6972:55:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3278, - "nodeType": "EmitStatement", - "src": "16870:72:8" - } - ] - }, - "documentation": { - "id": 3220, - "nodeType": "StructuredDocumentation", - "src": "15437:111:8", - "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher" - }, - "functionSelector": "db006a75", - "id": 3280, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 3225, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3222, - "src": "15636:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 3226, - "modifierName": { - "argumentTypes": null, - "id": 3224, - "name": "onlyVoucherOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "15619:16:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_uint256_$", - "typeString": "modifier (uint256)" - } + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" }, - "nodeType": "ModifierInvocation", - "src": "15619:33:8" - } - ], - "name": "redeem", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3223, - "nodeType": "ParameterList", - "parameters": [ { - "constant": false, - "id": 3222, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3280, - "src": "15569:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3221, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "15569:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" } - ], - "src": "15568:25:8" + ] }, - "returnParameters": { - "id": 3227, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, "nodeType": "ParameterList", "parameters": [], - "src": "15657:0:8" + "src": "6802:2:6" }, - "scope": 4283, - "src": "15553:1396:8", - "stateMutability": "nonpayable", + "src": "6778:353:6", "virtual": false, - "visibility": "external" + "visibility": "internal" }, { "body": { - "id": 3328, + "id": 6416, "nodeType": "Block", - "src": "17252:647:8", + "src": "7207:269:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3291, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17287:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } - }, - "id": 3293, - "indexExpression": { - "argumentTypes": null, - "id": 3292, - "name": "_tokenIdVoucher", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17302:15:8", + "referencedDeclaration": 9231, + "src": "7271:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" } }, + "id": 6406, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17287:31:8", + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" } }, - "id": 3294, + "id": 6407, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "status", + "memberName": "ownerOf", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "17287:38:8", + "referencedDeclaration": 9164, + "src": "7271:31:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3290, - "name": "isStateCommitted", + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "17270:16:8", + "referencedDeclaration": 6401, + "src": "7323:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3295, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17270:56:8", - "tryCall": false, + "src": "7271:59:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "494e4150504c494341424c455f535441545553", - "id": 3296, + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "17328:21:8", - "subdenomination": null, + "src": "7345:16:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", - "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" }, - "value": "INAPPLICABLE_STATUS" + "value": "UNAUTHORIZED_V" } ], "expression": { @@ -34490,11 +34044,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", - "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" } ], - "id": 3289, + "id": 6403, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -34502,13 +34056,13 @@ -18 ], "referencedDeclaration": -18, - "src": "17262:7:8", + "src": "7249:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3297, + "id": 6413, "isConstant": false, "isLValue": false, "isPure": false, @@ -34516,131 +34070,154 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17262:88:8", + "src": "7249:123:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3298, + "id": 6414, "nodeType": "ExpressionStatement", - "src": "17262:88:8" + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3300, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17519:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3299, - "name": "isInValidityPeriod", + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4282, - "src": "17500:18:8", + "referencedDeclaration": 6419, + "src": "7549:15:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", - "typeString": "function (uint256) view returns (bool)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3301, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17500:35:8", - "tryCall": false, + "src": "7532:32:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3302, + "id": 6425, "nodeType": "ExpressionStatement", - "src": "17500:35:8" + "src": "7532:32:6" }, { "expression": { - "argumentTypes": null, - "id": 3309, + "id": 6430, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3303, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17653:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3305, - "indexExpression": { - "argumentTypes": null, - "id": 3304, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17668:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17653:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3306, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "17653:51:8", + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -34649,267 +34226,228 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3307, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "17707:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" }, - "id": 3308, + "id": 6429, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "17707:15:8", + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" } }, - "src": "17653:69:8", + "src": "7577:27:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 3310, + "id": 6431, "nodeType": "ExpressionStatement", - "src": "17653:69:8" + "src": "7577:27:6" }, { "expression": { - "argumentTypes": null, - "id": 3322, + "id": 6436, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3311, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17732:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3313, - "indexExpression": { - "argumentTypes": null, - "id": 3312, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17747:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17732:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3314, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "17732:38:8", + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3316, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "17783:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3318, - "indexExpression": { - "argumentTypes": null, - "id": 3317, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17798:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "17783:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3319, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "17783:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3320, - "name": "idxRefund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "17823:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3315, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "17773:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" }, - "id": 3321, + "id": 6435, "isConstant": false, "isLValue": false, - "isPure": false, - "kind": "functionCall", + "isPure": true, "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "17773:60:8", - "tryCall": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" } }, - "src": "17732:101:8", + "src": "7615:30:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3323, + "id": 6437, "nodeType": "ExpressionStatement", - "src": "17732:101:8" - }, + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3325, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17876:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3324, - "name": "LogVoucherRefunded", + "argumentTypes": [], + "id": 6446, + "name": "_pause", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2701, - "src": "17857:18:8", + "referencedDeclaration": 13676, + "src": "7896:6:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" } }, - "id": 3326, + "id": 6447, "isConstant": false, "isLValue": false, "isPure": false, @@ -34917,267 +34455,244 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "17857:35:8", + "src": "7896:8:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3327, - "nodeType": "EmitStatement", - "src": "17852:40:8" + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" } ] }, "documentation": { - "id": 3281, + "id": 6440, "nodeType": "StructuredDocumentation", - "src": "17047:96:8", - "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher" + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." }, - "functionSelector": "278ecde1", - "id": 3329, + "functionSelector": "8456cb59", + "id": 6450, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": [ - { - "argumentTypes": null, - "id": 3286, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3283, - "src": "17231:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 3287, + "id": 6444, "modifierName": { - "argumentTypes": null, - "id": 3285, - "name": "onlyVoucherOwner", + "id": 6443, + "name": "onlyFromRouter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "17214:16:8", + "referencedDeclaration": 6375, + "src": "7870:14:6", "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_uint256_$", - "typeString": "modifier (uint256)" + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "17214:33:8" + "src": "7870:14:6" } ], - "name": "refund", + "name": "pause", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, "parameters": { - "id": 3284, + "id": 6441, "nodeType": "ParameterList", - "parameters": [ + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ { - "constant": false, - "id": 3283, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3329, - "src": "17164:23:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3282, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "17164:7:8", + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "value": null, - "visibility": "internal" + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" } - ], - "src": "17163:25:8" + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" }, "returnParameters": { - "id": 3288, + "id": 6456, "nodeType": "ParameterList", "parameters": [], - "src": "17252:0:8" + "src": "8126:0:6" }, - "scope": 4283, - "src": "17148:751:8", + "scope": 8454, + "src": "8074:81:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9310 + ], "body": { - "id": 3561, + "id": 6582, "nodeType": "Block", - "src": "18132:3206:8", + "src": "8894:1460:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3346, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "18150:62:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3340, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18160:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3342, - "indexExpression": { - "argumentTypes": null, - "id": 3341, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18175:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18160:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3343, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18160:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3344, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "18200:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3339, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "18151:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3345, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18151:61:8", - "tryCall": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "414c52454144595f434f4d504c41494e4544", - "id": 3347, + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "18214:20:8", - "subdenomination": null, + "src": "8937:23:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", - "typeString": "literal_string \"ALREADY_COMPLAINED\"" + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" }, - "value": "ALREADY_COMPLAINED" + "value": "INVALID_VALIDITY_FROM" } ], "expression": { @@ -35187,11 +34702,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", - "typeString": "literal_string \"ALREADY_COMPLAINED\"" + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" } ], - "id": 3338, + "id": 6484, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -35199,13 +34714,13 @@ -18 ], "referencedDeclaration": -18, - "src": "18142:7:8", + "src": "8905:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3348, + "id": 6489, "isConstant": false, "isLValue": false, "isPure": false, @@ -35213,164 +34728,126 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18142:93:8", + "src": "8905:56:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3349, + "id": 6490, "nodeType": "ExpressionStatement", - "src": "18142:93:8" + "src": "8905:56:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3358, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "18335:59:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3352, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18345:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3354, - "indexExpression": { - "argumentTypes": null, - "id": 3353, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18360:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18345:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3355, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18345:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3356, - "name": "idxFinal", + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "18385:8:8", + "referencedDeclaration": -4, + "src": "9130:5:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_magic_block", + "typeString": "block" } - ], - "id": 3351, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "18336:8:8", + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18336:58:8", - "tryCall": false, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, + "src": "9118:39:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "414c52454144595f46494e414c495a4544", - "id": 3359, + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "18396:19:8", - "subdenomination": null, + "src": "9159:21:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", - "typeString": "literal_string \"ALREADY_FINALIZED\"" + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" }, - "value": "ALREADY_FINALIZED" + "value": "INVALID_VALIDITY_TO" } ], "expression": { @@ -35380,11 +34857,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", - "typeString": "literal_string \"ALREADY_FINALIZED\"" + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" } ], - "id": 3350, + "id": 6491, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -35392,13 +34869,13 @@ -18 ], "referencedDeclaration": -18, - "src": "18327:7:8", + "src": "9110:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3360, + "id": 6499, "isConstant": false, "isLValue": false, "isPure": false, @@ -35406,106 +34883,246 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18327:89:8", + "src": "9110:71:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3361, + "id": 6500, "nodeType": "ExpressionStatement", - "src": "18327:89:8" + "src": "9110:71:6" }, { "assignments": [ - 3363 + 6502 ], "declarations": [ { "constant": false, - "id": 3363, + "id": 6502, "mutability": "mutable", - "name": "tPromise", + "name": "key", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3561, - "src": "18565:23:8", + "scope": 6582, + "src": "9372:11:6", "stateVariable": false, - "storageLocation": "memory", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "contractScope": null, - "id": 3362, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "18565:7:8", + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "id": 3369, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3364, - "name": "promises", + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "18591:8:8", + "referencedDeclaration": 6502, + "src": "9394:3:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 3368, - "indexExpression": { - "argumentTypes": null, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "arguments": [ { - "argumentTypes": null, - "id": 3366, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18626:15:8", + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" } ], - "id": 3365, - "name": "getPromiseIdFromVoucherId", + "id": 6505, + "name": "keccak256", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "18600:25:8", + "referencedDeclaration": -8, + "src": "9400:9:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" } }, - "id": 3367, + "id": 6516, "isConstant": false, "isLValue": false, "isPure": false, @@ -35513,2579 +35130,15903 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "18600:42:8", + "src": "9400:106:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18591:52:8", + "src": "9394:112:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "nodeType": "VariableDeclarationStatement", - "src": "18565:78:8" + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" }, { "condition": { - "argumentTypes": null, "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 3382, + "id": 6522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3371, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18725:14:8", + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 3373, - "indexExpression": { - "argumentTypes": null, - "id": 3372, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18740:15:8", + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18725:31:8", + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 3374, + "id": 6533, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18725:38:8", + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3370, - "name": "isStateRedemptionSigned", + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "18701:23:8", + "referencedDeclaration": 6502, + "src": "9716:3:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 3375, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18701:63:8", - "tryCall": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "arguments": [ { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3377, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18804:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3379, - "indexExpression": { - "argumentTypes": null, - "id": 3378, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18819:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18804:31:8", + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3380, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "status", + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18804:38:8", + "src": "10020:18:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 3376, - "name": "isStateRefunded", + "id": 6540, + "name": "Promise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4372, - "src": "18788:15:8", + "referencedDeclaration": 6189, + "src": "9723:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" } }, - "id": 3381, + "id": 6553, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", + "kind": "structConstructorCall", "lValueRequested": false, - "names": [], + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], "nodeType": "FunctionCall", - "src": "18788:55:8", + "src": "9723:327:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" } }, - "src": "18701:142:8", + "src": "9707:343:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "falseBody": { - "condition": { - "argumentTypes": null, - "arguments": [ + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3449, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19774:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3451, - "indexExpression": { - "argumentTypes": null, - "id": 3450, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19789:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19774:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3452, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19774:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } ], "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3448, - "name": "isStateExpired", + "id": 6556, + "name": "promiseKeys", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4390, - "src": "19759:14:8", + "referencedDeclaration": 6215, + "src": "10063:11:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" } }, - "id": 3453, + "id": 6558, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19759:54:8", - "tryCall": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" } }, - "falseBody": { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3516, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20670:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3518, - "indexExpression": { - "argumentTypes": null, - "id": 3517, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20685:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20670:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3519, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20670:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3520, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "20710:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3515, - "name": "isStatus", + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "20661:8:8", + "referencedDeclaration": 6464, + "src": "10164:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3521, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20661:64:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "falseBody": { - "id": 3557, - "nodeType": "Block", - "src": "21170:153:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "494e4150504c494341424c455f535441545553", - "id": 3554, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "21191:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", - "typeString": "literal_string \"INAPPLICABLE_STATUS\"" - }, - "value": "INAPPLICABLE_STATUS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", - "typeString": "literal_string \"INAPPLICABLE_STATUS\"" - } - ], - "id": 3553, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "21184:6:8", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 3555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21184:29:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3556, - "nodeType": "ExpressionStatement", - "src": "21184:29:8" - } - ] + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "id": 3558, - "nodeType": "IfStatement", - "src": "20657:666:8", - "trueBody": { - "id": 3552, - "nodeType": "Block", - "src": "20727:437:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3531, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3523, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "20749:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3524, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20749:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3530, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3525, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20768:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3527, - "indexExpression": { - "argumentTypes": null, - "id": 3526, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20783:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20768:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3528, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "20768:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3529, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "20822:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20768:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20749:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3532, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20838:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - }, - "value": "COMPLAINPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - } - ], - "id": 3522, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "20741:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20741:122:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3534, - "nodeType": "ExpressionStatement", - "src": "20741:122:8" - }, - { - "expression": { - "argumentTypes": null, - "id": 3546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3535, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20970:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3537, - "indexExpression": { - "argumentTypes": null, - "id": 3536, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20985:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20970:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3538, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20970:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3540, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "21021:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3542, - "indexExpression": { - "argumentTypes": null, - "id": 3541, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "21036:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "21021:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3543, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "21021:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3544, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "21061:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3539, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "21011:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } - }, - "id": 3545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21011:62:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "20970:103:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3547, - "nodeType": "ExpressionStatement", - "src": "20970:103:8" + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3549, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "21124:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3548, - "name": "LogVoucherComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2705, - "src": "21105:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3550, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21105:35:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3551, - "nodeType": "EmitStatement", - "src": "21100:40:8" + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ] + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" } }, - "id": 3559, - "nodeType": "IfStatement", - "src": "19755:1568:8", - "trueBody": { - "id": 3514, - "nodeType": "Block", - "src": "19815:836:8", - "statements": [ + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ { - "condition": { - "argumentTypes": null, - "id": 3461, + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "19833:65:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3455, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19843:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3457, - "indexExpression": { - "argumentTypes": null, - "id": 3456, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19858:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19843:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3458, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19843:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3459, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "19883:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3454, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "19834:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3460, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19834:64:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, + "nodeType": "Literal", + "src": "11142:1:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "falseBody": { - "id": 3487, - "nodeType": "Block", - "src": "20124:198:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3477, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "20150:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20150:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3479, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3363, - "src": "20169:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 3480, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "20169:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3481, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "20188:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20169:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20150:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20204:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - }, - "value": "COMPLAINPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - } - ], - "id": 3476, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "20142:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20142:87:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3486, - "nodeType": "ExpressionStatement", - "src": "20142:87:8" - } - ] + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, - "id": 3488, - "nodeType": "IfStatement", - "src": "19829:493:8", - "trueBody": { - "id": 3475, - "nodeType": "Block", - "src": "19900:218:8", - "statements": [ + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3471, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3463, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "19926:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3464, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19926:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3468, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3465, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3363, - "src": "19945:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 3466, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "19945:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3467, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "19964:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19945:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3469, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "19981:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19945:53:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19926:72:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3472, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "20000:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - }, - "value": "COMPLAINPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - } - ], - "id": 3462, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "19918:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3473, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19918:107:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3474, - "nodeType": "ExpressionStatement", - "src": "19918:107:8" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" } - ] + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - { - "expression": { - "argumentTypes": null, - "id": 3495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3489, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20348:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3491, - "indexExpression": { - "argumentTypes": null, - "id": 3490, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20363:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20348:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3492, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "cancelFaultPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "20348:54:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3493, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "20405:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "20405:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "20348:72:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - "id": 3496, - "nodeType": "ExpressionStatement", - "src": "20348:72:8" + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ { - "expression": { - "argumentTypes": null, - "id": 3508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3497, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20434:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3499, - "indexExpression": { - "argumentTypes": null, - "id": 3498, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20449:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20434:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3500, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20434:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3502, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "20485:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3504, - "indexExpression": { - "argumentTypes": null, - "id": 3503, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20500:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "20485:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3505, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "20485:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3506, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "20525:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3501, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "20475:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } - }, - "id": 3507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20475:62:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "20434:103:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3509, - "nodeType": "ExpressionStatement", - "src": "20434:103:8" + "typeIdentifier": "t_bool", + "typeString": "bool" }, { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3511, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "20588:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3510, - "name": "LogVoucherComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2705, - "src": "20569:18:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 3512, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "20569:35:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3513, - "nodeType": "EmitStatement", - "src": "20564:40:8" + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" } - ] + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 3560, - "nodeType": "IfStatement", - "src": "18697:2626:8", - "trueBody": { - "id": 3447, - "nodeType": "Block", - "src": "18845:904:8", - "statements": [ + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ { - "condition": { - "argumentTypes": null, - "id": 3390, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "18863:65:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3384, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18873:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3386, - "indexExpression": { - "argumentTypes": null, - "id": 3385, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18888:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18873:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3387, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "18873:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3388, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "18913:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3383, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "18864:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18864:64:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, + "nodeType": "Literal", + "src": "31370:1:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "falseBody": { - "id": 3420, - "nodeType": "Block", - "src": "19189:233:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3408, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "19215:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3409, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19215:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3410, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19234:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3412, - "indexExpression": { - "argumentTypes": null, - "id": 3411, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19249:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19234:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3413, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "19234:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3414, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "19288:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19234:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "19215:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3417, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19304:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - }, - "value": "COMPLAINPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - } - ], - "id": 3407, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "19207:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "19207:122:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3419, - "nodeType": "ExpressionStatement", - "src": "19207:122:8" - } - ] + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" }, - "id": 3421, - "nodeType": "IfStatement", - "src": "18859:563:8", - "trueBody": { - "id": 3406, - "nodeType": "Block", - "src": "18930:253:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3392, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "18956:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3393, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "18956:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3399, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3394, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "18975:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3396, - "indexExpression": { - "argumentTypes": null, - "id": 3395, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18990:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "18975:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3397, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "18975:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3398, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "19029:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18975:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3400, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "19046:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18975:88:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "18956:107:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434f4d504c41494e504552494f445f45585049524544", - "id": 3403, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "19065:24:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - }, - "value": "COMPLAINPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", - "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" - } - ], - "id": 3391, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "18948:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "18948:142:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3405, - "nodeType": "ExpressionStatement", - "src": "18948:142:8" - } - ] + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, { - "expression": { - "argumentTypes": null, - "id": 3428, + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3422, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19448:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3424, - "indexExpression": { - "argumentTypes": null, - "id": 3423, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19463:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "19448:31:8", + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3425, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "cancelFaultPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "19448:54:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3426, - "name": "block", + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "19505:5:8", + "referencedDeclaration": 7654, + "src": "32175:15:6", "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3427, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "19505:15:8", + "nodeType": "IndexAccess", + "src": "32160:31:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "src": "19448:72:8", + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } - }, - "id": 3429, - "nodeType": "ExpressionStatement", - "src": "19448:72:8" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ { "expression": { - "argumentTypes": null, - "id": 3441, + "id": 7696, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3430, + "id": 7685, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19534:14:8", + "referencedDeclaration": 6223, + "src": "32226:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3432, + "id": 7687, "indexExpression": { - "argumentTypes": null, - "id": 3431, + "id": 7686, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19549:15:8", + "referencedDeclaration": 7654, + "src": "32241:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -38096,21 +51037,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19534:31:8", + "src": "32226:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3433, + "id": 7688, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19534:38:8", + "referencedDeclaration": 6019, + "src": "32226:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -38119,34 +51060,29 @@ "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3435, + "id": 7690, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "19585:14:8", + "referencedDeclaration": 6223, + "src": "32301:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3437, + "id": 7692, "indexExpression": { - "argumentTypes": null, - "id": 3436, + "id": 7691, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19600:15:8", + "referencedDeclaration": 7654, + "src": "32316:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -38157,34 +51093,33 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "19585:31:8", + "src": "32301:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3438, + "id": 7693, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "19585:38:8", + "referencedDeclaration": 6019, + "src": "32301:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3439, - "name": "idxComplain", + "id": 7694, + "name": "IDX_EXPIRE", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "19625:11:8", + "referencedDeclaration": 5965, + "src": "32358:10:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -38202,18 +51137,18 @@ "typeString": "uint8" } ], - "id": 3434, - "name": "setChange", + "id": 7689, + "name": "determineStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "19575:9:8", + "referencedDeclaration": 6139, + "src": "32267:15:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", "typeString": "function (uint8,uint8) pure returns (uint8)" } }, - "id": 3440, + "id": 7695, "isConstant": false, "isLValue": false, "isPure": false, @@ -38221,39 +51156,63 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19575:62:8", + "src": "32267:116:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "src": "19534:103:8", + "src": "32226:157:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "id": 3442, + "id": 7697, "nodeType": "ExpressionStatement", - "src": "19534:103:8" + "src": "32226:157:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3444, + "id": 7699, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "19688:15:8", + "referencedDeclaration": 7654, + "src": "32428:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } } ], "expression": { @@ -38261,20 +51220,24 @@ { "typeIdentifier": "t_uint256", "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } ], - "id": 3443, - "name": "LogVoucherComplain", + "id": 7698, + "name": "LogExpirationTriggered", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2705, - "src": "19669:18:8", + "referencedDeclaration": 6311, + "src": "32405:22:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" } }, - "id": 3445, + "id": 7702, "isConstant": false, "isLValue": false, "isPure": false, @@ -38282,16 +51245,16 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "19669:35:8", + "src": "32405:51:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3446, + "id": 7703, "nodeType": "EmitStatement", - "src": "19664:40:8" + "src": "32400:56:6" } ] } @@ -38299,66 +51262,36 @@ ] }, "documentation": { - "id": 3330, + "id": 7652, "nodeType": "StructuredDocumentation", - "src": "17914:107:8", - "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher" + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" }, - "functionSelector": "284f0923", - "id": 3562, + "functionSelector": "d40ffcf8", + "id": 7707, "implemented": true, "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 3335, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3332, - "src": "18111:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 3336, - "modifierName": { - "argumentTypes": null, - "id": 3334, - "name": "onlyVoucherOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2796, - "src": "18094:16:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_uint256_$", - "typeString": "modifier (uint256)" - } - }, - "nodeType": "ModifierInvocation", - "src": "18094:33:8" - } - ], - "name": "complain", + "modifiers": [], + "name": "triggerExpiration", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, "parameters": { - "id": 3333, + "id": 7655, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3332, + "id": 7654, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3562, - "src": "18044:23:8", + "scope": 7707, + "src": "31766:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -38366,158 +51299,105 @@ "typeString": "uint256" }, "typeName": { - "id": 3331, + "id": 7653, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "18044:7:8", + "src": "31766:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "18043:25:8" + "src": "31765:25:6" }, "returnParameters": { - "id": 3337, + "id": 7657, "nodeType": "ParameterList", "parameters": [], - "src": "18132:0:8" + "src": "31809:0:6" }, - "scope": 4283, - "src": "18026:3312:8", + "scope": 8454, + "src": "31739:736:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9412 + ], "body": { - "id": 3743, + "id": 7860, "nodeType": "Block", - "src": "21592:2725:8", + "src": "32688:2186:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 3574, + "id": 7717, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3570, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "21627:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3569, - "name": "getVoucherIssuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4231, - "src": "21610:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view returns (address)" - } - }, - "id": 3571, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "21610:33:8", - "tryCall": false, + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "==", + "operator": "!=", "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3572, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "21647:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3573, + "hexValue": "30", + "id": 7716, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "21647:10:8", + "nodeType": "Literal", + "src": "32726:1:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "21610:47:8", + "src": "32707:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f434f46", - "id": 3575, + "hexValue": "554e5350454349464945445f4944", + "id": 7718, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "21658:18:8", - "subdenomination": null, + "src": "32729:16:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", - "typeString": "literal_string \"UNAUTHORIZED_COF\"" + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" }, - "value": "UNAUTHORIZED_COF" + "value": "UNSPECIFIED_ID" } ], "expression": { @@ -38527,11 +51407,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", - "typeString": "literal_string \"UNAUTHORIZED_COF\"" + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 3568, + "id": 7714, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -38539,13 +51419,13 @@ -18 ], "referencedDeclaration": -18, - "src": "21602:7:8", + "src": "32699:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3576, + "id": 7719, "isConstant": false, "isLValue": false, "isPure": false, @@ -38553,31 +51433,30 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21602:75:8", + "src": "32699:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3577, + "id": 7720, "nodeType": "ExpressionStatement", - "src": "21602:75:8" + "src": "32699:47:6" }, { "assignments": [ - 3579 + 7722 ], "declarations": [ { "constant": false, - "id": 3579, + "id": 7722, "mutability": "mutable", "name": "tStatus", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3743, - "src": "21782:13:8", + "scope": 7860, + "src": "32849:13:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -38585,46 +51464,41 @@ "typeString": "uint8" }, "typeName": { - "id": 3578, + "id": 7721, "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "21782:5:8", + "src": "32849:5:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "id": 3584, + "id": 7727, "initialValue": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3580, + "id": 7723, "name": "vouchersStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "21798:14:8", + "referencedDeclaration": 6223, + "src": "32865:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - "id": 3582, + "id": 7725, "indexExpression": { - "argumentTypes": null, - "id": 3581, + "id": 7724, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "21813:15:8", + "referencedDeclaration": 7710, + "src": "32880:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -38635,36 +51509,34 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "21798:31:8", + "src": "32865:31:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3583, + "id": 7726, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "status", "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "21798:38:8", + "referencedDeclaration": 6019, + "src": "32865:38:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "VariableDeclarationStatement", - "src": "21782:54:8" + "src": "32849:54:6" }, { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3590, + "id": 7733, "isConstant": false, "isLValue": false, "isPure": false, @@ -38672,31 +51544,28 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "21863:34:8", + "src": "32924:29:6", "subExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3587, + "id": 7730, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "21873:7:8", + "referencedDeclaration": 7722, + "src": "32934:7:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, { - "argumentTypes": null, - "id": 3588, - "name": "idxCancelFault", + "id": 7731, + "name": "IDX_FINAL", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "21882:14:8", + "referencedDeclaration": 5974, + "src": "32943:9:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -38714,18 +51583,18 @@ "typeString": "uint8" } ], - "id": 3586, + "id": 7729, "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "21864:8:8", + "referencedDeclaration": 6121, + "src": "32925:8:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3589, + "id": 7732, "isConstant": false, "isLValue": false, "isPure": false, @@ -38733,7 +51602,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21864:33:8", + "src": "32925:28:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -38746,22 +51615,20 @@ } }, { - "argumentTypes": null, - "hexValue": "414c52454144595f43414e43454c4641554c54", - "id": 3591, + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "21899:21:8", - "subdenomination": null, + "src": "32955:19:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", - "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" }, - "value": "ALREADY_CANCELFAULT" + "value": "ALREADY_FINALIZED" } ], "expression": { @@ -38771,11 +51638,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", - "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" } ], - "id": 3585, + "id": 7728, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -38783,13 +51650,13 @@ -18 ], "referencedDeclaration": -18, - "src": "21855:7:8", + "src": "32916:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3592, + "id": 7735, "isConstant": false, "isLValue": false, "isPure": false, @@ -38797,231 +51664,110 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "21855:66:8", + "src": "32916:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3593, + "id": 7736, "nodeType": "ExpressionStatement", - "src": "21855:66:8" + "src": "32916:59:6" }, { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "22021:28:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3596, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22031:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3597, - "name": "idxFinal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "22040:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3595, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22022:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22022:27:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - { - "argumentTypes": null, - "hexValue": "414c52454144595f46494e414c495a4544", - "id": 3600, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22051:19:8", - "subdenomination": null, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", - "typeString": "literal_string \"ALREADY_FINALIZED\"" - }, - "value": "ALREADY_FINALIZED" - } - ], - "expression": { - "argumentTypes": [ - { "typeIdentifier": "t_bool", "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", - "typeString": "literal_string \"ALREADY_FINALIZED\"" } - ], - "id": 3594, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "22013:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3601, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22013:58:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + }, + "visibility": "internal" } - }, - "id": 3602, - "nodeType": "ExpressionStatement", - "src": "22013:58:8" + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" }, { "assignments": [ - 3604 + 7741 ], "declarations": [ { "constant": false, - "id": 3604, + "id": 7741, "mutability": "mutable", "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3743, - "src": "22172:23:8", + "scope": 7860, + "src": "33090:23:6", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "contractScope": null, - "id": 3603, + "id": 7740, "name": "Promise", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "22172:7:8", + "referencedDeclaration": 6189, + "src": "33090:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", "typeString": "struct VoucherKernel.Promise" } }, - "value": null, "visibility": "internal" } ], - "id": 3610, + "id": 7747, "initialValue": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3605, + "id": 7742, "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "22198:8:8", + "referencedDeclaration": 6204, + "src": "33129:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 3609, + "id": 7746, "indexExpression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3607, + "id": 7744, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22233:15:8", + "referencedDeclaration": 7710, + "src": "33164:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -39035,18 +51781,18 @@ "typeString": "uint256" } ], - "id": 3606, + "id": 7743, "name": "getPromiseIdFromVoucherId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "22207:25:8", + "referencedDeclaration": 8043, + "src": "33138:25:6", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", "typeString": "function (uint256) view returns (bytes32)" } }, - "id": 3608, + "id": 7745, "isConstant": false, "isLValue": false, "isPure": false, @@ -39054,7 +51800,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "22207:42:8", + "src": "33138:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bytes32", @@ -39066,164 +51812,75 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "22198:52:8", + "src": "33129:52:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", + "typeIdentifier": "t_struct$_Promise_$6189_storage", "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "22172:78:8" + "src": "33090:91:6" }, { "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3619, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3612, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22282:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3613, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "22291:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3611, - "name": "isStatus", + "arguments": [ + { + "id": 7749, + "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22273:8:8", + "referencedDeclaration": 7722, + "src": "33207:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "id": 3614, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22273:28:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ + ], + "expression": { + "argumentTypes": [ { - "argumentTypes": null, - "id": 3616, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22314:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, { - "argumentTypes": null, - "id": 3617, - "name": "idxRefund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "22323:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "typeIdentifier": "t_uint8", + "typeString": "uint8" } ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3615, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22305:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22305:28:8", - "tryCall": false, + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "src": "22273:60:8", + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -39231,84 +51888,36 @@ }, "falseBody": { "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3666, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "23100:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3667, - "name": "idxExpire", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4301, - "src": "23109:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3665, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "23091:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3668, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23091:28:8", - "tryCall": false, - "typeDescriptions": { + "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "arguments": [ { - "argumentTypes": null, - "id": 3705, + "id": 7779, "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "23724:7:8", + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" @@ -39317,23 +51926,27 @@ ], "expression": { "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, { "typeIdentifier": "t_uint8", "typeString": "uint8" } ], - "id": 3704, - "name": "isStateCommitted", + "id": 7778, + "name": "isStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "23707:16:8", + "referencedDeclaration": 6121, + "src": "33699:8:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" } }, - "id": 3706, + "id": 7781, "isConstant": false, "isLValue": false, "isPure": false, @@ -39341,1475 +51954,1048 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "23707:25:8", + "src": "33699:35:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "falseBody": { - "id": 3725, - "nodeType": "Block", - "src": "23997:153:8", - "statements": [ - { + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "494e4150504c494341424c455f535441545553", - "id": 3722, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24018:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", - "typeString": "literal_string \"INAPPLICABLE_STATUS\"" - }, - "value": "INAPPLICABLE_STATUS" + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", - "typeString": "literal_string \"INAPPLICABLE_STATUS\"" - } - ], - "id": 3721, - "name": "revert", + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "24011:6:8", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3723, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24011:29:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3724, - "nodeType": "ExpressionStatement", - "src": "24011:29:8" + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ] + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "id": 3726, - "nodeType": "IfStatement", - "src": "23703:447:8", - "trueBody": { - "id": 3720, - "nodeType": "Block", - "src": "23734:257:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 3716, + "id": 7828, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 3708, - "name": "block", + "id": 7825, + "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "23788:5:8", + "referencedDeclaration": 7741, + "src": "34534:8:6", "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 3709, + "id": 7826, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "timestamp", + "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23788:15:8", + "referencedDeclaration": 6180, + "src": "34534:16:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "<=", + "operator": "+", "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3715, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3713, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3710, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3604, - "src": "23807:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 3711, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "23807:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3712, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "23826:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23807:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3714, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "23843:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23807:53:8", + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23788:72:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "434f46504552494f445f45585049524544", - "id": 3717, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23862:19:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - }, - "value": "COFPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - } - ], - "id": 3707, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "23780:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3718, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23780:102:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3719, - "nodeType": "ExpressionStatement", - "src": "23780:102:8" - } - ] - } - }, - "id": 3727, - "nodeType": "IfStatement", - "src": "23087:1063:8", - "trueBody": { - "id": 3703, - "nodeType": "Block", - "src": "23121:576:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 3673, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "23164:31:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3670, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "23174:7:8", + "typeString": "uint256" + } + }, + "src": "34534:33:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - { - "argumentTypes": null, - "id": 3671, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "23183:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3669, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "23165:8:8", + "src": "34515:52:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 3672, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23165:30:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 3701, - "nodeType": "Block", - "src": "23428:246:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3697, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3689, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "23454:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23454:15:8", + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3696, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "bool", "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3691, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "23473:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3693, - "indexExpression": { - "argumentTypes": null, - "id": 3692, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "23488:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "23473:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3694, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelFaultPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "23473:54:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3695, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "23530:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23473:74:8", + "nodeType": "Literal", + "src": "34595:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" }, - "src": "23454:93:8", + "src": "34588:11:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - { - "argumentTypes": null, - "hexValue": "434f46504552494f445f45585049524544", - "id": 3698, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "23549:19:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - }, - "value": "COFPERIOD_EXPIRED" - } - ], + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } - ], - "id": 3688, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "23446:7:8", + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3699, + "id": 7809, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23446:123:8", - "tryCall": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3700, - "nodeType": "ExpressionStatement", - "src": "23446:123:8" + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ] - }, - "id": 3702, - "nodeType": "IfStatement", - "src": "23160:514:8", - "trueBody": { - "id": 3687, - "nodeType": "Block", - "src": "23197:225:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3683, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3675, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "23223:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "23223:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3682, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3677, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3604, - "src": "23242:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 3678, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "23242:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3679, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "23261:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23242:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3681, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "23278:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23242:53:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "23223:72:8", + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - { - "argumentTypes": null, - "hexValue": "434f46504552494f445f45585049524544", - "id": 3684, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "string", + "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "23297:19:8", - "subdenomination": null, + "src": "34352:4:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - }, - "value": "COFPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { "typeIdentifier": "t_bool", "typeString": "bool" }, - { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - } - ], - "id": 3674, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "23215:7:8", + "value": "true" + }, + "src": "34345:11:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 3685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "23215:102:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3686, - "nodeType": "ExpressionStatement", - "src": "23215:102:8" - } - ] + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" } ] } }, - "id": 3728, + "id": 7840, "nodeType": "IfStatement", - "src": "22269:1881:8", + "src": "33194:1432:6", "trueBody": { - "id": 3664, + "id": 7777, "nodeType": "Block", - "src": "22335:746:8", + "src": "33231:444:6", "statements": [ { "condition": { - "argumentTypes": null, - "id": 3624, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "22392:31:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3621, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "22402:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3622, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "22411:11:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3620, - "name": "isStatus", + "arguments": [ + { + "id": 7753, + "name": "tStatus", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "22393:8:8", + "referencedDeclaration": 7722, + "src": "33259:7:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "id": 3623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22393:30:8", - "tryCall": false, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" } }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 3662, - "nodeType": "Block", - "src": "22812:246:8", - "statements": [ - { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3650, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "22838:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22838:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3657, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3652, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "22857:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3654, - "indexExpression": { - "argumentTypes": null, - "id": 3653, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22872:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22857:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3655, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "cancelFaultPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4320, - "src": "22857:54:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3656, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "22914:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22857:74:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22838:93:8", + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" } }, - { - "argumentTypes": null, - "hexValue": "434f46504552494f445f45585049524544", - "id": 3659, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22933:19:8", - "subdenomination": null, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - }, - "value": "COFPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 3649, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "22830:7:8", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" } }, - "id": 3660, + "id": 7766, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22830:123:8", - "tryCall": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3661, - "nodeType": "ExpressionStatement", - "src": "22830:123:8" + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ] - }, - "id": 3663, - "nodeType": "IfStatement", - "src": "22388:670:8", - "trueBody": { - "id": 3648, - "nodeType": "Block", - "src": "22425:381:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3626, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "22451:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22451:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3633, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3628, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "22470:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3630, - "indexExpression": { - "argumentTypes": null, - "id": 3629, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22485:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22470:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3631, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "22470:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3632, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "22524:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22470:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3634, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "22541:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22470:88:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "22451:107:8", + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - { - "argumentTypes": null, - "hexValue": "434f46504552494f445f45585049524544", - "id": 3637, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "22560:19:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - }, - "value": "COFPERIOD_EXPIRED" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", - "typeString": "literal_string \"COFPERIOD_EXPIRED\"" - } - ], - "id": 3625, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "22443:7:8", + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 3638, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "22443:137:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3639, - "nodeType": "ExpressionStatement", - "src": "22443:137:8" - }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ { "expression": { - "argumentTypes": null, - "id": 3646, + "id": 7758, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3640, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "22688:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3642, - "indexExpression": { - "argumentTypes": null, - "id": 3641, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "22703:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "22688:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3643, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "22688:51:8", + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3644, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "22742:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3645, + "hexValue": "74727565", + "id": 7757, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "bool", "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "22742:15:8", + "nodeType": "Literal", + "src": "33363:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" }, - "src": "22688:69:8", + "src": "33356:11:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 3647, + "id": 7759, "nodeType": "ExpressionStatement", - "src": "22688:69:8" + "src": "33356:11:6" } ] } @@ -40818,232 +53004,280 @@ } }, { - "expression": { - "argumentTypes": null, - "id": 3737, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3729, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "24164:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3731, - "indexExpression": { - "argumentTypes": null, - "id": 3730, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "24179:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "24164:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3732, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "24164:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3734, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3579, - "src": "24215:7:8", + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, - { - "argumentTypes": null, - "id": 3735, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "24224:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3733, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "24205:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" }, - "id": 3736, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24205:34:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "24164:75:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3738, - "nodeType": "ExpressionStatement", - "src": "24164:75:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ { - "argumentTypes": null, - "id": 3740, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3565, - "src": "24285:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3739, - "name": "LogVoucherFaultCancel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2709, - "src": "24263:21:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" } - }, - "id": 3741, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24263:38:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3742, - "nodeType": "EmitStatement", - "src": "24258:43:8" + ] + } } ] }, "documentation": { - "id": 3563, + "id": 7708, "nodeType": "StructuredDocumentation", - "src": "21354:164:8", - "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" }, - "functionSelector": "765e0fb8", - "id": 3744, + "functionSelector": "65c303bc", + "id": 7861, "implemented": true, "kind": "function", "modifiers": [], - "name": "cancelOrFault", + "name": "triggerFinalizeVoucher", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, "parameters": { - "id": 3566, + "id": 7711, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3565, + "id": 7710, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3744, - "src": "21546:23:8", + "scope": 7861, + "src": "32645:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -41051,193 +53285,146 @@ "typeString": "uint256" }, "typeName": { - "id": 3564, + "id": 7709, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "21546:7:8", + "src": "32645:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "21545:25:8" + "src": "32644:25:6" }, "returnParameters": { - "id": 3567, + "id": 7713, "nodeType": "ParameterList", "parameters": [], - "src": "21592:0:8" + "src": "32688:0:6" }, - "scope": 4283, - "src": "21523:2794:8", + "scope": 8454, + "src": "32613:2261:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9420 + ], "body": { - "id": 3771, + "id": 7885, "nodeType": "Block", - "src": "24666:281:8", + "src": "35348:120:6", "statements": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3755, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3753, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3747, - "src": "24684:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3754, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24703:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "24684:20:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 3756, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24706:16:8", - "subdenomination": null, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - }, - "value": "UNSPECIFIED_ID" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "id": 3752, - "name": "require", + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "24676:7:8", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3757, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24676:47:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 3758, - "nodeType": "ExpressionStatement", - "src": "24676:47:8" + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" }, { "expression": { - "argumentTypes": null, - "id": 3764, + "id": 7883, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 3759, - "name": "vouchersStatus", + "id": 7878, + "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "24824:14:8", + "referencedDeclaration": 6204, + "src": "35420:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "id": 3761, + "id": 7880, "indexExpression": { - "argumentTypes": null, - "id": 3760, - "name": "_tokenIdVoucher", + "id": 7879, + "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3747, - "src": "24839:15:8", + "referencedDeclaration": 7873, + "src": "35429:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "isConstant": false, @@ -41245,182 +53432,101 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "24824:31:8", + "src": "35420:20:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 3762, + "id": 7881, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, - "memberName": "isPaymentReleased", + "memberName": "seller", "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "24824:49:8", + "referencedDeclaration": 6176, + "src": "35420:27:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3763, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24876:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "24824:56:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3765, - "nodeType": "ExpressionStatement", - "src": "24824:56:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3767, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3747, - "src": "24921:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 3768, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "24938:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 3766, - "name": "LogFundsReleased", + "id": 7882, + "name": "_newSeller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2745, - "src": "24904:16:8", + "referencedDeclaration": 7866, + "src": "35450:10:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", - "typeString": "function (uint256,uint8)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3769, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "24904:36:8", - "tryCall": false, + "src": "35420:40:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3770, - "nodeType": "EmitStatement", - "src": "24899:41:8" + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" } ] }, "documentation": { - "id": 3745, + "id": 7862, "nodeType": "StructuredDocumentation", - "src": "24432:131:8", - "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" }, - "functionSelector": "75549516", - "id": 3772, + "functionSelector": "88c25607", + "id": 7886, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 3750, + "id": 7870, "modifierName": { - "argumentTypes": null, - "id": 3749, + "id": 7869, "name": "onlyFromCashier", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "24646:15:8", + "referencedDeclaration": 6397, + "src": "35332:15:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "24646:15:8" + "src": "35332:15:6" } ], - "name": "setPaymentReleased", + "name": "setSupplyHolderOnTransfer", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, "parameters": { - "id": 3748, + "id": 7867, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3747, + "id": 7864, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3772, - "src": "24596:23:8", + "scope": 7886, + "src": "35255:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -41428,110 +53534,173 @@ "typeString": "uint256" }, "typeName": { - "id": 3746, + "id": 7863, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "24596:7:8", + "src": "35255:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, "visibility": "internal" } ], - "src": "24595:25:8" + "src": "35244:69:6" }, "returnParameters": { - "id": 3751, + "id": 7871, "nodeType": "ParameterList", "parameters": [], - "src": "24666:0:8" + "src": "35348:0:6" }, - "scope": 4283, - "src": "24568:379:8", + "scope": 8454, + "src": "35210:258:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": { - "id": 3799, + "id": 7914, "nodeType": "Block", - "src": "25195:282:8", + "src": "35725:295:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, - "id": 3783, + "id": 7900, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3781, - "name": "_tokenIdVoucher", + "id": 7895, + "name": "_bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3775, - "src": "25213:15:8", + "referencedDeclaration": 7889, + "src": "35744:19:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3782, + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "Literal", - "src": "25232:1:8", - "subdenomination": null, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, - "src": "25213:20:8", + "src": "35744:33:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 3784, + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "25235:16:8", - "subdenomination": null, + "src": "35779:21:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" }, - "value": "UNSPECIFIED_ID" + "value": "UNSPECIFIED_ADDRESS" } ], "expression": { @@ -41541,11 +53710,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" } ], - "id": 3780, + "id": 7894, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -41553,13 +53722,13 @@ -18 ], "referencedDeclaration": -18, - "src": "25205:7:8", + "src": "35736:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3785, + "id": 7902, "isConstant": false, "isLValue": false, "isPure": false, @@ -41567,170 +53736,125 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "25205:47:8", + "src": "35736:65:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3786, + "id": 7903, "nodeType": "ExpressionStatement", - "src": "25205:47:8" + "src": "35736:65:6" }, { "expression": { - "argumentTypes": null, - "id": 3792, + "id": 7906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3787, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "25353:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3789, - "indexExpression": { - "argumentTypes": null, - "id": 3788, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3775, - "src": "25368:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "25353:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3790, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "25353:50:8", + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3791, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "25406:4:8", - "subdenomination": null, + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "src": "25353:57:8", + "src": "35904:40:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 3793, + "id": 7907, "nodeType": "ExpressionStatement", - "src": "25353:57:8" + "src": "35904:40:6" }, { "eventCall": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3795, - "name": "_tokenIdVoucher", + "id": 7909, + "name": "_bosonRouterAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3775, - "src": "25451:15:8", + "referencedDeclaration": 7889, + "src": "35980:19:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, { - "argumentTypes": null, - "hexValue": "31", - "id": 3796, + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "25468:1:8", - "subdenomination": null, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } ], - "id": 3794, - "name": "LogFundsReleased", + "id": 7908, + "name": "LogBosonRouterSet", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2745, - "src": "25434:16:8", + "referencedDeclaration": 6323, + "src": "35962:17:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", - "typeString": "function (uint256,uint8)" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" } }, - "id": 3797, + "id": 7912, "isConstant": false, "isLValue": false, "isPure": false, @@ -41738,177 +53862,213 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "25434:36:8", + "src": "35962:50:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3798, + "id": 7913, "nodeType": "EmitStatement", - "src": "25429:41:8" + "src": "35957:55:6" } ] }, "documentation": { - "id": 3773, + "id": 7887, "nodeType": "StructuredDocumentation", - "src": "24958:133:8", - "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" }, - "functionSelector": "ebba1b29", - "id": 3800, + "functionSelector": "bd17de40", + "id": 7915, "implemented": true, "kind": "function", "modifiers": [ { - "arguments": null, - "id": 3778, + "id": 7892, "modifierName": { - "argumentTypes": null, - "id": 3777, - "name": "onlyFromCashier", + "id": 7891, + "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2779, - "src": "25175:15:8", + "referencedDeclaration": 12093, + "src": "35710:9:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "25175:15:8" + "src": "35710:9:6" } ], - "name": "setDepositsReleased", + "name": "setBosonRouterAddress", "nodeType": "FunctionDefinition", - "overrides": null, "parameters": { - "id": 3776, + "id": 7890, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3775, + "id": 7889, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_bosonRouterAddress", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3800, - "src": "25125:23:8", + "scope": 7915, + "src": "35654:27:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 3774, - "name": "uint256", + "id": 7888, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "25125:7:8", + "src": "35654:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "25124:25:8" + "src": "35653:29:6" }, "returnParameters": { - "id": 3779, + "id": 7893, "nodeType": "ParameterList", "parameters": [], - "src": "25195:0:8" + "src": "35725:0:6" }, - "scope": 4283, - "src": "25096:381:8", + "scope": 8454, + "src": "35623:397:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9432 + ], "body": { - "id": 3854, + "id": 7944, "nodeType": "Block", - "src": "25735:618:8", + "src": "36278:275:6", "statements": [ { "expression": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, - "id": 3809, + "id": 7930, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { - "argumentTypes": null, - "id": 3807, - "name": "_tokenIdVoucher", + "id": 7925, + "name": "_cashierAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "25753:15:8", + "referencedDeclaration": 7918, + "src": "36297:15:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3808, + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", + "kind": "typeConversion", "lValueRequested": false, - "nodeType": "Literal", - "src": "25772:1:8", - "subdenomination": null, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } }, - "src": "25753:20:8", + "src": "36297:29:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 3810, + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "25775:16:8", - "subdenomination": null, + "src": "36328:21:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" }, - "value": "UNSPECIFIED_ID" + "value": "UNSPECIFIED_ADDRESS" } ], "expression": { @@ -41918,25 +54078,151 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" } ], - "id": 3806, + "id": 7924, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], - "referencedDeclaration": -18, - "src": "25745:7:8", + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" } }, - "id": 3811, + "id": 7942, "isConstant": false, "isLValue": false, "isPure": false, @@ -41944,639 +54230,288 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "25745:47:8", + "src": "36503:42:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3812, - "nodeType": "ExpressionStatement", - "src": "25745:47:8" + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ { - "assignments": [ - 3814 - ], - "declarations": [ - { - "constant": false, - "id": 3814, - "mutability": "mutable", - "name": "tPromise", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3854, - "src": "25902:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise" - }, - "typeName": { - "contractScope": null, - "id": 3813, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "25902:7:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" - } - }, - "value": null, - "visibility": "internal" + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 3820, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3815, - "name": "promises", + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "25928:8:8", + "referencedDeclaration": 6255, + "src": "36938:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3819, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3817, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "25963:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3816, - "name": "getPromiseIdFromVoucherId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "25937:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 3818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "25937:42:8", - "tryCall": false, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "25928:52:8", + "src": "36938:32:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "nodeType": "VariableDeclarationStatement", - "src": "25902:78:8" + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" }, { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3821, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3814, - "src": "26003:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 3822, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "26003:16:8", + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, + { "expression": { - "argumentTypes": null, - "id": 3823, - "name": "block", + "id": 7960, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "26022:5:8", + "referencedDeclaration": -15, + "src": "37030:3:6", "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 3824, + "id": 7961, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "timestamp", + "memberName": "sender", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26022:15:8", + "src": "37030:10:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } - }, - "src": "26003:34:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "arguments": [ + ], + "expression": { + "argumentTypes": [ { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3827, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26070:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3829, - "indexExpression": { - "argumentTypes": null, - "id": 3828, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26085:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26070:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3830, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26070:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3826, - "name": "isStateCommitted", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4336, - "src": "26053:16:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 3831, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26053:56:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "26003:106:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3853, - "nodeType": "IfStatement", - "src": "25999:346:8", - "trueBody": { - "id": 3852, - "nodeType": "Block", - "src": "26124:221:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3833, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26142:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3835, - "indexExpression": { - "argumentTypes": null, - "id": 3834, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26157:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26142:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3836, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26142:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3838, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26193:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3840, - "indexExpression": { - "argumentTypes": null, - "id": 3839, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26208:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26193:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3841, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26193:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3842, - "name": "idxExpire", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4301, - "src": "26233:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3837, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "26183:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } - }, - "id": 3843, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26183:60:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "26142:101:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 3845, - "nodeType": "ExpressionStatement", - "src": "26142:101:8" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3847, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3803, - "src": "26306:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3848, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "26323:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 3849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "26323:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3846, - "name": "LogExpirationTriggered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2715, - "src": "26283:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (uint256,address)" - } - }, - "id": 3850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26283:51:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3851, - "nodeType": "EmitStatement", - "src": "26278:56:8" + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" } - ] - } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" } ] }, "documentation": { - "id": 3801, + "id": 7946, "nodeType": "StructuredDocumentation", - "src": "25496:112:8", - "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" }, - "functionSelector": "d40ffcf8", - "id": 3855, + "functionSelector": "8990834b", + "id": 7965, "implemented": true, "kind": "function", - "modifiers": [], - "name": "triggerExpiration", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, "parameters": { - "id": 3804, + "id": 7949, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3803, + "id": 7948, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_complainPeriod", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3855, - "src": "25689:23:8", + "scope": 7965, + "src": "36842:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -42584,138 +54519,149 @@ "typeString": "uint256" }, "typeName": { - "id": 3802, + "id": 7947, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "25689:7:8", + "src": "36842:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "25688:25:8" + "src": "36841:25:6" }, "returnParameters": { - "id": 3805, + "id": 7953, "nodeType": "ParameterList", "parameters": [], - "src": "25735:0:8" + "src": "36927:0:6" }, - "scope": 4283, - "src": "25662:691:8", + "scope": 8454, + "src": "36815:234:6", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9426 + ], "body": { - "id": 4007, + "id": 7984, "nodeType": "Block", - "src": "26616:2060:8", + "src": "37442:134:6", "statements": [ { "expression": { - "argumentTypes": null, + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { "arguments": [ { - "argumentTypes": null, - "commonType": { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "id": 3864, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 3862, - "name": "_tokenIdVoucher", + } + }, + { + "expression": { + "id": 7980, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "26634:15:8", + "referencedDeclaration": -15, + "src": "37557:3:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 3863, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "26653:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "26634:20:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 3865, + "id": 7981, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "string", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "26656:16:8", - "subdenomination": null, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - }, - "value": "UNSPECIFIED_ID" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } ], - "id": 3861, - "name": "require", + "id": 7978, + "name": "LogCancelFaultPeriodChanged", "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "26626:7:8", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" } }, - "id": 3866, + "id": 7982, "isConstant": false, "isLValue": false, "isPure": false, @@ -42723,215 +54669,469 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26626:47:8", + "src": "37509:59:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3867, - "nodeType": "ExpressionStatement", - "src": "26626:47:8" + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ { - "assignments": [ - 3869 - ], - "declarations": [ - { - "constant": false, - "id": 3869, - "mutability": "mutable", - "name": "tStatus", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4007, - "src": "26783:13:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 3868, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "26783:5:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 3874, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3870, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "26799:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3872, - "indexExpression": { - "argumentTypes": null, - "id": 3871, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "26814:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "26799:31:8", + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 3873, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "26799:38:8", + "nodeType": "IndexAccess", + "src": "37954:17:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "nodeType": "VariableDeclarationStatement", - "src": "26783:54:8" - }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3880, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "26864:28:8", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3877, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "26874:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3878, - "name": "idxFinal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "26883:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3876, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "26865:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3879, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, "isConstant": false, "isLValue": false, - "isPure": false, - "kind": "functionCall", + "isPure": true, + "kind": "number", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "26865:27:8", - "tryCall": false, + "nodeType": "Literal", + "src": "38737:1:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, + "src": "38718:20:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { - "argumentTypes": null, - "hexValue": "414c52454144595f46494e414c495a4544", - "id": 3881, + "hexValue": "554e5350454349464945445f4944", + "id": 8026, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "26894:19:8", - "subdenomination": null, + "src": "38740:16:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", - "typeString": "literal_string \"ALREADY_FINALIZED\"" + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" }, - "value": "ALREADY_FINALIZED" + "value": "UNSPECIFIED_ID" } ], "expression": { @@ -42941,11 +55141,11 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", - "typeString": "literal_string \"ALREADY_FINALIZED\"" + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" } ], - "id": 3875, + "id": 8022, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ @@ -42953,13 +55153,13 @@ -18 ], "referencedDeclaration": -18, - "src": "26856:7:8", + "src": "38710:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 3882, + "id": 8027, "isConstant": false, "isLValue": false, "isPure": false, @@ -42967,227 +55167,84 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "26856:58:8", + "src": "38710:47:6", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 3883, + "id": 8028, "nodeType": "ExpressionStatement", - "src": "26856:58:8" + "src": "38710:47:6" }, { "assignments": [ - 3885 + 8030 ], "declarations": [ { "constant": false, - "id": 3885, + "id": 8030, "mutability": "mutable", - "name": "mark", + "name": "tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4007, - "src": "27024:9:8", + "scope": 8042, + "src": "38860:21:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 3884, - "name": "bool", + "id": 8029, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "27024:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 3886, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "27024:9:8" - }, - { - "assignments": [ - 3888 - ], - "declarations": [ - { - "constant": false, - "id": 3888, - "mutability": "mutable", - "name": "tPromise", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4007, - "src": "27043:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise" - }, - "typeName": { - "contractScope": null, - "id": 3887, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "27043:7:8", + "src": "38860:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "id": 3894, + "id": 8034, "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3889, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "27069:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 3893, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3891, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "27104:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 3890, - "name": "getPromiseIdFromVoucherId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "27078:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 3892, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27078:42:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27069:52:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "27043:78:8" - }, - { - "condition": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 3896, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27153:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3897, - "name": "idxComplain", + "id": 8032, + "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "27162:11:8", + "referencedDeclaration": 8016, + "src": "38907:15:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 3895, - "name": "isStatus", + "id": 8031, + "name": "getIdSupplyFromVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "27144:8:8", + "referencedDeclaration": 8013, + "src": "38884:22:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" } }, - "id": 3898, + "id": 8033, "isConstant": false, "isLValue": false, "isPure": false, @@ -43195,1492 +55252,735 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "27144:30:8", + "src": "38884:39:6", "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3938, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3926, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27586:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3927, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "27595:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3925, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "27577:8:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 3928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27577:33:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3929, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "27634:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3930, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27634:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3931, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "27653:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3933, - "indexExpression": { - "argumentTypes": null, - "id": 3932, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "27668:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27653:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3934, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "27653:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3935, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "27707:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27653:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27634:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "27577:144:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 3950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3945, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27882:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3944, - "name": "isStateRedemptionSigned", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4354, - "src": "27858:23:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 3946, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27858:32:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3948, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27930:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3947, - "name": "isStateRefunded", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4372, - "src": "27914:15:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 3949, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27914:24:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "27858:80:8", + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "falseBody": { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3968, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "28233:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3967, - "name": "isStateExpired", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4390, - "src": "28218:14:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8) pure returns (bool)" - } - }, - "id": 3969, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28218:23:8", - "tryCall": false, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } }, - "falseBody": null, - "id": 3984, - "nodeType": "IfStatement", - "src": "28214:245:8", - "trueBody": { - "id": 3983, - "nodeType": "Block", - "src": "28243:216:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3970, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "28338:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28338:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3975, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3972, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3888, - "src": "28357:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 3973, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "28357:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3974, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "28376:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "28357:33:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "28338:52:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3982, - "nodeType": "IfStatement", - "src": "28334:102:8", - "trueBody": { - "id": 3981, - "nodeType": "Block", - "src": "28392:44:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3979, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3977, - "name": "mark", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "28410:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28417:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "28410:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3980, - "nodeType": "ExpressionStatement", - "src": "28410:11:8" - } - ] - } - } - ] + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 3985, - "nodeType": "IfStatement", - "src": "27854:605:8", - "trueBody": { - "id": 3966, - "nodeType": "Block", - "src": "27940:268:8", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3951, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "28052:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3952, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28052:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3953, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "28071:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3955, - "indexExpression": { - "argumentTypes": null, - "id": 3954, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "28086:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "28071:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3956, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "28071:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3957, - "name": "complainPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "28125:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "28071:68:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "28052:87:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 3965, - "nodeType": "IfStatement", - "src": "28048:137:8", - "trueBody": { - "id": 3964, - "nodeType": "Block", - "src": "28141:44:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3962, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3960, - "name": "mark", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "28159:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3961, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "28166:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "28159:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3963, - "nodeType": "ExpressionStatement", - "src": "28159:11:8" - } - ] - } - } - ] + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 3986, - "nodeType": "IfStatement", - "src": "27573:886:8", - "trueBody": { - "id": 3943, - "nodeType": "Block", - "src": "27744:104:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3939, - "name": "mark", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "27813:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3940, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27820:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "27813:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3942, - "nodeType": "ExpressionStatement", - "src": "27813:11:8" - } - ] + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 3987, - "nodeType": "IfStatement", - "src": "27140:1319:8", - "trueBody": { - "id": 3924, - "nodeType": "Block", - "src": "27176:391:8", - "statements": [ + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3900, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "27203:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3901, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "27212:14:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3899, - "name": "isStatus", + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "27194:8:8", + "referencedDeclaration": 6170, + "src": "39454:14:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" + "typeIdentifier": "t_address", + "typeString": "address" } - }, - "id": 3902, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "27194:33:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 3908, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "27349:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 3909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "27349:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 3915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3910, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "27368:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3912, - "indexExpression": { - "argumentTypes": null, - "id": 3911, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "27383:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "27368:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3913, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "complainPeriodStart", - "nodeType": "MemberAccess", - "referencedDeclaration": 4318, - "src": "27368:51:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 3914, - "name": "cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "27422:17:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27368:71:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "27349:90:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" } - }, - "falseBody": null, - "id": 3922, - "nodeType": "IfStatement", - "src": "27345:199:8", - "trueBody": { - "id": 3921, - "nodeType": "Block", - "src": "27441:103:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3919, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3917, - "name": "mark", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "27518:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3918, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27525:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "27518:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3920, - "nodeType": "ExpressionStatement", - "src": "27518:11:8" - } - ] + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" } }, - "id": 3923, - "nodeType": "IfStatement", - "src": "27190:354:8", - "trueBody": { - "id": 3907, - "nodeType": "Block", - "src": "27229:110:8", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 3905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 3903, - "name": "mark", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "27296:4:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3904, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "27303:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "27296:11:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 3906, - "nodeType": "ExpressionStatement", - "src": "27296:11:8" - } - ] + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" } - ] - } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" }, { - "condition": { - "argumentTypes": null, - "id": 3988, - "name": "mark", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3885, - "src": "28481:4:8", + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "falseBody": null, - "id": 4006, - "nodeType": "IfStatement", - "src": "28477:182:8", - "trueBody": { - "id": 4005, - "nodeType": "Block", - "src": "28487:172:8", - "statements": [ + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ { "expression": { - "argumentTypes": null, - "id": 3997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 3989, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "28501:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 3991, - "indexExpression": { - "argumentTypes": null, - "id": 3990, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "28516:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "28501:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 3992, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "28501:38:8", + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3994, - "name": "tStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3869, - "src": "28552:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 3995, - "name": "idxFinal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "28561:8:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 3993, - "name": "setChange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4424, - "src": "28542:9:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", - "typeString": "function (uint8,uint8) pure returns (uint8)" - } - }, - "id": 3996, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28542:28:8", - "tryCall": false, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "src": "28501:69:8", + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 3998, - "nodeType": "ExpressionStatement", - "src": "28501:69:8" + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4000, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3858, - "src": "28608:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4001, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "28625:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "28625:10:8", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 3999, - "name": "LogFinalizeVoucher", + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2721, - "src": "28589:18:8", + "referencedDeclaration": 8077, + "src": "40136:10:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (uint256,address)" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 4003, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "28589:47:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4004, - "nodeType": "EmitStatement", - "src": "28584:52:8" + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } - ] - } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" } ] }, "documentation": { - "id": 3856, + "id": 8064, "nodeType": "StructuredDocumentation", - "src": "26364:121:8", - "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" }, - "functionSelector": "65c303bc", - "id": 4008, + "functionSelector": "d887b4e7", + "id": 8097, "implemented": true, "kind": "function", "modifiers": [], - "name": "triggerFinalizeVoucher", + "name": "getOrderCosts", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, "parameters": { - "id": 3859, + "id": 8067, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 3858, + "id": 8066, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4008, - "src": "26570:23:8", + "scope": 8097, + "src": "39775:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -44688,611 +55988,844 @@ "typeString": "uint256" }, "typeName": { - "id": 3857, + "id": 8065, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "26570:7:8", + "src": "39775:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "26569:25:8" + "src": "39774:24:6" }, "returnParameters": { - "id": 3860, + "id": 8075, "nodeType": "ParameterList", - "parameters": [], - "src": "26616:0:8" + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" }, - "scope": 4283, - "src": "26538:2138:8", - "stateMutability": "nonpayable", + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", "virtual": false, - "visibility": "external" + "visibility": "public" }, { + "baseFunctions": [ + 9472 + ], "body": { - "id": 4036, + "id": 8124, "nodeType": "Block", - "src": "29002:286:8", + "src": "40558:147:6", "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, { "expression": { - "argumentTypes": null, - "arguments": [ + "components": [ { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 4022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4017, - "name": "_cashierAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4011, - "src": "29020:15:8", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 4020, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "29047:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 4019, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "29039:7:8", + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 4018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "29039:7:8", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 4021, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", + "isLValue": true, + "isPure": false, "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29039:10:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "src": "29020:29:8", + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f41444452455353", - "id": 4023, + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", + "isLValue": true, + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "29051:21:8", - "subdenomination": null, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - }, - "value": "UNSPECIFIED_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 4016, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "29012:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" } - }, - "id": 4024, + ], + "id": 8122, "isConstant": false, + "isInlineArray": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29012:61:8", - "tryCall": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4025, - "nodeType": "ExpressionStatement", - "src": "29012:61:8" - }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ { - "expression": { - "argumentTypes": null, - "id": 4028, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4026, - "name": "cashierAddress", + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2606, - "src": "29183:14:8", + "referencedDeclaration": 6219, + "src": "41040:13:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4027, - "name": "_cashierAddress", + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4011, - "src": "29200:15:8", + "referencedDeclaration": 8128, + "src": "41054:14:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "29183:32:8", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 4029, - "nodeType": "ExpressionStatement", - "src": "29183:32:8" + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" }, { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4031, - "name": "_cashierAddress", + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4011, - "src": "29253:15:8", + "referencedDeclaration": 6204, + "src": "41087:8:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4032, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "29270:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4033, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29270:10:8", + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "id": 4030, - "name": "LogCashierSet", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2727, - "src": "29239:13:8", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4034, + "id": 8143, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29239:42:8", - "tryCall": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4035, - "nodeType": "EmitStatement", - "src": "29234:47:8" + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" } ] }, "documentation": { - "id": 4009, + "id": 8126, "nodeType": "StructuredDocumentation", - "src": "28772:134:8", - "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the Cashier contract" + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" }, - "functionSelector": "c099a7c4", - "id": 4037, + "functionSelector": "88106323", + "id": 8146, "implemented": true, "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4014, - "modifierName": { - "argumentTypes": null, - "id": 4013, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "28988:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "28988:9:8" - } - ], - "name": "setCashierAddress", + "modifiers": [], + "name": "getSellerDeposit", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, "parameters": { - "id": 4012, + "id": 8129, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4011, + "id": 8128, "mutability": "mutable", - "name": "_cashierAddress", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4037, - "src": "28938:23:8", + "scope": 8146, + "src": "40904:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4010, - "name": "address", + "id": 8127, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "28938:7:8", - "stateMutability": "nonpayable", + "src": "40904:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "28937:25:8" + "src": "40903:24:6" }, "returnParameters": { - "id": 4015, + "id": 8133, "nodeType": "ParameterList", - "parameters": [], - "src": "29002:0:8" + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" }, - "scope": 4283, - "src": "28911:377:8", - "stateMutability": "nonpayable", + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", "virtual": false, - "visibility": "external" + "visibility": "public" }, { + "baseFunctions": [ + 9550 + ], "body": { - "id": 4055, + "id": 8166, "nodeType": "Block", - "src": "29644:126:8", + "src": "41487:114:6", "statements": [ { - "expression": { - "argumentTypes": null, - "id": 4047, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4045, - "name": "complainPeriod", + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2673, - "src": "29654:14:8", + "referencedDeclaration": 6219, + "src": "41519:13:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4046, - "name": "_complainPeriod", + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4040, - "src": "29671:15:8", + "referencedDeclaration": 8149, + "src": "41533:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "29654:32:8", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 4048, - "nodeType": "ExpressionStatement", - "src": "29654:32:8" + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" }, { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4050, - "name": "_complainPeriod", + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4040, - "src": "29735:15:8", + "referencedDeclaration": 6204, + "src": "41566:8:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4051, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "29752:3:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 4052, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "29752:10:8", + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } - ], - "id": 4049, - "name": "LogComplainPeriodChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2733, - "src": "29710:24:8", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (uint256,address)" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4053, + "id": 8164, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "29710:53:8", - "tryCall": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 4054, - "nodeType": "EmitStatement", - "src": "29705:58:8" + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" } ] }, "documentation": { - "id": 4038, + "id": 8147, "nodeType": "StructuredDocumentation", - "src": "29303:245:8", - "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" }, - "functionSelector": "8990834b", - "id": 4056, + "functionSelector": "1f38585f", + "id": 8167, "implemented": true, "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4043, - "modifierName": { - "argumentTypes": null, - "id": 4042, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "29630:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "29630:9:8" - } - ], - "name": "setComplainPeriod", + "modifiers": [], + "name": "getSupplyHolder", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, "parameters": { - "id": 4041, + "id": 8150, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4040, + "id": 8149, "mutability": "mutable", - "name": "_complainPeriod", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4056, - "src": "29580:23:8", + "scope": 8167, + "src": "41383:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -45300,222 +56833,470 @@ "typeString": "uint256" }, "typeName": { - "id": 4039, + "id": 8148, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "29580:7:8", + "src": "41383:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "29579:25:8" + "src": "41382:24:6" }, "returnParameters": { - "id": 4044, + "id": 8154, "nodeType": "ParameterList", - "parameters": [], - "src": "29644:0:8" + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" }, - "scope": 4283, - "src": "29553:217:8", - "stateMutability": "nonpayable", + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", "virtual": false, - "visibility": "external" + "visibility": "public" }, { + "baseFunctions": [ + 9628 + ], "body": { - "id": 4074, + "id": 8202, "nodeType": "Block", - "src": "30145:138:8", + "src": "41981:173:6", "statements": [ { - "expression": { - "argumentTypes": null, - "id": 4066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 4064, - "name": "cancelFaultPeriod", + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2675, - "src": "30155:17:8", + "referencedDeclaration": 6204, + "src": "42018:8:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 4065, - "name": "_cancelFaultPeriod", + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "30175:18:8", + "referencedDeclaration": 8170, + "src": "42027:11:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "src": "30155:38:8", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, - "id": 4067, - "nodeType": "ExpressionStatement", - "src": "30155:38:8" + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" }, { - "eventCall": { - "argumentTypes": null, - "arguments": [ + "expression": { + "components": [ { - "argumentTypes": null, - "id": 4069, - "name": "_cancelFaultPeriod", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4059, - "src": "30245:18:8", + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { - "argumentTypes": null, "expression": { - "argumentTypes": null, - "id": 4070, - "name": "msg", + "id": 8196, + "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "30265:3:8", + "referencedDeclaration": 8185, + "src": "42114:8:6", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 4071, + "id": 8197, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "sender", + "memberName": "validTo", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "30265:10:8", + "referencedDeclaration": 6180, + "src": "42114:16:6", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { "typeIdentifier": "t_uint256", "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 4068, - "name": "LogCancelFaultPeriodChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2739, - "src": "30217:27:8", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", - "typeString": "function (uint256,address)" } - }, - "id": 4072, + ], + "id": 8200, "isConstant": false, + "isInlineArray": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "30217:59:8", - "tryCall": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" } }, - "id": 4073, - "nodeType": "EmitStatement", - "src": "30212:64:8" + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" } ] }, "documentation": { - "id": 4057, + "id": 8168, "nodeType": "StructuredDocumentation", - "src": "29785:258:8", - "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" }, - "functionSelector": "ede80897", - "id": 4075, + "functionSelector": "a1e5e3f9", + "id": 8203, "implemented": true, "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 4062, - "modifierName": { - "argumentTypes": null, - "id": 4061, - "name": "onlyOwner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2757, - "src": "30131:9:8", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "30131:9:8" - } - ], - "name": "setCancelFaultPeriod", + "modifiers": [], + "name": "getPromiseData", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, "parameters": { - "id": 4060, + "id": 8171, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4059, + "id": 8170, "mutability": "mutable", - "name": "_cancelFaultPeriod", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4075, - "src": "30078:26:8", + "scope": 8203, + "src": "41966:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -45523,114 +57304,350 @@ "typeString": "uint256" }, "typeName": { - "id": 4058, + "id": 8181, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30078:7:8", + "src": "41966:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30077:28:8" - }, - "returnParameters": { - "id": 4063, - "nodeType": "ParameterList", - "parameters": [], - "src": "30145:0:8" + "src": "41929:46:6" }, - "scope": 4283, - "src": "30048:235:8", - "stateMutability": "nonpayable", + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", "virtual": false, "visibility": "external" }, { + "baseFunctions": [ + 9542 + ], "body": { - "id": 4087, + "id": 8242, "nodeType": "Block", - "src": "30622:41:8", + "src": "42590:354:6", "statements": [ { "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4083, - "name": "promiseKeys", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2613, - "src": "30639:11:8", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", - "typeString": "bytes32[] storage ref" - } - }, - "id": 4085, - "indexExpression": { - "argumentTypes": null, - "id": 4084, - "name": "_idx", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4078, - "src": "30651:4:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } - }, + ], + "id": 8240, "isConstant": false, - "isLValue": true, + "isInlineArray": false, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "30639:17:8", + "nodeType": "TupleExpression", + "src": "42608:328:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" } }, - "functionReturnParameters": 4082, - "id": 4086, + "functionReturnParameters": 8219, + "id": 8241, "nodeType": "Return", - "src": "30632:24:8" + "src": "42601:335:6" } ] }, "documentation": { - "id": 4076, + "id": 8204, "nodeType": "StructuredDocumentation", - "src": "30381:149:8", - "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" }, - "functionSelector": "81dc8119", - "id": 4088, + "functionSelector": "325a7a84", + "id": 8243, "implemented": true, "kind": "function", "modifiers": [], - "name": "getPromiseKey", + "name": "getVoucherStatus", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, "parameters": { - "id": 4079, + "id": 8207, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4078, + "id": 8206, "mutability": "mutable", - "name": "_idx", + "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4088, - "src": "30558:12:8", + "scope": 8243, + "src": "42381:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -45638,148 +57655,110 @@ "typeString": "uint256" }, "typeName": { - "id": 4077, + "id": 8205, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30558:7:8", + "src": "42381:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30557:14:8" + "src": "42380:25:6" }, "returnParameters": { - "id": 4082, + "id": 8219, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4081, + "id": 8210, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4088, - "src": "30609:7:8", + "scope": 8243, + "src": "42486:5:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 4080, - "name": "bytes32", + "id": 8209, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "30609:7:8", + "src": "42486:5:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "value": null, "visibility": "internal" - } - ], - "src": "30608:9:8" - }, - "scope": 4283, - "src": "30535:128:8", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 4100, - "nodeType": "Block", - "src": "30972:51:8", - "statements": [ + }, { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4098, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4096, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4091, - "src": "30989:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "&", - "rightExpression": { - "argumentTypes": null, - "id": 4097, - "name": "MASK_TYPE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2657, - "src": "31007:9:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "30989:27:8", + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "functionReturnParameters": 4095, - "id": 4099, - "nodeType": "Return", - "src": "30982:34:8" - } - ] - }, - "documentation": { - "id": 4089, - "nodeType": "StructuredDocumentation", - "src": "30678:182:8", - "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" - }, - "functionSelector": "1af2a6a8", - "id": 4101, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getIdSupplyFromVoucher", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 4092, - "nodeType": "ParameterList", - "parameters": [ + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, { "constant": false, - "id": 4091, + "id": 8216, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4101, - "src": "30897:23:8", + "scope": 8243, + "src": "42544:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -45787,34 +57766,25 @@ "typeString": "uint256" }, "typeName": { - "id": 4090, + "id": 8215, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30897:7:8", + "src": "42544:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" - } - ], - "src": "30896:25:8" - }, - "returnParameters": { - "id": 4095, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 4094, + "id": 8218, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4101, - "src": "30959:7:8", + "scope": 8243, + "src": "42566:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -45822,196 +57792,45 @@ "typeString": "uint256" }, "typeName": { - "id": 4093, + "id": 8217, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "30959:7:8", + "src": "42566:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "30958:9:8" + "src": "42471:113:6" }, - "scope": 4283, - "src": "30865:158:8", - "stateMutability": "pure", + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9558 + ], "body": { - "id": 4129, + "id": 8259, "nodeType": "Block", - "src": "31325:302:8", + "src": "43257:74:6", "statements": [ { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4112, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 4110, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4104, - "src": "31343:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 4111, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31362:1:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "31343:20:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 4113, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "31365:16:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - }, - "value": "UNSPECIFIED_ID" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - } - ], - "id": 4109, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "31335:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4114, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "31335:47:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 4115, - "nodeType": "ExpressionStatement", - "src": "31335:47:8" - }, - { - "assignments": [ - 4117 - ], - "declarations": [ - { - "constant": false, - "id": 4117, - "mutability": "mutable", - "name": "tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4129, - "src": "31492:21:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4116, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "31492:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4121, - "initialValue": { - "argumentTypes": null, "arguments": [ { - "argumentTypes": null, - "id": 4119, + "id": 8256, "name": "_tokenIdVoucher", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4104, - "src": "31539:15:8", + "referencedDeclaration": 8246, + "src": "43307:15:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -46025,18 +57844,69 @@ "typeString": "uint256" } ], - "id": 4118, - "name": "getIdSupplyFromVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4101, - "src": "31516:22:8", + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure returns (uint256)" + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" } }, - "id": 4120, + "id": 8257, "isConstant": false, "isLValue": false, "isPure": false, @@ -46044,73 +57914,147 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "31516:39:8", + "src": "43275:48:6", "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "VariableDeclarationStatement", - "src": "31492:63:8" - }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ { "expression": { - "argumentTypes": null, "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4122, - "name": "promises", + "id": 8269, + "name": "paymentDetails", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "31572:8:8", + "referencedDeclaration": 6212, + "src": "43710:14:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" } }, - "id": 4126, + "id": 8271, "indexExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4123, - "name": "ordersPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2621, - "src": "31581:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" - } - }, - "id": 4125, - "indexExpression": { - "argumentTypes": null, - "id": 4124, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4117, - "src": "31595:13:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "31581:28:8", + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "isConstant": false, @@ -46118,60 +58062,64 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "31572:38:8", + "src": "43710:30:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" } }, - "id": 4127, + "id": 8272, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "promiseId", + "memberName": "addressTokenPrice", "nodeType": "MemberAccess", - "referencedDeclaration": 2585, - "src": "31572:48:8", + "referencedDeclaration": 6193, + "src": "43710:48:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "functionReturnParameters": 4108, - "id": 4128, + "functionReturnParameters": 8268, + "id": 8273, "nodeType": "Return", - "src": "31565:55:8" + "src": "43703:55:6" } ] }, "documentation": { - "id": 4102, + "id": 8261, "nodeType": "StructuredDocumentation", - "src": "31038:172:8", - "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" }, - "functionSelector": "bc0d753d", - "id": 4130, + "functionSelector": "e875a613", + "id": 8275, "implemented": true, "kind": "function", "modifiers": [], - "name": "getPromiseIdFromVoucherId", + "name": "getVoucherPriceToken", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, "parameters": { - "id": 4105, + "id": 8264, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4104, + "id": 8263, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4130, - "src": "31250:23:8", + "scope": 8275, + "src": "43588:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -46179,452 +58127,484 @@ "typeString": "uint256" }, "typeName": { - "id": 4103, + "id": 8262, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31250:7:8", + "src": "43588:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "31249:25:8" + "src": "43587:24:6" }, "returnParameters": { - "id": 4108, + "id": 8268, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4107, + "id": 8267, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4130, - "src": "31312:7:8", + "scope": 8275, + "src": "43678:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 4106, - "name": "bytes32", + "id": 8266, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "31312:7:8", + "src": "43678:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "31311:9:8" + "src": "43677:9:6" }, - "scope": 4283, - "src": "31215:412:8", + "scope": 8454, + "src": "43558:208:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9462 + ], "body": { - "id": 4142, + "id": 8289, "nodeType": "Block", - "src": "31914:47:8", + "src": "44133:77:6", "statements": [ { "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4138, - "name": "accountSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2617, - "src": "31931:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 4140, - "indexExpression": { - "argumentTypes": null, - "id": 4139, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4133, - "src": "31945:8:8", + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" } }, + "id": 8287, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "31931:23:8", + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "functionReturnParameters": 4137, - "id": 4141, + "functionReturnParameters": 8283, + "id": 8288, "nodeType": "Return", - "src": "31924:30:8" + "src": "44144:58:6" } ] }, "documentation": { - "id": 4131, + "id": 8276, "nodeType": "StructuredDocumentation", - "src": "31642:145:8", - "text": " @notice Get the current supply of tokens of an account\n @param _account Address to query\n @return Balance" + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" }, - "functionSelector": "68da10ae", - "id": 4143, + "functionSelector": "9a751bbd", + "id": 8290, "implemented": true, "kind": "function", "modifiers": [], - "name": "getTotalSupply", + "name": "getVoucherDepositToken", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, "parameters": { - "id": 4134, + "id": 8279, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4133, + "id": 8278, "mutability": "mutable", - "name": "_account", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4143, - "src": "31846:16:8", + "scope": 8290, + "src": "44029:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4132, - "name": "address", + "id": 8277, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "31846:7:8", - "stateMutability": "nonpayable", + "src": "44029:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "31845:18:8" + "src": "44028:24:6" }, "returnParameters": { - "id": 4137, + "id": 8283, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4136, + "id": 8282, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4143, - "src": "31901:7:8", + "scope": 8290, + "src": "44119:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 4135, - "name": "uint256", + "id": 8281, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "31901:7:8", + "src": "44119:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "31900:9:8" + "src": "44118:9:6" }, - "scope": 4283, - "src": "31822:139:8", + "scope": 8454, + "src": "43997:213:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9526 + ], "body": { - "id": 4157, + "id": 8304, "nodeType": "Block", - "src": "32241:56:8", + "src": "44553:70:6", "statements": [ { "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4151, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32259:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 4153, - "indexExpression": { - "argumentTypes": null, - "id": 4152, - "name": "_promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4146, - "src": "32268:10:8", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "32259:20:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "id": 4154, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "depositSe", - "nodeType": "MemberAccess", - "referencedDeclaration": 2597, - "src": "32259:30:8", + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" } - ], - "id": 4155, + }, + "id": 8302, "isConstant": false, - "isInlineArray": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "32258:32:8", + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "functionReturnParameters": 4150, - "id": 4156, + "functionReturnParameters": 8298, + "id": 8303, "nodeType": "Return", - "src": "32251:39:8" + "src": "44564:51:6" } ] }, "documentation": { - "id": 4144, + "id": 8291, "nodeType": "StructuredDocumentation", - "src": "31976:161:8", - "text": " @notice Get the seller's deposit for a promise\n @param _promiseId ID of the promise\n @return Deposit of the seller" + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" }, - "functionSelector": "03770046", - "id": 4158, + "functionSelector": "1cf7955d", + "id": 8305, "implemented": true, "kind": "function", "modifiers": [], - "name": "getPromiseDepositSe", + "name": "getVoucherPaymentMethod", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, "parameters": { - "id": 4147, + "id": 8294, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4146, + "id": 8293, "mutability": "mutable", - "name": "_promiseId", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4158, - "src": "32171:18:8", + "scope": 8305, + "src": "44451:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4145, - "name": "bytes32", + "id": 8292, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32171:7:8", + "src": "44451:7:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "32170:20:8" + "src": "44450:24:6" }, "returnParameters": { - "id": 4150, + "id": 8298, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4149, + "id": 8297, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4158, - "src": "32228:7:8", + "scope": 8305, + "src": "44541:5:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, "typeName": { - "id": 4148, - "name": "uint256", + "id": 8296, + "name": "uint8", "nodeType": "ElementaryTypeName", - "src": "32228:7:8", + "src": "44541:5:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } }, - "value": null, "visibility": "internal" } ], - "src": "32227:9:8" + "src": "44540:7:6" }, - "scope": 4283, - "src": "32142:155:8", + "scope": 8454, + "src": "44418:205:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9566 + ], "body": { - "id": 4190, + "id": 8342, "nodeType": "Block", - "src": "32652:176:8", + "src": "44943:493:6", "statements": [ { "assignments": [ - 4171 + 8315 ], "declarations": [ { "constant": false, - "id": 4171, + "id": 8315, "mutability": "mutable", - "name": "promiseKey", + "name": "tPromise", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4190, - "src": "32662:18:8", + "scope": 8342, + "src": "44987:23:6", "stateVariable": false, - "storageLocation": "default", + "storageLocation": "memory", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" }, "typeName": { - "id": 4170, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "32662:7:8", + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" } }, - "value": null, - "visibility": "internal" - } - ], - "id": 4175, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4172, - "name": "ordersPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2621, - "src": "32683:13:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", - "typeString": "mapping(uint256 => bytes32)" - } - }, - "id": 4174, - "indexExpression": { - "argumentTypes": null, - "id": 4173, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4161, - "src": "32697:14:8", + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "isConstant": false, @@ -46632,235 +58612,340 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "32683:29:8", + "src": "45026:52:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "32662:50:8" + "src": "44987:91:6" }, { "expression": { - "argumentTypes": null, - "components": [ + "arguments": [ { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4176, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32730:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 4178, - "indexExpression": { - "argumentTypes": null, - "id": 4177, - "name": "promiseKey", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "32739:10:8", + "referencedDeclaration": 8315, + "src": "45097:8:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" } }, + "id": 8324, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "32730:20:8", + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4179, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "price", - "nodeType": "MemberAccess", - "referencedDeclaration": 2595, - "src": "32730:26:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4180, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32758:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 4182, - "indexExpression": { - "argumentTypes": null, - "id": 4181, - "name": "promiseKey", + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "32767:10:8", + "referencedDeclaration": -4, + "src": "45119:5:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_magic_block", + "typeString": "block" } }, + "id": 8326, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "32758:20:8", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4183, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, "isConstant": false, - "isLValue": true, - "isPure": false, + "isLValue": false, + "isPure": true, + "kind": "string", "lValueRequested": false, - "memberName": "depositSe", - "nodeType": "MemberAccess", - "referencedDeclaration": 2597, - "src": "32758:30:8", + "nodeType": "Literal", + "src": "45136:23:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" } - }, + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4184, - "name": "promises", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "32790:8:8", + "referencedDeclaration": 8315, + "src": "45262:8:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" } }, - "id": 4186, - "indexExpression": { - "argumentTypes": null, - "id": 4185, - "name": "promiseKey", + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4171, - "src": "32799:10:8", + "referencedDeclaration": -4, + "src": "45282:5:6", "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" + "typeIdentifier": "t_magic_block", + "typeString": "block" } }, + "id": 8335, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "32790:20:8", + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4187, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, "isConstant": false, - "isLValue": true, - "isPure": false, + "isLValue": false, + "isPure": true, + "kind": "string", "lValueRequested": false, - "memberName": "depositBu", - "nodeType": "MemberAccess", - "referencedDeclaration": 2599, - "src": "32790:30:8", + "nodeType": "Literal", + "src": "45299:21:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" } ], - "id": 4188, + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, "isConstant": false, - "isInlineArray": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "32729:92:8", + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "functionReturnParameters": 4169, - "id": 4189, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, "nodeType": "Return", - "src": "32722:99:8" + "src": "45417:11:6" } ] }, "documentation": { - "id": 4159, + "id": 8306, "nodeType": "StructuredDocumentation", - "src": "32308:224:8", - "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tupple (Payment amount, Seller's deposit, Buyer's deposit)" + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" }, - "functionSelector": "d887b4e7", - "id": 4191, + "functionSelector": "9a0271e1", + "id": 8343, "implemented": true, "kind": "function", "modifiers": [], - "name": "getOrderCosts", + "name": "isInValidityPeriod", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, "parameters": { - "id": 4162, + "id": 8309, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4161, + "id": 8308, "mutability": "mutable", - "name": "_tokenIdSupply", + "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32560:22:8", + "scope": 8343, + "src": "44841:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -46868,344 +58953,260 @@ "typeString": "uint256" }, "typeName": { - "id": 4160, + "id": 8307, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "32560:7:8", + "src": "44841:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "32559:24:8" + "src": "44840:25:6" }, "returnParameters": { - "id": 4169, + "id": 8313, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4164, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32621:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4163, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "32621:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4166, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32630:7:8", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 4165, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "32630:7:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 4168, + "id": 8312, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4191, - "src": "32639:7:8", + "scope": 8343, + "src": "44932:4:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" }, "typeName": { - "id": 4167, - "name": "uint256", + "id": 8311, + "name": "bool", "nodeType": "ElementaryTypeName", - "src": "32639:7:8", + "src": "44932:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, "visibility": "internal" } ], - "src": "32620:27:8" + "src": "44931:6:6" }, - "scope": 4283, - "src": "32537:291:8", + "scope": 8454, + "src": "44813:623:6", "stateMutability": "view", "virtual": false, "visibility": "public" }, { + "baseFunctions": [ + 9574 + ], "body": { - "id": 4217, + "id": 8364, "nodeType": "Block", - "src": "33142:167:8", + "src": "45806:162:6", "statements": [ { "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4203, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "33160:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 4205, - "indexExpression": { - "argumentTypes": null, - "id": 4204, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4194, - "src": "33175:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "33160:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 4206, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "33160:38:8", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4207, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "33200:14:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" - } - }, - "id": 4209, - "indexExpression": { - "argumentTypes": null, - "id": 4208, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4194, - "src": "33215:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, + "id": 8360, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "33200:31:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" - } - }, - "id": 4210, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "33200:49:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4211, - "name": "vouchersStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2625, - "src": "33251:14:8", + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$4321_storage_$", - "typeString": "mapping(uint256 => struct usingHelpers.VoucherStatus storage ref)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 4213, - "indexExpression": { - "argumentTypes": null, - "id": 4212, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4194, - "src": "33266:15:8", + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "33251:31:8", + "src": "45839:120:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage", - "typeString": "struct usingHelpers.VoucherStatus storage ref" + "typeIdentifier": "t_bool", + "typeString": "bool" } - }, - "id": 4214, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "33251:50:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ], - "id": 4215, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "33159:143:8", + }, "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "tuple(uint8,bool,bool)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "functionReturnParameters": 4202, - "id": 4216, + "functionReturnParameters": 8351, + "id": 8363, "nodeType": "Return", - "src": "33152:150:8" + "src": "45817:143:6" } ] }, "documentation": { - "id": 4192, + "id": 8344, "nodeType": "StructuredDocumentation", - "src": "32843:183:8", - "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" }, - "functionSelector": "325a7a84", - "id": 4218, + "functionSelector": "5b479d1a", + "id": 8365, "implemented": true, "kind": "function", "modifiers": [], - "name": "getVoucherStatus", + "name": "isVoucherTransferable", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, "parameters": { - "id": 4195, + "id": 8347, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4194, + "id": 8346, "mutability": "mutable", "name": "_tokenIdVoucher", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33057:23:8", + "scope": 8365, + "src": "45704:23:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -47213,152 +59214,281 @@ "typeString": "uint256" }, "typeName": { - "id": 4193, + "id": 8345, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33057:7:8", + "src": "45704:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33056:25:8" + "src": "45703:25:6" }, "returnParameters": { - "id": 4202, + "id": 8351, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4197, + "id": 8350, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33119:5:8", + "scope": 8365, + "src": "45795:4:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bool", + "typeString": "bool" }, "typeName": { - "id": 4196, - "name": "uint8", + "id": 8349, + "name": "bool", "nodeType": "ElementaryTypeName", - "src": "33119:5:8", + "src": "45795:4:6", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 4199, + "id": 8370, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33126:4:8", + "scope": 8375, + "src": "46226:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 4198, - "name": "bool", + "id": 8369, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "33126:4:8", + "src": "46226:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" - }, + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 4201, + "id": 8380, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4218, - "src": "33132:4:8", + "scope": 8385, + "src": "46538:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 4200, - "name": "bool", + "id": 8379, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "33132:4:8", + "src": "46538:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "33118:19:8" + "src": "46537:9:6" }, - "scope": 4283, - "src": "33031:278:8", + "scope": 8454, + "src": "46441:151:6", "stateMutability": "view", "virtual": false, - "visibility": "public" + "visibility": "external" }, { + "baseFunctions": [ + 9594 + ], "body": { - "id": 4230, + "id": 8398, "nodeType": "Block", - "src": "33594:55:8", + "src": "46870:46:6", "statements": [ { "expression": { - "argumentTypes": null, "baseExpression": { - "argumentTypes": null, - "id": 4226, - "name": "voucherIssuers", + "id": 8394, + "name": "tokenNonces", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 2629, - "src": "33611:14:8", + "referencedDeclaration": 6208, + "src": "46888:11:6", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" } }, - "id": 4228, + "id": 8396, "indexExpression": { - "argumentTypes": null, - "id": 4227, - "name": "_tokenIdVoucher", + "id": 8395, + "name": "_seller", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 4221, - "src": "33626:15:8", + "referencedDeclaration": 8388, + "src": "46900:7:6", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "isConstant": false, @@ -47366,217 +59496,177 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "33611:31:8", + "src": "46888:20:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "functionReturnParameters": 4225, - "id": 4229, + "functionReturnParameters": 8393, + "id": 8397, "nodeType": "Return", - "src": "33604:38:8" + "src": "46881:27:6" } ] }, "documentation": { - "id": 4219, + "id": 8386, "nodeType": "StructuredDocumentation", - "src": "33324:164:8", - "text": " @notice Get the issuer of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the issuer" + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" }, - "functionSelector": "46d07cb5", - "id": 4231, + "functionSelector": "ea5416a5", + "id": 8399, "implemented": true, "kind": "function", "modifiers": [], - "name": "getVoucherIssuer", + "name": "getTokenNonce", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, "parameters": { - "id": 4222, + "id": 8389, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4221, + "id": 8388, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_seller", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4231, - "src": "33519:23:8", + "scope": 8399, + "src": "46770:15:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 4220, - "name": "uint256", + "id": 8387, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "33519:7:8", + "src": "46770:7:6", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "value": null, "visibility": "internal" } ], - "src": "33518:25:8" + "src": "46769:17:6" }, "returnParameters": { - "id": 4225, + "id": 8393, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4224, + "id": 8392, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4231, - "src": "33581:7:8", + "scope": 8399, + "src": "46855:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4223, - "name": "address", + "id": 8391, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33581:7:8", - "stateMutability": "nonpayable", + "src": "46855:7:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33580:9:8" + "src": "46854:9:6" }, - "scope": 4283, - "src": "33493:156:8", + "scope": 8454, + "src": "46747:169:6", "stateMutability": "view", "virtual": false, - "visibility": "public" + "visibility": "external" }, { + "baseFunctions": [ + 9600 + ], "body": { - "id": 4244, + "id": 8408, "nodeType": "Block", - "src": "33934:63:8", + "src": "47109:32:6", "statements": [ { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4241, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4234, - "src": "33974:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 4239, - "name": "tokensContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2583, - "src": "33951:14:8", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC1155ERC721_$2210", - "typeString": "contract ERC1155ERC721" - } - }, - "id": 4240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "ownerOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1426, - "src": "33951:22:8", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" - } - }, - "id": 4242, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "33951:39:8", - "tryCall": false, + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "functionReturnParameters": 4238, - "id": 4243, + "functionReturnParameters": 8405, + "id": 8407, "nodeType": "Return", - "src": "33944:46:8" + "src": "47120:13:6" } ] }, "documentation": { - "id": 4232, + "id": 8400, "nodeType": "StructuredDocumentation", - "src": "33664:164:8", - "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" }, - "functionSelector": "f75951ce", - "id": 4245, + "functionSelector": "911e3f46", + "id": 8409, "implemented": true, "kind": "function", "modifiers": [], - "name": "getVoucherHolder", + "name": "getTypeId", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, "parameters": { - "id": 4235, + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4234, + "id": 8404, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4245, - "src": "33859:23:8", + "scope": 8409, + "src": "47095:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -47584,527 +59674,297 @@ "typeString": "uint256" }, "typeName": { - "id": 4233, + "id": 8403, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33859:7:8", + "src": "47095:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "33858:25:8" + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" }, "returnParameters": { - "id": 4238, + "id": 8415, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4237, + "id": 8414, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4245, - "src": "33921:7:8", + "scope": 8419, + "src": "47336:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 4236, - "name": "address", + "id": 8413, + "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "33921:7:8", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "33920:9:8" - }, - "scope": 4283, - "src": "33833:164:8", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 4281, - "nodeType": "Block", - "src": "34139:494:8", - "statements": [ - { - "assignments": [ - 4254 - ], - "declarations": [ - { - "constant": false, - "id": 4254, - "mutability": "mutable", - "name": "tPromise", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4281, - "src": "34181:23:8", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise" - }, - "typeName": { - "contractScope": null, - "id": 4253, - "name": "Promise", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2602, - "src": "34181:7:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage_ptr", - "typeString": "struct VoucherKernel.Promise" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 4260, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 4255, - "name": "promises", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2610, - "src": "34207:8:8", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$2602_storage_$", - "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" - } - }, - "id": 4259, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 4257, - "name": "_tokenIdVoucher", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4248, - "src": "34242:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 4256, - "name": "getPromiseIdFromVoucherId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4130, - "src": "34216:25:8", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view returns (bytes32)" - } - }, - "id": 4258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34216:42:8", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "34207:52:8", + "src": "47336:7:6", "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_storage", - "typeString": "struct VoucherKernel.Promise storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "34181:78:8" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4266, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4262, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4254, - "src": "34277:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 4263, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 2591, - "src": "34277:18:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4264, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "34299:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34299:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "34277:37:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f56414c49444954595f46524f4d", - "id": 4267, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34316:23:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", - "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" - }, - "value": "INVALID_VALIDITY_FROM" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", - "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" - } - ], - "id": 4261, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "34269:7:8", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 4268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34269:71:8", - "tryCall": false, + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4269, - "nodeType": "ExpressionStatement", - "src": "34269:71:8" - }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ { "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 4275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4271, - "name": "tPromise", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4254, - "src": "34441:8:8", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Promise_$2602_memory_ptr", - "typeString": "struct VoucherKernel.Promise memory" - } - }, - "id": 4272, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validTo", - "nodeType": "MemberAccess", - "referencedDeclaration": 2593, - "src": "34441:16:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 4273, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -4, - "src": "34461:5:8", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 4274, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "timestamp", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "34461:15:8", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "34441:35:8", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f56414c49444954595f544f", - "id": 4276, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34478:21:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", - "typeString": "literal_string \"INVALID_VALIDITY_TO\"" - }, - "value": "INVALID_VALIDITY_TO" + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", - "typeString": "literal_string \"INVALID_VALIDITY_TO\"" - } - ], - "id": 4270, - "name": "require", + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "34433:7:8", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 4277, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "34433:67:8", - "tryCall": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 4278, - "nodeType": "ExpressionStatement", - "src": "34433:67:8" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 4279, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "34621:4:8", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 4252, - "id": 4280, + "functionReturnParameters": 8437, + "id": 8441, "nodeType": "Return", - "src": "34614:11:8" + "src": "48003:36:6" } ] }, "documentation": { - "id": 4246, + "id": 8430, "nodeType": "StructuredDocumentation", - "src": "34012:20:8", - "text": " " + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" }, - "functionSelector": "9a0271e1", - "id": 4282, + "functionSelector": "46aee52e", + "id": 8443, "implemented": true, "kind": "function", "modifiers": [], - "name": "isInValidityPeriod", + "name": "getPromiseIdFromSupplyId", "nodeType": "FunctionDefinition", - "overrides": null, + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, "parameters": { - "id": 4249, + "id": 8433, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4248, + "id": 8432, "mutability": "mutable", - "name": "_tokenIdVoucher", + "name": "_tokenIdSupply", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4282, - "src": "34066:23:8", + "scope": 8443, + "src": "47885:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -48112,76 +59972,1329 @@ "typeString": "uint256" }, "typeName": { - "id": 4247, + "id": 8431, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "34066:7:8", + "src": "47885:7:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, "visibility": "internal" } ], - "src": "34065:25:8" + "src": "47884:24:6" }, "returnParameters": { - "id": 4252, + "id": 8437, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 4251, + "id": 8436, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 4282, - "src": "34128:4:8", + "scope": 8443, + "src": "47977:7:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, "typeName": { - "id": 4250, - "name": "bool", + "id": 8435, + "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "34128:4:8", + "src": "47977:7:6", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "value": null, "visibility": "internal" } ], - "src": "34127:6:8" + "src": "47976:9:6" }, - "scope": 4283, - "src": "34038:595:8", + "scope": 8454, + "src": "47851:196:6", "stateMutability": "view", "virtual": false, - "visibility": "public" + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" } ], - "scope": 4284, - "src": "790:33854:8" + "scope": 8455, + "src": "1169:47176:6" } ], - "src": "47:34597:8" + "src": "49:48298:6" }, "compiler": { "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang", - "optimizer": false, - "runs": 200 + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + } + }, + "links": {}, + "address": "0x374d7a42F86A6a5Ce864bbA462999aCccf9750E3", + "transactionHash": "0x16297c4fc5662415b53d6d2ff8c0aa3c53378e7d3af36ed78b5964d972924849" + }, + "5777": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event", + "signature": "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event", + "signature": "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event", + "signature": "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event", + "signature": "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event", + "signature": "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event", + "signature": "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event", + "signature": "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event", + "signature": "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event", + "signature": "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event", + "signature": "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event", + "signature": "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event", + "signature": "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event", + "signature": "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event", + "signature": "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event", + "signature": "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event", + "signature": "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa" + } + }, + "links": {}, + "address": "0x7589e53b8a55212Af8b3ad6ef5c31D9c02bFA25F", + "transactionHash": "0x1a2a3135e2b562ab632c96a5446871a701f7b0c338f60a8b87a4713c5e5ef3d9" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T10:31:40.059Z", + "networkType": "ethereum", + "devdoc": { + "details": "Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931", + "kind": "dev", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "details": "Token ID is derived following the same principles for both ERC-1155 and ERC-721", + "params": { + "_issuer": "The address of the token issuer", + "_qty": "qty that should be burned", + "_tokenIdSupply": "ID of the token type" + } + }, + "cancelOrFault(uint256,address)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "params": { + "_issuer": "owner of the voucher", + "_tokenIdSupply": "ID of the voucher set" + } + }, + "complain(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "params": { + "_paymentMethod": "might be ETHETH, ETHTKN, TKNETH or TKNTKN", + "_tokenDeposits": "token address which will hold the funds for the deposits of the voucher", + "_tokenIdSupply": "_tokenIdSupply of the voucher set this is related to", + "_tokenPrice": "token address which will hold the funds for the price of the voucher" + } + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "params": { + "_depositBu": "Buyer's deposit", + "_depositSe": "Seller's deposit", + "_price": "Price (payment amount)", + "_seller": "seller of the promise", + "_validFrom": "Start of valid period", + "_validTo": "End of valid period" + } + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "params": { + "_correlationId": "ID of the current interaction with the smart contract for a specific user", + "_holder": "Address of the recipient of the voucher (ERC-721)", + "_issuer": "Address of the token's issuer", + "_paymentMethod": "method being used for that particular order that needs to be fulfilled", + "_tokenIdSupply": "ID of the supply token (ERC-1155)" + } + }, + "getBosonRouterAddress()": { + "returns": { + "_0": "Address of the Boson Router contract" + } + }, + "getBuyerOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Buyer's deposit)" + } + }, + "getCancelFaultPeriod()": { + "returns": { + "_0": "cancel or fault period" + } + }, + "getCashierAddress()": { + "returns": { + "_0": "Address of the Cashier contract" + } + }, + "getComplainPeriod()": { + "returns": { + "_0": "complain period" + } + }, + "getIdSupplyFromVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the supply token" + } + }, + "getOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + } + }, + "getPromiseData(bytes32)": { + "params": { + "_promiseKey": "ID of the promise" + }, + "returns": { + "_0": "promise data not returned by other accessor methods" + } + }, + "getPromiseIdFromSupplyId(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseIdFromVoucherId(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseKey(uint256)": { + "params": { + "_idx": "Index in the array of promise keys" + }, + "returns": { + "_0": "Promise ID" + } + }, + "getRemQtyForSupply(uint256,address)": { + "params": { + "_owner": "holder of the Token Supply", + "_tokenSupplyId": "Token supply ID" + }, + "returns": { + "_0": "remaining quantity" + } + }, + "getSellerDeposit(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns sellers deposit" + } + }, + "getSupplyHolder(uint256)": { + "params": { + "_tokenIdSupply": "ID of the order (aka VoucherSet) which is mapped to the corresponding Promise." + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getTokenNonce(address)": { + "params": { + "_seller": "Address of the seller" + }, + "returns": { + "_0": "The seller's nonce" + } + }, + "getTokensContractAddress()": { + "returns": { + "_0": "Address of ERC1155ERC721 contract" + } + }, + "getTypeId()": { + "returns": { + "_0": "type Id" + } + }, + "getVoucherDepositToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherHolder(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getVoucherPaymentMethod(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "payment method" + } + }, + "getVoucherPriceToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherStatus(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Status of the voucher (via enum)" + } + }, + "isInValidityPeriod(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "isVoucherTransferable(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "redeem(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "refund(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setBosonRouterAddress(address)": { + "params": { + "_bosonRouterAddress": "The address of the BR contract" + } + }, + "setCancelFaultPeriod(uint256)": { + "params": { + "_cancelFaultPeriod": "the new value for cancelOrFault period (in number of seconds)" + } + }, + "setCashierAddress(address)": { + "params": { + "_cashierAddress": "The address of the BR contract" + } + }, + "setComplainPeriod(uint256)": { + "params": { + "_complainPeriod": "the new value for complain period (in number of seconds)" + } + }, + "setDepositsReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setPaymentReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "params": { + "_newSeller": "new holder of the supply", + "_tokenIdSupply": "_tokenIdSupply which will be transferred" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "triggerExpiration(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "triggerFinalizeVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + } + }, + "title": "VoucherKernel contract is controlling the core business logic", + "version": 1 }, - "networks": {}, - "schemaVersion": "2.3.3", - "updatedAt": "2020-09-28T08:52:43.105Z" + "userdoc": { + "kind": "user", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "notice": "Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155" + }, + "cancelOrFault(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal" + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange." + }, + "complain(uint256,address)": { + "notice": "Issue a complain for a voucher" + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "notice": "Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set." + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future)." + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "notice": "Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder" + }, + "getBosonRouterAddress()": { + "notice": "Get address of the Boson Router to which this contract points" + }, + "getBuyerOrderCosts(uint256)": { + "notice": "Get Buyer costs required to make an order for a supply token" + }, + "getCancelFaultPeriod()": { + "notice": "Get the cancel or fault period" + }, + "getCashierAddress()": { + "notice": "Get address of the Cashier contract to which this contract points" + }, + "getComplainPeriod()": { + "notice": "Get the complain period" + }, + "getIdSupplyFromVoucher(uint256)": { + "notice": "Get the supply token ID from a voucher token" + }, + "getOrderCosts(uint256)": { + "notice": "Get all necessary funds for a supply token" + }, + "getPromiseData(bytes32)": { + "notice": "Get promise data not retrieved by other accessor functions" + }, + "getPromiseIdFromSupplyId(uint256)": { + "notice": "Get the promise ID from a voucher set" + }, + "getPromiseIdFromVoucherId(uint256)": { + "notice": "Get the promise ID from a voucher token" + }, + "getPromiseKey(uint256)": { + "notice": "Get the promise ID at specific index" + }, + "getRemQtyForSupply(uint256,address)": { + "notice": "Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account" + }, + "getSellerDeposit(uint256)": { + "notice": "Get Seller deposit" + }, + "getSupplyHolder(uint256)": { + "notice": "Get the holder of a supply" + }, + "getTokenNonce(address)": { + "notice": "Get the token nonce for a seller" + }, + "getTokensContractAddress()": { + "notice": "Get the address of ERC1155ERC721 contract" + }, + "getTypeId()": { + "notice": "Get the current type Id" + }, + "getVoucherDepositToken(uint256)": { + "notice": "Get the address of the token where the deposits for the supply are held" + }, + "getVoucherHolder(uint256)": { + "notice": "Get the holder of a voucher" + }, + "getVoucherPaymentMethod(uint256)": { + "notice": "Get the payment method for a particular _tokenIdSupply" + }, + "getVoucherPriceToken(uint256)": { + "notice": "Get the address of the token where the price for the supply is held" + }, + "getVoucherStatus(uint256)": { + "notice": "Get the current status of a voucher" + }, + "isInValidityPeriod(uint256)": { + "notice": "Checks whether a voucher is in valid period for redemption (between start date and end date)" + }, + "isVoucherTransferable(uint256)": { + "notice": "Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred" + }, + "pause()": { + "notice": "Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function." + }, + "redeem(uint256,address)": { + "notice": "Redemption of the vouchers promise" + }, + "refund(uint256,address)": { + "notice": "Refunding a voucher" + }, + "setBosonRouterAddress(address)": { + "notice": "Set the address of the Boson Router contract" + }, + "setCancelFaultPeriod(uint256)": { + "notice": "Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setCashierAddress(address)": { + "notice": "Set the address of the Cashier contract" + }, + "setComplainPeriod(uint256)": { + "notice": "Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setDepositsReleased(uint256)": { + "notice": "Mark voucher token that the deposits were released" + }, + "setPaymentReleased(uint256)": { + "notice": "Mark voucher token that the payment was released" + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "notice": "Set the address of the new holder of a _tokenIdSupply on transfer" + }, + "triggerExpiration(uint256)": { + "notice": "Mark voucher token as expired" + }, + "triggerFinalizeVoucher(uint256)": { + "notice": "Mark voucher token to the final status" + }, + "unpause()": { + "notice": "Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function." + } + }, + "version": 1 + } } \ No newline at end of file diff --git a/external/keepers/src/config.js b/external/keepers/src/config.js new file mode 100644 index 00000000..2081c6fa --- /dev/null +++ b/external/keepers/src/config.js @@ -0,0 +1,47 @@ +const eventNames = { + LOG_VOUCHER_DELIVERED: 'LogVoucherDelivered', + LOG_ORDER_CREATED: 'LogOrderCreated', + LOG_CANCEL_FAULT_VOUCHER_SET: 'LogVoucherSetFaultCancel', + LOG_VOUCHER_CANCEL_FAULT: 'LogVoucherFaultCancel', + LOG_VOUCHER_COMPLAIN: 'LogVoucherComplain', + LOG_VOUCHER_REDEEMED: 'LogVoucherRedeemed', + LOG_VOUCHER_REFUNDED: 'LogVoucherRefunded', + LOG_TRANSFER_721: 'Transfer', + LOG_TRANSFER_1155_SINGLE: 'TransferSingle', + LOG_TRANSFER_1155_BATCH: 'TransferBatch' +} + +const apiUrl = process.env.API_URL + +const routes = { + createVoucherSupply: `${apiUrl}/voucher-sets/`, + setSupplyMeta: `${apiUrl}/voucher-sets/set-supply-meta`, + updateSupplyOnCancel: `${apiUrl}/voucher-sets/update-supply-oncancel`, + updateSupplyOnTransfer: `${apiUrl}/voucher-sets/update-supply-ontransfer`, + commitToBuy: `${apiUrl}/vouchers/commit-to-buy`, + updateVoucherDelivered: `${apiUrl}/vouchers/update-voucher-delivered`, + updateVoucherOnCommonEvent: `${apiUrl}/vouchers/update-from-common-event`, + //events-statistics + updateEventByCorrId: `${apiUrl}/events/update-by-correlation-id`, + updateEventBeTokenId: `${apiUrl}/events/update-by-token-id`, +} + +const statuses = { + CANCELLED: 'CANCELLED', + COMPLAINED: 'COMPLAINED', + REDEEMED: 'REDEEMED', + REFUNDED: 'REFUNDED' +} + +const errors = { + ECONNREFUSED: 'ECONNREFUSED', + NOT_FOUND: 404, + BAD_REQUEST: 400 +} + +module.exports = { + eventNames, + routes, + statuses, + errors +} \ No newline at end of file diff --git a/external/keepers/src/events.js b/external/keepers/src/events.js new file mode 100644 index 00000000..302e610a --- /dev/null +++ b/external/keepers/src/events.js @@ -0,0 +1,666 @@ +require('dotenv').config() + +const axios = require('axios').default; +const ethers = require('ethers'); +const provider = new ethers.providers.JsonRpcProvider(process.env.ALCHEMY_URL ? process.env.ALCHEMY_URL : ''); //if no url is provided, fallbacks to localhost:8545 + +const ERC1155ERC721 = require("./abis/ERC1155ERC721.json"); +const VoucherKernel = require("./abis/VoucherKernel.json"); +const BosonRouter = require("./abis/BosonRouter.json") + +const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' + +let VK, BR, ERC1155721; + +const { + eventNames, + routes, + statuses, + errors +} = require('./config') + +async function init() { + VK = new ethers.Contract(process.env.VOUCHER_KERNEL_ADDRESS, VoucherKernel.abi, provider); + BR = new ethers.Contract(process.env.BOSON_ROUTER_CONTRACT_ADDRESS, BosonRouter.abi, provider); + ERC1155721 = new ethers.Contract(process.env.TOKENS_CONTRACT_ADDRESS, ERC1155ERC721.abi, provider) + + axios.defaults.headers.common = { + Authorization: `Bearer ${process.env.GCLOUD_SECRET}` + } +} + +const RETRIES = 5 + +function retryUpdateWithSuccess(axiosMethod, route, metadata, retries) { + return new Promise((resolve, _) => { + setTimeout(async () => { + console.log('RETRIES LEFT: ', retries); + + if (retries == 0) { + return resolve(false); + } + + try { + const res = await axios[axiosMethod](route, metadata); + if (res.status == 200) { + console.log('Success!'); + return resolve(true) + } + } catch (error) { + + const apiOutage = error.code == errors.ECONNREFUSED + const recordNotFound = !!(error.response && error.response.status == errors.NOT_FOUND) + const badRequest = !!(error.response && error.response.status == errors.BAD_REQUEST) + + if (apiOutage || recordNotFound || badRequest) { + return resolve(retryUpdateWithSuccess(axiosMethod, route, metadata, retries - 1)); + } + + return resolve(false) + } + + }, 5000); + }) +} + +function logStart(event, updateID) { + console.log(`=== Update from event [${event}] started! ===`); + console.log(`=== ID [${updateID.toString()}] ===`); +} + +function logFinish(event, id, errorObj) { + + if (errorObj.hasError) { + console.log(`ERROR: ${errorObj.error.response ? errorObj.error.response.data : errorObj.error.code}`); + console.log(`=== Update from event: [${event}] finished with Error! ID: ${id.toString()} ===`); + return + } + + console.log(`=== ID [${id.toString()}] was successfully updated! ===`); +} + +async function logOrderCreated() { + BR.on(eventNames.LOG_ORDER_CREATED, async (_tokenIdSupply, _voucherOwner, _quantity, _paymentType, _correlationId) => { + + let errObj = {hasError: false} + let metadata; + + logStart(eventNames.LOG_ORDER_CREATED, _tokenIdSupply); + + try { + const promiseId = await VK.getPromiseIdFromSupplyId(_tokenIdSupply.toString()); + const promiseDetails = await VK.getPromiseData(promiseId) + const orderCosts = await VK.getOrderCosts(_tokenIdSupply) + + metadata = { + _tokenIdSupply: _tokenIdSupply.toString(), + voucherOwner: _voucherOwner.toLowerCase(), + qty: _quantity.toString(), + _paymentType: _paymentType.toString(), + _correlationId: _correlationId.toString(), + _promiseId: promiseDetails[0].toString(), + validFrom: (ethers.BigNumber.from(promiseDetails[2]).mul(1000)).toString(), + validTo: (ethers.BigNumber.from(promiseDetails[3]).mul(1000)).toString(), + price: orderCosts[0].toString(), + sellerDeposit: orderCosts[1].toString(), + buyerDeposit: orderCosts[2].toString() + } + + await axios.patch(`${routes.setSupplyMeta}`, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.setSupplyMeta, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_ORDER_CREATED, _tokenIdSupply, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_ORDER_CREATED, + _correlationId: _correlationId.toString(), + address: _voucherOwner.toLowerCase() + } + + await axios.patch(routes.updateEventByCorrId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventByCorrId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_ORDER_CREATED, _tokenIdSupply, errObj) + return + } + } + + logFinish(eventNames.LOG_ORDER_CREATED, _tokenIdSupply, errObj); + }) +} + +async function logVoucherSetFaultCancel() { + VK.on(eventNames.LOG_CANCEL_FAULT_VOUCHER_SET, async (_tokenIdSupply, _voucherOwner) => { + + let errObj = {hasError: false} + let metadata; + + logStart(eventNames.LOG_CANCEL_FAULT_VOUCHER_SET, _tokenIdSupply); + + try { + metadata = { + _tokenIdSupply: _tokenIdSupply.toString(), + voucherOwner: _voucherOwner.toLowerCase(), + qty: 0, + } + + await axios.patch(`${routes.updateSupplyOnCancel}`, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateSupplyOnCancel, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_CANCEL_FAULT_VOUCHER_SET, _tokenIdSupply, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_CANCEL_FAULT_VOUCHER_SET, + _tokenId: _tokenIdSupply.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_CANCEL_FAULT_VOUCHER_SET, _tokenIdSupply, errObj) + return + } + } + + logFinish(eventNames.LOG_CANCEL_FAULT_VOUCHER_SET, _tokenIdSupply, errObj); + }) +} + +async function logVoucherDelivered() { + VK.on(eventNames.LOG_VOUCHER_DELIVERED, async (_tokenIdSupply, _tokenIdVoucher, _issuer, _holder, _promiseId, _correlationId) => { + + let errObj = {hasError: false} + let metadata; + + logStart(eventNames.LOG_VOUCHER_DELIVERED, _tokenIdVoucher) + + try { + metadata = { + _tokenIdSupply: _tokenIdSupply.toString(), + _tokenIdVoucher: _tokenIdVoucher.toString(), + _issuer: _issuer.toLowerCase(), + _holder: _holder.toLowerCase(), + _promiseId: _promiseId.toString(), + _correlationId: _correlationId.toString(), + } + + await axios.patch(routes.updateVoucherDelivered, metadata) + + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateVoucherDelivered, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_DELIVERED, _tokenIdVoucher, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_VOUCHER_DELIVERED, + _correlationId: _correlationId.toString(), + address: _holder.toLowerCase() + } + + await axios.patch(routes.updateEventByCorrId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventByCorrId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_DELIVERED, _tokenIdVoucher, errObj) + return + } + } + + + logFinish(eventNames.LOG_VOUCHER_DELIVERED, _tokenIdVoucher, errObj); + + }) +} + +async function logVoucherFaultCancel() { + VK.on(eventNames.LOG_VOUCHER_CANCEL_FAULT, async (_tokenIdVoucher) => { + + let errObj = {hasError: false} + let metadata; + + logStart(eventNames.LOG_VOUCHER_CANCEL_FAULT, _tokenIdVoucher) + + try { + metadata = { + _tokenIdVoucher: _tokenIdVoucher.toString(), + [statuses.CANCELLED]: new Date().getTime(), + } + await axios.patch(routes.updateVoucherOnCommonEvent, metadata) + + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateVoucherOnCommonEvent, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + logFinish(eventNames.LOG_VOUCHER_CANCEL_FAULT, _tokenIdVoucher, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_VOUCHER_CANCEL_FAULT, + _tokenId: _tokenIdVoucher.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_CANCEL_FAULT, _tokenIdVoucher, errObj) + return + } + } + + logFinish(eventNames.LOG_VOUCHER_CANCEL_FAULT, _tokenIdVoucher, errObj) + }) +} + +async function logVoucherComplain() { + VK.on(eventNames.LOG_VOUCHER_COMPLAIN, async (_tokenIdVoucher) => { + + let errObj = {hasError: false} + let metadata; + + logStart(eventNames.LOG_VOUCHER_COMPLAIN, _tokenIdVoucher) + + try { + metadata = { + _tokenIdVoucher: _tokenIdVoucher.toString(), + [statuses.COMPLAINED]: new Date().getTime(), + }; + + await axios.patch(routes.updateVoucherOnCommonEvent, metadata) + + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateVoucherOnCommonEvent, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_COMPLAIN, _tokenIdVoucher, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_VOUCHER_COMPLAIN, + _tokenId: _tokenIdVoucher.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_COMPLAIN, _tokenIdVoucher, errObj) + return + } + } + + logFinish(eventNames.LOG_VOUCHER_COMPLAIN, _tokenIdVoucher, errObj) + + }) +} + +async function logVoucherRedeemed() { + VK.on(eventNames.LOG_VOUCHER_REDEEMED, async (_tokenIdVoucher, _holder) => { + + let errObj = {hasError: false} + + let metadata; + + logStart(eventNames.LOG_VOUCHER_REDEEMED, _tokenIdVoucher) + + try { + metadata = { + _tokenIdVoucher: _tokenIdVoucher.toString(), + _holder: _holder.toLowerCase(), + [statuses.REDEEMED]: new Date().getTime() + } + + await axios.patch(routes.updateVoucherOnCommonEvent, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateVoucherOnCommonEvent, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_REDEEMED, _tokenIdVoucher, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_VOUCHER_REDEEMED, + _tokenId: _tokenIdVoucher.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_REDEEMED, _tokenIdVoucher, errObj) + return + } + } + + logFinish(eventNames.LOG_VOUCHER_REDEEMED, _tokenIdVoucher, errObj) + }) +} + +async function logVoucherRefunded() { + VK.on(eventNames.LOG_VOUCHER_REFUNDED, async (_tokenIdVoucher) => { + + let errObj = {hasError: false} + + let metadata; + + logStart(eventNames.LOG_VOUCHER_REFUNDED, _tokenIdVoucher) + + try { + metadata = { + _tokenIdVoucher: _tokenIdVoucher.toString(), + [statuses.REFUNDED]: new Date().getTime() + } + + await axios.patch(routes.updateVoucherOnCommonEvent, metadata) + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateVoucherOnCommonEvent, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_REFUNDED, _tokenIdVoucher, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_VOUCHER_REFUNDED, + _tokenId: _tokenIdVoucher.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_VOUCHER_REFUNDED, _tokenIdVoucher, errObj) + return + } + } + + logFinish(eventNames.LOG_VOUCHER_REFUNDED, _tokenIdVoucher, errObj) + }) +} + +async function logTransfer721() { + ERC1155721.on(eventNames.LOG_TRANSFER_721, async (_from, _to, _tokenIdVoucher) => { + + let errObj = {hasError: false} + let metadata; + + // This is initial minting of a token from seller to buyer, not actual transfer from buyer to buyer + if (_from.toString() == ZERO_ADDRESS) return; + + logStart(eventNames.LOG_TRANSFER_721, _tokenIdVoucher) + + try { + const newOwnerCorrelationId = await BR.getCorrelationId(_to); + + metadata = { + _holder: _to.toLowerCase(), + _tokenIdVoucher: _tokenIdVoucher.toString(), + _correlationId: newOwnerCorrelationId.toString() + } + + await axios.patch(routes.updateVoucherOnCommonEvent, metadata) + + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateVoucherOnCommonEvent, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_TRANSFER_721, _tokenIdVoucher, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_TRANSFER_721, + _tokenId: _tokenIdVoucher.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_TRANSFER_721, _tokenIdVoucher, errObj) + return + } + } + + logFinish(eventNames.LOG_TRANSFER_721, _tokenIdVoucher, errObj); + }) +} + +async function logTransferSingle1155() { + ERC1155721.on(eventNames.LOG_TRANSFER_1155_SINGLE, async (_operator, oldSupplyOwner, newSupplyOwner, _tokenIdSupply, qty) => { + + let errObj = {hasError: false} + let metadata + + // When buyer commits a voucher the transfer is emitted twice for minting 1 x 721 and burning 1 x 1155 for the buyer and the seller respectively. + // Not an events we want to handle + if (oldSupplyOwner.toString() == ZERO_ADDRESS || newSupplyOwner.toString() == ZERO_ADDRESS) return; + + logStart(eventNames.LOG_TRANSFER_1155_SINGLE, _tokenIdSupply) + + try { + + const newOwnerCorrelationId = await BR.getCorrelationId(newSupplyOwner); + + metadata = { + voucherOwner: newSupplyOwner.toLowerCase(), + voucherSupplies: [_tokenIdSupply], + quantities: [qty], + _correlationId: newOwnerCorrelationId.toString() + } + + await axios.patch(routes.updateSupplyOnTransfer, metadata) + + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateSupplyOnTransfer, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_TRANSFER_1155_SINGLE, _tokenIdSupply, errObj) + return + } + } + + try { + metadata = { + name: eventNames.LOG_TRANSFER_1155_SINGLE, + _tokenId: _tokenIdSupply.toString() + } + + await axios.patch(routes.updateEventBeTokenId, metadata) + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventBeTokenId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_TRANSFER_1155_SINGLE, _tokenIdSupply, errObj) + return + } + } + + logFinish(eventNames.LOG_TRANSFER_1155_SINGLE, _tokenIdSupply, errObj) + }) +} + +async function logTransferBatch1155() { + ERC1155721.on(eventNames.LOG_TRANSFER_1155_BATCH, async (_operator, oldSupplyOwner, newSupplyOwner, _tokenIdSupplies, quantities) => { + + let errObj = {hasError: false} + let metadata + + // When buyer commits a voucher the transfer is emitted twice for minting 1 x 721 and burning 1 x 1155 for the buyer and the seller respectively. + // Not an events we want to handle + if (oldSupplyOwner.toString() == ZERO_ADDRESS || newSupplyOwner.toString() == ZERO_ADDRESS) return; + + logStart(eventNames.LOG_TRANSFER_1155_BATCH, _tokenIdSupplies) + + try { + + const newOwnerCorrelationId = await BR.getCorrelationId(newSupplyOwner); + + metadata = { + voucherOwner: newSupplyOwner.toLowerCase(), + voucherSupplies: _tokenIdSupplies, + quantities: quantities, + _correlationId: newOwnerCorrelationId.toString() + } + + await axios.patch(routes.updateSupplyOnTransfer, metadata) + + } catch (error) { + + if (!await retryUpdateWithSuccess('patch', routes.updateSupplyOnTransfer, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_TRANSFER_1155_BATCH, _tokenIdSupplies, errObj) + return + } + } + + // TODO this will need a little rework if we are to support this from the reference app. (Event Statistics related) + // This is not the most accurate way for detecting the record, as the corrId might change (if new tx is mined for this user) in the mean time before we get the one this relates to + try { + const oldOwnerCorrelationId = await BR.getCorrelationId(oldSupplyOwner); + metadata = { + name: eventNames.LOG_TRANSFER_1155_BATCH, + _correlationId: oldOwnerCorrelationId.toString(), + address: oldSupplyOwner.toLowerCase() + } + + await axios.patch(routes.updateEventByCorrId, metadata) + + } catch (error) { + if (!await retryUpdateWithSuccess('patch', routes.updateEventByCorrId, metadata, RETRIES)) { + errObj = { + hasError: true, + error + } + + logFinish(eventNames.LOG_TRANSFER_1155_BATCH, _tokenIdSupplies, errObj) + return + } + } + + logFinish(eventNames.LOG_TRANSFER_1155_BATCH, _tokenIdSupplies, errObj) + }) +} + +async function run() { + await Promise.all([ + logOrderCreated(), + logVoucherSetFaultCancel(), + logVoucherDelivered(), + logVoucherFaultCancel(), + logVoucherComplain(), + logVoucherRedeemed(), + logVoucherRefunded(), + logTransfer721(), + logTransferSingle1155(), + logTransferBatch1155() + ]) +} + +module.exports = { + init, + run +} diff --git a/external/keepers/src/index.js b/external/keepers/src/index.js new file mode 100644 index 00000000..a7584a86 --- /dev/null +++ b/external/keepers/src/index.js @@ -0,0 +1,9 @@ +const events = require('./events'); + +(async () => { + console.log("Event Listeners started..."); + + events.init(); + + await events.run() +})(); \ No newline at end of file diff --git a/external/lambdas/.env.example b/external/lambdas/.env.example new file mode 100644 index 00000000..34c681c0 --- /dev/null +++ b/external/lambdas/.env.example @@ -0,0 +1,13 @@ +BOSON_ROUTER_CONTRACT_ADDRESS="0x..." +CASHIER_ADDRESS="0x..." +VOUCHER_KERNEL_ADDRESS="0x..." +EXECUTOR_PRIVATE_KEY="0x..." +API_URL="http://localhost:3000" +# generated on http://jwtbuilder.jamiekurtz.com with payload = {token: } and key=, +# where GCLOUD_SECRET and TOKEN_SECRET values are defined in the env var of the API server +GCLOUD_SECRET="GENERATED_TOKEN" + +#Serves as a RPC provider if you want to connect to a certain network. If omitted will fallback to local rpc at port 8545 (default) +PROVIDER_URL="https://eth-desired-network.alchemyapi.io/v2/your-api-key" +#If the provider requires a secret authorization field in the request header (like Infura) +PROVIDER_SECRET= \ No newline at end of file diff --git a/external/lambdas/README.md b/external/lambdas/README.md new file mode 100644 index 00000000..a3ba0ff3 --- /dev/null +++ b/external/lambdas/README.md @@ -0,0 +1,39 @@ +# Triggers + +#TODO +All configs and utils are the same! They must exist only once, but due to the lambdas being compressed with all their dependencies they need to be in the folder where all other codebase is. This should be avoided in future. + + +Trigger functions check all records that we have in the DB whether an admin / executor should trigger particular status of a voucher. They are responsible for triggering the expiration, finalization and distribution of payments and deposits when certain conditions are met. + + +### Local Development +In order to run the triggers locally you would need to have your contracts deployed on a local RPC. Then you should go in: + +* triggerExpirations/src/config.js +* triggerFinalizations/src/config.js +* triggerWithdrawals/src/config.js + +and apply all necessary information in the local configs function. + +Once that has been set you would need to go in: + +* triggerExpirations/src/index.js +* triggerFinalizations/src/index.js +* triggerWithdrawals/src/index.js + +and instead of: + +```javascript +const config = await getConfigParams(SecretIdDev, "dev"); +``` + +replace with: +```javascript +const config = await getConfigParams(SecretIdDev, "local"); +``` + +### Run +```shell +npm run start:local:triggers +``` \ No newline at end of file diff --git a/external/lambdas/localConfigs.js b/external/lambdas/localConfigs.js new file mode 100644 index 00000000..e814c3e1 --- /dev/null +++ b/external/lambdas/localConfigs.js @@ -0,0 +1,39 @@ +const ethers = require("ethers"); +const resolve = require('path').resolve; +require('dotenv').config({path: resolve(__dirname, './.env')}) + +const getLocalConfigs = () => { + const apiUrl = process.env.API_URL; + + let connectionHeaders = {}; + if (process.env.PROVIDER_SECRET) { + const data = `:${process.env.PROVIDER_SECRET}`; + const buff = Buffer.from(data); + const b64ProviderSecret = buff.toString('base64'); + connectionHeaders = { + 'Authorization': `Basic ${b64ProviderSecret}` + }; + } + + return { + VOUCHER_KERNEL_ADDRESS: process.env.VOUCHER_KERNEL_ADDRESS, + CASHIER_ADDRESS: process.env.CASHIER_ADDRESS, + EXECUTOR_PRIVATE_KEY: process.env.EXECUTOR_PRIVATE_KEY, + API_URL: apiUrl, + ALL_VOUCHERS_URL: `${apiUrl}/vouchers/all`, + UPDATE_STATUS_URL: `${apiUrl}/vouchers/update-status-from-keepers`, + WITHDRAW_VOUCHER_URL: `${apiUrl}/payments/create-payment`, + GCLOUD_SECRET: process.env.GCLOUD_SECRET, + GAS_LIMIT: "6000000", + PROVIDER: new ethers.providers.JsonRpcProvider( + { + url: process.env.PROVIDER_URL, + headers: { + connectionHeaders + } + } + ), + } +}; + +module.exports = getLocalConfigs; \ No newline at end of file diff --git a/external/lambdas/localTriggers.js b/external/lambdas/localTriggers.js new file mode 100644 index 00000000..bd3360bb --- /dev/null +++ b/external/lambdas/localTriggers.js @@ -0,0 +1,19 @@ +const triggerInterval = 600000; //10 minutes in millis +const finalizationTrigger = require('./triggerFinalizations/src/index').handler; +const withdrawalsTrigger = require('./triggerWithdrawals/src/index').handler; +const expiryTrigger = require('./triggerExpirations/src/index').handler; +const getLocalConfigs = require('./localConfigs') + +const config = getLocalConfigs(); + +// Run first before running the loop +finalizationTrigger(config); +withdrawalsTrigger(config); +expiryTrigger(config); + + +setInterval(() => { + finalizationTrigger(config); + withdrawalsTrigger(config); + expiryTrigger(config); +}, triggerInterval); diff --git a/external/lambdas/triggerExpirations/create-fn.sh b/external/lambdas/triggerExpirations/create-fn.sh new file mode 100644 index 00000000..31841fa9 --- /dev/null +++ b/external/lambdas/triggerExpirations/create-fn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +aws lambda create-function --function-name "triggerExpirationsDev" --runtime "nodejs14.x" --role "arn:aws:iam::237351624248:role/aws-basic-lambda-executon" --timeout 900 --handler "src/index.handler" --region "us-east-2" --zip-file "fileb://./src.zip" \ No newline at end of file diff --git a/external/lambdas/triggerExpirations/src/abis/VoucherKernel.json b/external/lambdas/triggerExpirations/src/abis/VoucherKernel.json new file mode 100644 index 00000000..ce42ce3c --- /dev/null +++ b/external/lambdas/triggerExpirations/src/abis/VoucherKernel.json @@ -0,0 +1,61300 @@ +{ + "contractName": "VoucherKernel", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_tokensContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositSe", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositBu", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + } + ], + "name": "createTokenSupplyID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, + { + "internalType": "address", + "name": "_tokenPrice", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenDeposits", + "type": "address" + } + ], + "name": "createPaymentMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "fillOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_qty", + "type": "uint256" + } + ], + "name": "burnSupplyOnPause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "redeem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "complain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "cancelOrFault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "cancelOrFaultVoucherSet", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "setPaymentReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "setDepositsReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "triggerExpiration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "triggerFinalizeVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_newSeller", + "type": "address" + } + ], + "name": "setSupplyHolderOnTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_bosonRouterAddress", + "type": "address" + } + ], + "name": "setBosonRouterAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_cashierAddress", + "type": "address" + } + ], + "name": "setCashierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_complainPeriod", + "type": "uint256" + } + ], + "name": "setComplainPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cancelFaultPeriod", + "type": "uint256" + } + ], + "name": "setCancelFaultPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "getPromiseKey", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getIdSupplyFromVoucher", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getPromiseIdFromVoucherId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenSupplyId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "getRemQtyForSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getBuyerOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSellerDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSupplyHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_promiseKey", + "type": "bytes32" + } + ], + "name": "getPromiseData", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getVoucherStatus", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getVoucherHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPriceToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherDepositToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPaymentMethod", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isInValidityPeriod", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isVoucherTransferable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getBosonRouterAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCashierAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + } + ], + "name": "getTokenNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTypeId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getComplainPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCancelFaultPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getPromiseIdFromSupplyId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTokensContractAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokensContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newBosonRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogBosonRouterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newCancelFaultPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCancelFaultPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newCashier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCashierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newComplainPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogComplainPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogExpirationTriggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogFinalizeVoucher\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"LogFundsReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"LogPromiseCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherComplain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"LogVoucherDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"}],\"name\":\"LogVoucherRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"LogVoucherSetFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_qty\",\"type\":\"uint256\"}],\"name\":\"burnSupplyOnPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"cancelOrFault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"cancelOrFaultVoucherSet\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"complain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_tokenPrice\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenDeposits\",\"type\":\"address\"}],\"name\":\"createPaymentMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositSe\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositBu\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"createTokenSupplyID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"fillOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBosonRouterAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getBuyerOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancelFaultPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCashierAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getComplainPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getIdSupplyFromVoucher\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_promiseKey\",\"type\":\"bytes32\"}],\"name\":\"getPromiseData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromSupplyId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromVoucherId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"getPromiseKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenSupplyId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getRemQtyForSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSellerDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSupplyHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"getTokenNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokensContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTypeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherDepositToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPaymentMethod\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPriceToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherStatus\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isInValidityPeriod\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isVoucherTransferable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bosonRouterAddress\",\"type\":\"address\"}],\"name\":\"setBosonRouterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_cancelFaultPeriod\",\"type\":\"uint256\"}],\"name\":\"setCancelFaultPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_cashierAddress\",\"type\":\"address\"}],\"name\":\"setCashierAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_complainPeriod\",\"type\":\"uint256\"}],\"name\":\"setComplainPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setDepositsReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setPaymentReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_newSeller\",\"type\":\"address\"}],\"name\":\"setSupplyHolderOnTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerExpiration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerFinalizeVoucher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\",\"kind\":\"dev\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"details\":\"Token ID is derived following the same principles for both ERC-1155 and ERC-721\",\"params\":{\"_issuer\":\"The address of the token issuer\",\"_qty\":\"qty that should be burned\",\"_tokenIdSupply\":\"ID of the token type\"}},\"cancelOrFault(uint256,address)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"cancelOrFaultVoucherSet(uint256,address)\":{\"params\":{\"_issuer\":\"owner of the voucher\",\"_tokenIdSupply\":\"ID of the voucher set\"}},\"complain(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"createPaymentMethod(uint256,uint8,address,address)\":{\"params\":{\"_paymentMethod\":\"might be ETHETH, ETHTKN, TKNETH or TKNTKN\",\"_tokenDeposits\":\"token address which will hold the funds for the deposits of the voucher\",\"_tokenIdSupply\":\"_tokenIdSupply of the voucher set this is related to\",\"_tokenPrice\":\"token address which will hold the funds for the price of the voucher\"}},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"_depositBu\":\"Buyer's deposit\",\"_depositSe\":\"Seller's deposit\",\"_price\":\"Price (payment amount)\",\"_seller\":\"seller of the promise\",\"_validFrom\":\"Start of valid period\",\"_validTo\":\"End of valid period\"}},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"params\":{\"_correlationId\":\"ID of the current interaction with the smart contract for a specific user\",\"_holder\":\"Address of the recipient of the voucher (ERC-721)\",\"_issuer\":\"Address of the token's issuer\",\"_paymentMethod\":\"method being used for that particular order that needs to be fulfilled\",\"_tokenIdSupply\":\"ID of the supply token (ERC-1155)\"}},\"getBosonRouterAddress()\":{\"returns\":{\"_0\":\"Address of the Boson Router contract\"}},\"getBuyerOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Buyer's deposit)\"}},\"getCancelFaultPeriod()\":{\"returns\":{\"_0\":\"cancel or fault period\"}},\"getCashierAddress()\":{\"returns\":{\"_0\":\"Address of the Cashier contract\"}},\"getComplainPeriod()\":{\"returns\":{\"_0\":\"complain period\"}},\"getIdSupplyFromVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the supply token\"}},\"getOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\"}},\"getPromiseData(bytes32)\":{\"params\":{\"_promiseKey\":\"ID of the promise\"},\"returns\":{\"_0\":\"promise data not returned by other accessor methods\"}},\"getPromiseIdFromSupplyId(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseIdFromVoucherId(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseKey(uint256)\":{\"params\":{\"_idx\":\"Index in the array of promise keys\"},\"returns\":{\"_0\":\"Promise ID\"}},\"getRemQtyForSupply(uint256,address)\":{\"params\":{\"_owner\":\"holder of the Token Supply\",\"_tokenSupplyId\":\"Token supply ID\"},\"returns\":{\"_0\":\"remaining quantity\"}},\"getSellerDeposit(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns sellers deposit\"}},\"getSupplyHolder(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getTokenNonce(address)\":{\"params\":{\"_seller\":\"Address of the seller\"},\"returns\":{\"_0\":\"The seller's nonce\"}},\"getTokensContractAddress()\":{\"returns\":{\"_0\":\"Address of ERC1155ERC721 contract\"}},\"getTypeId()\":{\"returns\":{\"_0\":\"type Id\"}},\"getVoucherDepositToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherHolder(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getVoucherPaymentMethod(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"payment method\"}},\"getVoucherPriceToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherStatus(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Status of the voucher (via enum)\"}},\"isInValidityPeriod(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"isVoucherTransferable(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"refund(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setBosonRouterAddress(address)\":{\"params\":{\"_bosonRouterAddress\":\"The address of the BR contract\"}},\"setCancelFaultPeriod(uint256)\":{\"params\":{\"_cancelFaultPeriod\":\"the new value for cancelOrFault period (in number of seconds)\"}},\"setCashierAddress(address)\":{\"params\":{\"_cashierAddress\":\"The address of the BR contract\"}},\"setComplainPeriod(uint256)\":{\"params\":{\"_complainPeriod\":\"the new value for complain period (in number of seconds)\"}},\"setDepositsReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setPaymentReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setSupplyHolderOnTransfer(uint256,address)\":{\"params\":{\"_newSeller\":\"new holder of the supply\",\"_tokenIdSupply\":\"_tokenIdSupply which will be transferred\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"triggerExpiration(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"triggerFinalizeVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}}},\"title\":\"VoucherKernel contract is controlling the core business logic\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"notice\":\"Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\"},\"cancelOrFault(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\"},\"cancelOrFaultVoucherSet(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\"},\"complain(uint256,address)\":{\"notice\":\"Issue a complain for a voucher\"},\"createPaymentMethod(uint256,uint8,address,address)\":{\"notice\":\"Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\"},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future).\"},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"notice\":\"Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\"},\"getBosonRouterAddress()\":{\"notice\":\"Get address of the Boson Router to which this contract points\"},\"getBuyerOrderCosts(uint256)\":{\"notice\":\"Get Buyer costs required to make an order for a supply token\"},\"getCancelFaultPeriod()\":{\"notice\":\"Get the cancel or fault period\"},\"getCashierAddress()\":{\"notice\":\"Get address of the Cashier contract to which this contract points\"},\"getComplainPeriod()\":{\"notice\":\"Get the complain period\"},\"getIdSupplyFromVoucher(uint256)\":{\"notice\":\"Get the supply token ID from a voucher token\"},\"getOrderCosts(uint256)\":{\"notice\":\"Get all necessary funds for a supply token\"},\"getPromiseData(bytes32)\":{\"notice\":\"Get promise data not retrieved by other accessor functions\"},\"getPromiseIdFromSupplyId(uint256)\":{\"notice\":\"Get the promise ID from a voucher set\"},\"getPromiseIdFromVoucherId(uint256)\":{\"notice\":\"Get the promise ID from a voucher token\"},\"getPromiseKey(uint256)\":{\"notice\":\"Get the promise ID at specific index\"},\"getRemQtyForSupply(uint256,address)\":{\"notice\":\"Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\"},\"getSellerDeposit(uint256)\":{\"notice\":\"Get Seller deposit\"},\"getSupplyHolder(uint256)\":{\"notice\":\"Get the holder of a supply\"},\"getTokenNonce(address)\":{\"notice\":\"Get the token nonce for a seller\"},\"getTokensContractAddress()\":{\"notice\":\"Get the address of ERC1155ERC721 contract\"},\"getTypeId()\":{\"notice\":\"Get the current type Id\"},\"getVoucherDepositToken(uint256)\":{\"notice\":\"Get the address of the token where the deposits for the supply are held\"},\"getVoucherHolder(uint256)\":{\"notice\":\"Get the holder of a voucher\"},\"getVoucherPaymentMethod(uint256)\":{\"notice\":\"Get the payment method for a particular _tokenIdSupply\"},\"getVoucherPriceToken(uint256)\":{\"notice\":\"Get the address of the token where the price for the supply is held\"},\"getVoucherStatus(uint256)\":{\"notice\":\"Get the current status of a voucher\"},\"isInValidityPeriod(uint256)\":{\"notice\":\"Checks whether a voucher is in valid period for redemption (between start date and end date)\"},\"isVoucherTransferable(uint256)\":{\"notice\":\"Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\"},\"pause()\":{\"notice\":\"Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function.\"},\"redeem(uint256,address)\":{\"notice\":\"Redemption of the vouchers promise\"},\"refund(uint256,address)\":{\"notice\":\"Refunding a voucher\"},\"setBosonRouterAddress(address)\":{\"notice\":\"Set the address of the Boson Router contract\"},\"setCancelFaultPeriod(uint256)\":{\"notice\":\"Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setCashierAddress(address)\":{\"notice\":\"Set the address of the Cashier contract\"},\"setComplainPeriod(uint256)\":{\"notice\":\"Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setDepositsReleased(uint256)\":{\"notice\":\"Mark voucher token that the deposits were released\"},\"setPaymentReleased(uint256)\":{\"notice\":\"Mark voucher token that the payment was released\"},\"setSupplyHolderOnTransfer(uint256,address)\":{\"notice\":\"Set the address of the new holder of a _tokenIdSupply on transfer\"},\"triggerExpiration(uint256)\":{\"notice\":\"Mark voucher token as expired\"},\"triggerFinalizeVoucher(uint256)\":{\"notice\":\"Mark voucher token to the final status\"},\"unpause()\":{\"notice\":\"Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":\"VoucherKernel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol\":{\"keccak256\":\"0x867daada4cae6f8f547fc7eba2db9f8aa282228901c125e773dfd808943a235a\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://e50dc3939a48de65fd3ba74d54c20d2370adad18ddc97c8dca721839d20e0224\",\"dweb:/ipfs/QmcL6Z8wCcQfgcTQ2UH4vyJ84hYckJW7LGpN6oKg2kQKBm\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":{\"keccak256\":\"0x3d7decc1350a42e2a425ef915c8d0ddf5143289ee9e578c64727cf1393969836\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://fb17e7fca89026ae4fdfed6887bf9027341161038f1a4f5693257874b42102f3\",\"dweb:/ipfs/QmckQ5mpGzPjVSv8u2ZD6zkv5JDf1THuQMSodaW75HwFQJ\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol\":{\"keccak256\":\"0x34796b446a93c5ac705507913582dcab993b7cc86429c5e272b99597b64e51d9\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://51ba6851cc9c12c62f8ba7f20780880d590f1030c265edee05158064b9f67a36\",\"dweb:/ipfs/QmNidTbLJeMMFFk3iftCeWP9pLsFxdSHsckvakXgKnxoKC\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol\":{\"keccak256\":\"0xb4b2da06924caa82a63fa15eebec3357f13bd6693a9601fc3e37689e8aca80fc\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://ee602fbf4081c7db5fab98da408eb74c5c3e49a843acf142f259ebf788012bc8\",\"dweb:/ipfs/QmQ6ASnm4weSxGmcy9PU4oGZAmnDKdrW4AQN4dDmuZJUii\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x39c55885f7e34a407316f0f15d337baaf69723252f154d7c727c97f818b23e5e\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://3c297eddef2d21c163eecc6758ae3fe9872594025eff98f22d3cb84d4771df9f\",\"dweb:/ipfs/QmTvQ8URMHEHy1GTBfYqkQZXcu1jb9DpxTWUbNFX7BrEX8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xff346a09a5d08dfe7196c4516d78522da0dec1bde99e04e0f3b269f96796d29f\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://197cdfdd6994addd3ef4702e3b367d4563f907106c6be50b2932cb7d336daf0c\",\"dweb:/ipfs/QmSKe383xVyeY8ecpEPHdvEevMVDR121Qqq4udmeaipXQe\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol\":{\"keccak256\":\"0x7b8243200a7630a258025cc2a9fa2fec0ec9f009b0f6e4b7dc0b0bdcb64b2761\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7a1037cfbea713ba1649ec7c9c44570e012cf3f2eafcec3fd7e8da323e81248b\",\"dweb:/ipfs/QmaZzB7rN4RyPhGgfn9Fkvf5K6ynd4owHj6vA8iMH2k3N9\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://19c0dfbf7bb7744af0c03156e372d0096e0d07de8805ead7722243b8b42276a3\",\"dweb:/ipfs/QmPEFDvi6mJZ3sVii3uBs3CQzAARXPFwCKiHG5zkiCmC4V\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x4c5617b558186dc4b2b994b18ab9236410cd2dd1d9ad1213bbcca2e1d5321ce8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27b103fe3d550cf3717751a2c67e14008806af25baa3916b5717eeb68a2767ad\",\"dweb:/ipfs/QmS6gG9XVCx3qco7ewaSgJdcQRfZuurqxqPnKmRJ3Dj7Fg\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620041fc380380620041fc833981810160405260208110156200003757600080fd5b5051600062000045620000ce565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b039290921691909117905562093a80600c819055600d55620000d2565b3390565b61411a80620000e26000396000f3fe608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "sourceMap": "1169:47176:6:-:0;;;7484:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7484:169:6;867:17:22;887:12;:10;:12::i;:::-;909:6;:18;;-1:-1:-1;;;;;;909:18:22;-1:-1:-1;;;;;909:18:22;;;;;;;942:43;;909:18;;-1:-1:-1;909:18:22;942:43;;909:6;;942:43;-1:-1:-1;928:5:29;918:15;;-1:-1:-1;;;;918:15:29;;;-1:-1:-1;7532:32:6;;-1:-1:-1;;;;;;7532:32:6;-1:-1:-1;;;;;7532:32:6;;;;;;;;;;7594:10;7577:14;:27;;;7615:17;:30;1169:47176;;598:104:27;685:10;598:104;:::o;1169:47176:6:-;;;;;;;", + "deployedSourceMap": "1169:47176:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47239:151;;;:::i;:::-;;;;;;;;;;;;;;;;38179:190;;;;;;;;;;;;;;;;-1:-1:-1;38179:190:6;;:::i;44418:205::-;;;;;;;;;;;;;;;;-1:-1:-1;44418:205:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;41358:243;;;;;;;;;;;;;;;;-1:-1:-1;41358:243:6;;:::i;:::-;;;;-1:-1:-1;;;;;41358:243:6;;;;;;;;;;;;;;42355:589;;;;;;;;;;;;;;;;-1:-1:-1;42355:589:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8074:81;;;:::i;:::-;;29860:573;;;;;;;;;;;;;;;;-1:-1:-1;29860:573:6;;;;;;-1:-1:-1;;;;;29860:573:6;;:::i;47851:196::-;;;;;;;;;;;;;;;;-1:-1:-1;47851:196:6;;:::i;45673:295::-;;;;;;;;;;;;;;;;-1:-1:-1;45673:295:6;;:::i;:::-;;;;;;;;;;;;;;;;;;1035:84:29;;;:::i;32613:2261:6:-;;;;;;;;;;;;;;;;-1:-1:-1;32613:2261:6;;:::i;21299:4356::-;;;;;;;;;;;;;;;;-1:-1:-1;21299:4356:6;;;;;;-1:-1:-1;;;;;21299:4356:6;;:::i;1700:145:22:-;;;:::i;17796:246:6:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17796:246:6;;;;;;;;;;;;;:::i;30666:396::-;;;;;;;;;;;;;;;;-1:-1:-1;30666:396:6;;:::i;8614:1740::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8614:1740:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;20288:816::-;;;;;;;;;;;;;;;;-1:-1:-1;20288:816:6;;;;;;-1:-1:-1;;;;;20288:816:6;;:::i;19015:1008::-;;;;;;;;;;;;;;;;-1:-1:-1;19015:1008:6;;;;;;-1:-1:-1;;;;;19015:1008:6;;:::i;37819:160::-;;;;;;;;;;;;;;;;-1:-1:-1;37819:160:6;;:::i;7835:77::-;;;:::i;40878:247::-;;;;;;;;;;;;;;;;-1:-1:-1;40878:247:6;;:::i;35210:258::-;;;;;;;;;;;;;;;;-1:-1:-1;35210:258:6;;;;;;-1:-1:-1;;;;;35210:258:6;;:::i;36815:234::-;;;;;;;;;;;;;;;;-1:-1:-1;36815:234:6;;:::i;1068:85:22:-;;;:::i;47006:135:6:-;;;:::i;47502:157::-;;;:::i;46125:160::-;;;:::i;44813:623::-;;;;;;;;;;;;;;;;-1:-1:-1;44813:623:6;;:::i;43997:213::-;;;;;;;;;;;;;;;;-1:-1:-1;43997:213:6;;:::i;41817:337::-;;;;;;;;;;;;;;;;-1:-1:-1;41817:337:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13347:790;;;;;;;;;;;;;;;;-1:-1:-1;13347:790:6;;;-1:-1:-1;;;;;13347:790:6;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;38559:438::-;;;;;;;;;;;;;;;;-1:-1:-1;38559:438:6;;:::i;35623:397::-;;;;;;;;;;;;;;;;-1:-1:-1;35623:397:6;-1:-1:-1;;;;;35623:397:6;;:::i;36166:387::-;;;;;;;;;;;;;;;;-1:-1:-1;36166:387:6;-1:-1:-1;;;;;36166:387:6;;:::i;48181:161::-;;;:::i;10896:572::-;;;;;;;;;;;;;;;;-1:-1:-1;10896:572:6;;;;;;;;;;-1:-1:-1;;;;;10896:572:6;;;;;;;;;;;;:::i;31739:736::-;;;;;;;;;;;;;;;;-1:-1:-1;31739:736:6;;:::i;39752:424::-;;;;;;;;;;;;;;;;-1:-1:-1;39752:424:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;39279:232;;;;;;;;;;;;;;;;-1:-1:-1;39279:232:6;;;;;;-1:-1:-1;;;;;39279:232:6;;:::i;43558:208::-;;;;;;;;;;;;;;;;-1:-1:-1;43558:208:6;;:::i;46747:169::-;;;;;;;;;;;;;;;;-1:-1:-1;46747:169:6;-1:-1:-1;;;;;46747:169:6;;:::i;31212:398::-;;;;;;;;;;;;;;;;-1:-1:-1;31212:398:6;;:::i;37324:252::-;;;;;;;;;;;;;;;;-1:-1:-1;37324:252:6;;:::i;1994:240:22:-;;;;;;;;;;;;;;;;-1:-1:-1;1994:240:22;-1:-1:-1;;;;;1994:240:22;;:::i;25836:3701:6:-;;;;;;;;;;;;;;;;-1:-1:-1;25836:3701:6;;;;;;-1:-1:-1;;;;;25836:3701:6;;:::i;43126:205::-;;;;;;;;;;;;;;;;-1:-1:-1;43126:205:6;;:::i;46441:151::-;;;:::i;40417:288::-;;;;;;;;;;;;;;;;-1:-1:-1;40417:288:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;47239:151;47368:14;;47239:151;:::o;38179:190::-;-1:-1:-1;;;;;;38334:27:6;;38179:190;;;;:::o;44418:205::-;44541:5;44571:30;;;:14;:30;;;;;:44;;;;44418:205::o;41358:243::-;41473:7;41519:29;;;:13;:29;;;;;;;;;41566:20;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;41566:27:6;;41358:243::o;42355:589::-;42486:5;42623:31;;;:14;:31;;;;;:38;;;42805:51;;;42740:50;42871:54;;;;42623:38;;;;;;42676:49;;;;;42740:50;;;;;;;;42805:51;42871:54;42355:589::o;8074:81::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8137:10:::1;:8;:10::i;:::-;8074:81::o:0;29860:573::-;6454:18;;30035:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;::::1;;30103:7:6::2;-1:-1:-1::0;;;;;30068:42:6::2;:31;30084:14;30068:15;:31::i;:::-;-1:-1:-1::0;;;;;30068:42:6::2;;30060:71;;;::::0;;-1:-1:-1;;;30060:71:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30060:71:6;;;;;;;;;;;;;::::2;;30144:14;30161:43;30180:14;30196:7;30161:18;:43::i;:::-;30144:60;;30234:1;30225:6;:10;30217:34;;;::::0;;-1:-1:-1;;;30217:34:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30217:34:6;;;;;;;;;;;;;::::2;;30279:14;::::0;30264:68:::2;::::0;;-1:-1:-1;;;30264:68:6;;-1:-1:-1;;;;;30264:68:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;30279:14;;;::::2;::::0;30264:35:::2;::::0;:68;;;;;30279:14:::2;::::0;30264:68;;;;;;;30279:14;;30264:68;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;30350:49:6::2;::::0;;;;;-1:-1:-1;;;;;30350:49:6;::::2;;::::0;::::2;::::0;;;::::2;::::0;-1:-1:-1;30350:49:6;;;;;;;;-1:-1:-1;30350:49:6::2;30419:6:::0;29860:573;-1:-1:-1;;;29860:573:6:o;47851:196::-;47977:7;48010:29;;;:13;:29;;;;;;;47851:196::o;45673:295::-;45795:4;45839:31;;;:14;:31;;;;;:49;;;;;;;:120;;-1:-1:-1;45909:31:6;;;;:14;:31;;;;;:50;;;;;;45839:120;45837:123;;45673:295;-1:-1:-1;;45673:295:6:o;1035:84:29:-;1082:4;1105:7;-1:-1:-1;;;1105:7:29;;;;;1035:84::o;32613:2261:6:-;32707:20;32699:47;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;;;;32849:13;32865:31;;;:14;:31;;;;;:38;;;32925:28;32865:38;;32925:8;:28::i;:::-;32924:29;32916:59;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;;;;33070:9;33090:23;;:::i;:::-;33129:8;:52;33138:42;33164:15;33138:25;:42::i;:::-;33129:52;;;;;;;;;;;;;;-1:-1:-1;33129:52:6;33090:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33090:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33198:31:6;;33207:7;;33198:8;:31::i;:::-;33194:1432;;;33250:35;33259:7;488:1:5;33250:8:6;:35::i;:::-;33246:418;;;33363:4;33356:11;;33246:418;;;33525:17;;33447:31;;;;:14;:31;;;;;:54;;;:95;33411:15;:131;33389:275;;33644:4;33637:11;;33389:275;33194:1432;;;33699:35;33708:7;488:1:5;33699:8:6;:35::i;:::-;:152;;;;-1:-1:-1;33837:14:6;;33783:31;;;;:14;:31;;;;;:51;;;:68;33751:15;:100;;33699:152;33681:945;;;33941:4;33934:11;;33681:945;;;33981:32;34005:7;33981:23;:32::i;:::-;:60;;;;34017:24;34033:7;34017:15;:24::i;:::-;33963:663;;;34296:14;;34221:31;;;;:14;:31;;;;;:51;;;:89;34185:15;:125;34163:209;;34352:4;34345:11;;33963:663;;;34393:23;34408:7;34393:14;:23::i;:::-;34389:237;;;34553:14;;34534:8;:16;;;:33;34515:15;:52;34511:104;;34595:4;34588:11;;34511:104;34642:4;34638:229;;;34704:84;34738:7;532:1:5;34704:15:6;:84::i;:::-;34663:31;;;;:14;:31;;;;;;;;;:125;;-1:-1:-1;;34663:125:6;;;;;;;;;;;;;34808:47;;;;;34844:10;34808:47;;;;;;;;;;;;;;;;;;;34638:229;32613:2261;;;;:::o;21299:4356::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;21471:15;;21488:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;21548:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;21539:62:::3;::::0;21548:38:::3;;437:1:5;21539:8:6;:62::i;:::-;21538:63;21516:131;;;::::0;;-1:-1:-1;;;21516:131:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21516:131:6;;;;;;;;;;;;;::::3;;21772:31;::::0;;;:14:::3;:31;::::0;;;;:38;21763:59:::3;::::0;21772:38:::3;;::::0;21763:8:::3;:59::i;:::-;21762:60;21740:127;;;::::0;;-1:-1:-1;;;21740:127:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21740:127:6;;;;;;;;;;;;;::::3;;22011:23;;:::i;:::-;22050:8;:52;22059:42;22085:15;22059:25;:42::i;:::-;22050:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;22050:52:6;;;22011:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;22011:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;22192:31;;;:14:::3;:31:::0;;;;:38;22011:91;;-1:-1:-1;22168:63:6::3;::::0;22192:38:::3;;22168:23;:63::i;:::-;:135;;;-1:-1:-1::0;22264:31:6::3;::::0;;;:14:::3;:31;::::0;;;;:38;22248:55:::3;::::0;22264:38:::3;;22248:15;:55::i;:::-;22150:3498;;;22384:31;::::0;;;:14:::3;:31;::::0;;;;:38;22353:127:::3;::::0;22384:38:::3;;488:1:5;22353:8:6;:127::i;:::-;22330:921;;22718:17;::::0;22672:14:::3;::::0;22589:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;:146;22545:15;:190;;22515:286;;;::::0;;-1:-1:-1;;;22515:286:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22515:286:6;;;;;;;;;;;;;::::3;;22330:921;;;23077:14;::::0;22994:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;22950:15;:141;;22920:237;;;::::0;;-1:-1:-1;;;22920:237:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22920:237:6;;;;;;;;;;;;;::::3;;23267:31;::::0;;;:14:::3;:31;::::0;;;;23324:33:::3;23267:54;::::0;::::3;:90:::0;23447:38;23413:118:::3;::::0;23447:38:::3;;437:1:5;23413:15:6;:118::i;:::-;23372:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:159;;-1:-1:-1;;23372:159:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;23553:35;;;;;;;::::3;::::0;;;;;;;;;::::3;22150:3498;;;23653:31;::::0;;;:14:::3;:31;::::0;;;;:38;23638:54:::3;::::0;23653:38:::3;;23638:14;:54::i;:::-;23634:2014;;;23763:31;::::0;;;:14:::3;:31;::::0;;;;:38;23732:127:::3;::::0;23763:38:::3;;488:1:5;23732:8:6;:127::i;:::-;23709:739;;24004:17;;23987:14;;23968:8;:16;;;:33;:53;23924:15;:97;;23894:193;;;::::0;;-1:-1:-1;;;23894:193:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;23894:193:6;;;;;;;;;;;;;::::3;23709:739;24274:14;;24255:8;:16;;;:33;24236:15;:52;;24206:148;;;::::0;;-1:-1:-1;;;24206:148:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24206:148:6;;;;;;;;;;;;;::::3;23634:2014;24864:31;::::0;;;:14:::3;:31;::::0;;;;:38;24855:66:::3;::::0;24864:38:::3;;488:1:5;24855:8:6;:66::i;:::-;24837:811;;;25093:14;::::0;25014:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:93:::3;24974:15;:133;;24948:217;;;::::0;;-1:-1:-1;;;24948:217:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24948:217:6;;;;;;;;;;;;;::::3;;25337:31;::::0;;;:14:::3;:31;::::0;;;;:38;25303:118:::3;::::0;25337:38:::3;;437:1:5;25303:15:6;:118::i;24837:811::-;25511:29;::::0;;-1:-1:-1;;;25511:29:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;25511:29:6;;;;;;;;;;;;;::::3;24837:811;7467:1;6761::::2;;21299:4356:::0;;:::o;1700:145:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1806:1:::1;1790:6:::0;;1769:40:::1;::::0;-1:-1:-1;;;;;1790:6:22;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1769:40:22;1806:1;;1769:40:::1;1836:1;1819:19:::0;;-1:-1:-1;;;;;;1819:19:22::1;::::0;;1700:145::o;17796:246:6:-;1614:8:29;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;6824:14:6::1;::::0;-1:-1:-1;;;;;6824:14:6::1;6816:55;;;::::0;;-1:-1:-1;;;6816:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;::::1;;6994:14;::::0;-1:-1:-1;;;;;6994:14:6::1;6980:10;:28;6972:55;;;::::0;;-1:-1:-1;;;6972:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;::::1;;17983:14:::2;::::0;17968:66:::2;::::0;;-1:-1:-1;;;17968:66:6;;-1:-1:-1;;;;;17968:66:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;17983:14;;;::::2;::::0;17968:35:::2;::::0;:66;;;;;17983:14:::2;::::0;17968:66;;;;;;;17983:14;;17968:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;17796:246:::0;;;:::o;30666:396::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;30804:20;30796:47:::1;;;::::0;;-1:-1:-1;;;30796:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;30796:47:6;;;;;;;;;;;;;::::1;;30944:31;::::0;;;:14:::1;:31;::::0;;;;;;;:56;;-1:-1:-1;;30944:56:6::1;;;::::0;;31018:36;;;;;;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31018:36:6;;;;;;;;;::::1;30666:396:::0;:::o;8614:1740::-;6454:18;;8885:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8927:8:::1;8913:10;:22;;8905:56;;;::::0;;-1:-1:-1;;;8905:56:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;8905:56:6;;;;;;;;;;;;;::::1;;9130:15;9148:9;9130:27;9118:8;:39;;9110:71;;;::::0;;-1:-1:-1;;;9110:71:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9110:71:6;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;9450:20:6;::::1;9372:11;9450:20:::0;;;:11:::1;:20;::::0;;;;;;;;:22;;::::1;::::0;::::1;::::0;;;9424:71;;-1:-1:-1;;;;;;9424:71:6::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9400:106;;;::::1;::::0;9523:11:::1;:18:::0;:22;9519:176:::1;;9600:13;::::0;;;:8:::1;:13;::::0;;;;:17:::1;;::::0;9588:11:::1;:30:::0;;9622:3;;9600:17;9588:30;::::1;;;;;;;;;;;;;:37;;9562:121;;;::::0;;-1:-1:-1;;;9562:121:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9562:121:6;;;;;;;;;;;;;::::1;;9723:327;;;;;;;;9757:3;9723:327;;;;9782:11;:20;9794:7;-1:-1:-1::0;;;;;9782:20:6::1;-1:-1:-1::0;;;;;9782:20:6::1;;;;;;;;;;;;;9723:327;;;;9825:7;-1:-1:-1::0;;;;;9723:327:6::1;;;;;9858:10;9723:327;;;;9892:8;9723:327;;;;9922:6;9723:327;;;;9954:10;9723:327;;;;9990:10;9723:327;;;;10020:11;:18;;;;9723:327;;::::0;9707:8:::1;:13;9716:3;9707:13;;;;;;;;;;;:343;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10063:11;10080:3;10063:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10187:7;-1:-1:-1::0;;;;;10102:188:6::1;10152:11;:20;10164:7;-1:-1:-1::0;;;;;10152:20:6::1;-1:-1:-1::0;;;;;10152:20:6::1;;;;;;;;;;;;;10134:3;10102:188;10209:10;10234:8;10278:1;10257:11;:18;;;;:22;10102:188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10310:36;10322:7;10331:3;10336:9;10310:11;:36::i;:::-;10303:43:::0;8614:1740;-1:-1:-1;;;;;;;;;8614:1740:6:o;20288:816::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;20458:15;;20475:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;20542:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;20525:56:::3;::::0;20542:38:::3;;20525:16;:56::i;:::-;20503:125;;;::::0;;-1:-1:-1;;;20503:125:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;20503:125:6;;;;;;;;;;;;;::::3;;20770:35;20789:15;20770:18;:35::i;:::-;-1:-1:-1::0;20818:31:6::3;::::0;;;:14:::3;:31;::::0;;;;20872:15:::3;20818:51;::::0;::::3;:69:::0;20969:38;20939:104:::3;::::0;20969:38:::3;;345:1:5;20939:15:6;:104::i;:::-;20898:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;20898:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;21061:35;;;;;;;::::3;::::0;;;;;;;;;::::3;6761:1:::2;;20288:816:::0;;:::o;19015:1008::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;19185:15;;19202:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;19293:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;19276:56:::3;::::0;19293:38:::3;;19276:16;:56::i;:::-;19254:123;;;::::0;;-1:-1:-1;;;19254:123:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;19254:123:6;;;;;;;;;;;;;::::3;;19505:35;19524:15;19505:18;:35::i;:::-;;19551:23;;:::i;:::-;19590:8;:52;19599:42;19625:15;19599:25;:42::i;:::-;19590:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;19590:52:6;;;19551:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;19551:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;19655:31;;;:14:::3;:31:::0;;;;;;;19709:15:::3;19655:51:::0;;::::3;:69:::0;;;;19806:38;;19551:91;;-1:-1:-1;19776:104:6::3;::::0;19806:38:::3;::::0;;::::3;::::0;19776:15:::3;:104::i;:::-;19735:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;19735:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;19986:18;;19898:117;;;;;-1:-1:-1;;;;;19898:117:6;::::3;::::0;;::::3;::::0;;;;;;;;;::::3;::::0;;;;;;;;::::3;7467:1;6761::::2;;19015:1008:::0;;:::o;37819:160::-;37922:7;37954:11;37966:4;37954:17;;;;;;;;;;;;;;;;37947:24;;37819:160;;;:::o;7835:77::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;7896:8:::1;:6;:8::i;40878:247::-:0;40994:7;41040:29;;;:13;:29;;;;;;;;;41087:20;;:8;:20;;;;;:30;;;;40878:247::o;35210:258::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;35359:18:::1;35380:29:::0;;;:13:::1;:29;::::0;;;;;;;;35420:20;;:8:::1;:20:::0;;;;;;:27:::1;;:40:::0;;-1:-1:-1;;;;;;35420:40:6::1;-1:-1:-1::0;;;;;35420:40:6;;::::1;::::0;;;::::1;::::0;;35210:258::o;36815:234::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;36938:14:6::1;:32:::0;;;36988:53:::1;::::0;;;;;37030:10:::1;36988:53;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;36815:234:::0;:::o;1068:85:22:-;1114:7;1140:6;-1:-1:-1;;;;;1140:6:22;1068:85;:::o;47006:135:6:-;47127:6;;47006:135;:::o;47502:157::-;47634:17;;47502:157;:::o;46125:160::-;46259:18;;-1:-1:-1;;;;;46259:18:6;46125:160;:::o;44813:623::-;44932:4;44987:23;;:::i;:::-;45026:8;:52;45035:42;45061:15;45035:25;:42::i;:::-;45026:52;;;;;;;;;;;;;;-1:-1:-1;45026:52:6;44987:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;44987:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;45119:15:6;-1:-1:-1;45097:37:6;45089:71;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;;;;45282:15;45262:8;:16;;;:35;;45254:67;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;;;;-1:-1:-1;45424:4:6;;44813:623;-1:-1:-1;;44813:623:6:o;43997:213::-;44119:7;44151:30;;;:14;:30;;;;;:51;;;-1:-1:-1;;;;;44151:51:6;;43997:213::o;41817:337::-;41930:7;41939;41948;41957;41966;41992:23;;:::i;:::-;-1:-1:-1;;;42018:21:6;;;;-1:-1:-1;;42018:8:6;:21;;;;;;;;;41992:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41992:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41992:47:6;;41817:337::o;13347:790::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;13566:19:::1;13588:39;13612:14;13588:23;:39::i;:::-;13566:61;;13683:14;13666:31;;:13;:31;;;13658:68;;;::::0;;-1:-1:-1;;;13658:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;13658:68:6;;;;;;;;;;;;;::::1;;13737:52;13756:14;13772:7;13781;13737:18;:52::i;:::-;13825:22;13850:44;13861:7;13870;13879:14;13850:10;:44::i;:::-;13825:69;;13946:14;13912:217;13975:14;14004:7;14026;14048:41;14074:14;14048:25;:41::i;:::-;13912:217;::::0;;;;;-1:-1:-1;;;;;13912:217:6;;::::1;;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;::::1;6761:1;;13347:790:::0;;;;;:::o;38559:438::-;38685:7;38718:20;38710:47;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;;;;38860:21;38884:39;38907:15;38884:22;:39::i;:::-;38941:38;38950:28;;;:13;:28;;;;;;;;;38941:38;;:8;:38;;;;;:48;;38559:438;-1:-1:-1;;;38559:438:6:o;35623:397::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;35744:33:6;::::1;35736:65;;;::::0;;-1:-1:-1;;;35736:65:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;35736:65:6;;;;;;;;;;;;;::::1;;35904:18;:40:::0;;-1:-1:-1;;;;;;35904:40:6::1;-1:-1:-1::0;;;;;35904:40:6;::::1;::::0;;::::1;::::0;;;35962:50:::1;::::0;;;;;36001:10:::1;35962:50;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;35623:397:::0;:::o;36166:387::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;36297:29:6;::::1;36289:61;;;::::0;;-1:-1:-1;;;36289:61:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;36289:61:6;;;;;;;;;;;;;::::1;;36453:14;:32:::0;;-1:-1:-1;;;;;;36453:32:6::1;-1:-1:-1::0;;;;;36453:32:6;::::1;::::0;;::::1;::::0;;;36503:42:::1;::::0;;;;;36534:10:::1;36503:42;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;36166:387:::0;:::o;48181:161::-;48320:14;;-1:-1:-1;;;;;48320:14:6;48181:161;:::o;10896:572::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;11142:1:::1;11125:14;:18;;;:58;;;;;11182:1;11164:14;:19;;;;11125:58;11103:130;;;::::0;;-1:-1:-1;;;11103:130:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11103:130:6;;;;;;;;;;;;;::::1;;11287:173;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;11287:173:6;;::::1;;::::0;;::::1;::::0;;;;;::::1;::::0;;;;;;-1:-1:-1;11254:30:6;;;:14:::1;:30:::0;;;;;;;:206;;;;;;;::::1;;;-1:-1:-1::0;;;;;;11254:206:6;;;::::1;-1:-1:-1::0;;11254:206:6;;::::1;::::0;;;::::1;;::::0;;;::::1;::::0;;;;;;;::::1;::::0;;;;;::::1;-1:-1:-1::0;;;;;;11254:206:6;;::::1;::::0;;;::::1;::::0;;10896:572::o;31739:736::-;31828:20;31820:47;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;;;;31970:23;;:::i;:::-;32009:8;:52;32018:42;32044:15;32018:25;:42::i;:::-;32009:52;;;;;;;;;;;;;;-1:-1:-1;32009:52:6;31970:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;31970:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32111:15:6;-1:-1:-1;32092:107:6;;;;-1:-1:-1;32160:31:6;;;;:14;:31;;;;;:38;32143:56;;32160:38;;32143:16;:56::i;:::-;32074:394;;;32301:31;;;;:14;:31;;;;;:38;32267:116;;32301:38;;390:1:5;32267:15:6;:116::i;:::-;32226:31;;;;:14;:31;;;;;;;;;:157;;-1:-1:-1;;32226:157:6;;;;;;;;;;;;;32405:51;;;;;32445:10;32405:51;;;;;;;;;;;;;;;;;;;32074:394;31739:736;;:::o;39752:424::-;39879:7;39979:29;;;:13;:29;;;;;;;;;40041:20;;:8;:20;;;;;:26;;;;40082:30;;;;40127;;;;;40041:26;;39752:424::o;39279:232::-;39454:14;;39445:58;;;-1:-1:-1;;;39445:58:6;;-1:-1:-1;;;;;39445:58:6;;;;;;;;;;;;;;;39413:7;;39454:14;;;;;39445:34;;:58;;;;;;;;;;;;;;;39454:14;39445:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39445:58:6;;39279:232;-1:-1:-1;;;39279:232:6:o;43558:208::-;43678:7;43710:30;;;:14;:30;;;;;:48;;;;-1:-1:-1;;;;;43710:48:6;;43558:208::o;46747:169::-;-1:-1:-1;;;;;46888:20:6;46855:7;46888:20;;;:11;:20;;;;;;;46747:169::o;31212:398::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;31351:20;31343:47:::1;;;::::0;;-1:-1:-1;;;31343:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;31343:47:6;;;;;;;;;;;;;::::1;;31491:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:57;;-1:-1:-1;;31491:57:6::1;::::0;::::1;::::0;;31566:36;;;;;31544:4:::1;31566:36:::0;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31566:36:6;;;;;;;;;::::1;31212:398:::0;:::o;37324:252::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;37453:17:6::1;:38:::0;;;37509:59:::1;::::0;;;;;37557:10:::1;37509:59;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;37324:252:::0;:::o;1994:240:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;2082:22:22;::::1;2074:73;;;;-1:-1:-1::0;;;2074:73:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:6;::::0;;2162:38:::1;::::0;-1:-1:-1;;;;;2162:38:22;;::::1;::::0;2183:6;::::1;::::0;-1:-1:-1;;;;;;;;;;;2162:38:22;::::1;2210:6;:17:::0;;-1:-1:-1;;;;;;2210:17:22::1;-1:-1:-1::0;;;;;2210:17:22;;;::::1;::::0;;;::::1;::::0;;1994:240::o;25836:3701:6:-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;25979:21:6::1;26003:39;26026:15;26003:22;:39::i;:::-;25979:63;;26109:10;-1:-1:-1::0;;;;;26075:44:6::1;:30;26091:13;26075:15;:30::i;:::-;-1:-1:-1::0;;;;;26075:44:6::1;;26053:110;;;::::0;;-1:-1:-1;;;26053:110:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26053:110:6;;;;;;;;;;;;;::::1;;26260:13;26276:31:::0;;;:14:::1;:31;::::0;;;;:38;::::1;;26336:35;26276:38:::0;488:1:5::1;26336:8:6;:35::i;:::-;26335:36;26327:68;;;::::0;;-1:-1:-1;;;26327:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26327:68:6;;;;;;;;;;;;;::::1;;26497:28;26506:7;532:1:5;26497:8:6;:28::i;:::-;26496:29;26488:59;;;::::0;;-1:-1:-1;;;26488:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26488:59:6;;;;;;;;;;;;;::::1;;26642:23;;:::i;:::-;26681:8;:52;26690:42;26716:15;26690:25;:42::i;:::-;26681:52:::0;;::::1;::::0;;::::1;::::0;;;;;;;;-1:-1:-1;26681:52:6;26642:91;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;-1:-1:-1;;;;;26642:91:6::1;::::0;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;26750:29:6::1;::::0;26759:7;;26750:8:::1;:29::i;:::-;:62;;;;26783:29;26792:7;345:1:5;26783:8:6;:29::i;:::-;26746:2595;;;26873:31;26882:7;437:1:5;26873:8:6;:31::i;:::-;26868:931;;27128:17;::::0;27082:14:::1;::::0;26999:31:::1;::::0;;;:14:::1;:31;::::0;;;;:51:::1;;::::0;:97:::1;:146;26955:15;:190;;26925:281;;;::::0;;-1:-1:-1;;;26925:281:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26925:281:6;;;;;;;;;;;;;::::1;;27303:31;::::0;;;:14:::1;:31;::::0;;;;27357:37:::1;27303:51;::::0;;::::1;:91:::0;26868:931:::1;;;27627:17;::::0;27541:31:::1;::::0;;;:14:::1;:31;::::0;;;;:54:::1;;::::0;:103:::1;27497:15;:147;;27467:238;;;::::0;;-1:-1:-1;;;27467:238:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27467:238:6;;;;;;;;;;;;;::::1;;26746:2595;;;27820:29;27829:7;390:1:5;27820:8:6;:29::i;:::-;27816:1525;;;27897:31;27906:7;437:1:5;27897:8:6;:31::i;:::-;27892:806;;28059:17;;28042:14;;28023:8;:16;;;:33;:53;27979:15;:97;;27949:188;;;::::0;;-1:-1:-1;;;27949:188:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27949:188:6;;;;;;;;;;;;;::::1;27816:1525;28719:25;28736:7;28719:16;:25::i;:::-;28715:626;;;28896:17;;28879:14;;28860:8;:16;;;:33;:53;28820:15;:93;;28794:172;;;::::0;;-1:-1:-1;;;28794:172:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;28794:172:6;;;;;;;;;;;;;::::1;;29059:31;::::0;;;:14:::1;:31;::::0;;;;29113:33:::1;29059:51;::::0;;::::1;:87:::0;28715:626:::1;29394:79;29424:7;488:1:5;29394:15:6;:79::i;:::-;29353:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:120;;-1:-1:-1;;29353:120:6::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;29491:38;;;;;;;::::1;::::0;;;;;;;;;::::1;1388:1:29;;;25836:3701:6::0;;:::o;43126:205::-;43283:14;;43275:48;;;-1:-1:-1;;;43275:48:6;;;;;;;;;;43243:7;;-1:-1:-1;;;;;43283:14:6;;43275:31;;:48;;;;;;;;;;;;;;43283:14;43275:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43275:48:6;;43126:205;-1:-1:-1;;43126:205:6:o;46441:151::-;46570:14;;-1:-1:-1;;;;;46570:14:6;46441:151;:::o;40417:288::-;40535:7;40590:29;;;:13;:29;;;;;;;;;40638:20;;:8;:20;;;;;:26;;;;40666:30;;;;;40638:26;;40417:288::o;2047:117:29:-;1614:8;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;2115:5:::1;2105:15:::0;;-1:-1:-1;;;;2105:15:29::1;::::0;;2135:22:::1;2144:12;:10;:12::i;:::-;2135:22;::::0;;-1:-1:-1;;;;;2135:22:29;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2047:117::o:0;3510:128:5:-;3603:15;;;;;;;210:1;3602:23;;;:28;;3510:128::o;2321:205::-;2419:4;2459:59;2475:30;2491:1;255;2475:15;:30::i;:::-;300:1;2459:15;:59::i;:::-;2448:70;;:7;:70;;;2441:77;;2321:205;;;:::o;2733:165::-;2796:4;2831:59;2847:30;2863:1;255;2847:15;:30::i;:::-;345:1;2831:15;:59::i;3104:164::-;3166:4;3201:59;3217:30;3233:1;255;3217:15;:30::i;:::-;390:1;3779:175;210:1;3928:17;;;;;;3917:29;;3779:175::o;598:104:27:-;685:10;598:104;:::o;11858:938:6:-;11986:7;12014:24;12006:56;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;;;;12171:20;;;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;12171:38:6;;;:27;;:38;12163:66;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;;;;12344:1;12332:9;:13;12324:42;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;;;;12462:21;12486:23;12504:4;12486:17;:23::i;:::-;12564:28;;;;:13;:28;;;;;;:41;;;12633:14;;12618:137;;-1:-1:-1;;;12618:137:6;;-1:-1:-1;;;;;12618:137:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12462:47;;-1:-1:-1;12633:14:6;;;12618:35;;:137;;;;;12564:28;;12618:137;;;;;;12564:28;12633:14;12618:137;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12775:13:6;;11858:938;-1:-1:-1;;;;;;;11858:938:6:o;1969:137:5:-;2033:4;2068:30;2084:1;255;2068:15;:30::i;1800:115:29:-;1349:8;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;1859:7:::1;:14:::0;;-1:-1:-1;;;;1859:14:29::1;-1:-1:-1::0;;;1859:14:29::1;::::0;;1888:20:::1;1895:12;:10;:12::i;14430:1142:6:-:0;14583:19;14575:46;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;;;;14728:20;:7;-1:-1:-1;;;;;14728:18:6;;:20::i;:::-;14724:282;;;14791:46;;;-1:-1:-1;;;14791:46:6;;-1:-1:-1;;;14791:46:6;;;;;;-1:-1:-1;;;;;14791:34:6;;;;;:46;;;;;;;;;;;;;;:34;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14791:46:6;14765:135;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15026:21:6;;15018:53;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;;;;15203:14;;15194:59;;;-1:-1:-1;;;15194:59:6;;-1:-1:-1;;;;;15194:59:6;;;;;;;;;;;;;;;15256:1;;15203:14;;;;;15194:34;;:59;;;;;;;;;;;;;;;15203:14;15194:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15194:59:6;:63;15172:124;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;;;;15391:18;15412:29;;;:13;:29;;;;;;;;;15476:20;;;:8;:20;;;;;;:28;;15508:15;-1:-1:-1;15476:47:6;15454:110;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;;;16023:1393;16149:7;16173:16;:3;-1:-1:-1;;;;;16173:14:6;;:16::i;:::-;16169:545;;;16232:185;;;-1:-1:-1;;;16232:185:6;;;-1:-1:-1;;;;;16232:185:6;;;;;;;16326:10;16232:185;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;;;;;;;;16421:50;;16232:41;;;;16421:50;;16232:185;;;;;;;;;;;;;;;;:41;:185;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;-1:-1:-1;;;;;;16232:239:6;;16206:328;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;;;;16741:14;;;16726:63;;;-1:-1:-1;;;16726:63:6;;-1:-1:-1;;;;;16726:63:6;;;;;;;;;;;;;;;;;;;;;;16741:14;;;;;16726:35;;:63;;;;;16741:14;;16726:63;;;;;;;;16741:14;;16726:63;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16868:22:6;16925:28;;;:12;:28;;;;;;;;16923:30;;;;;;;;16906:47;;17058:30;;;:14;:30;;;;;;:37;16906:47;;-1:-1:-1;17028:103:6;;17058:37;;255:1:5;17028:15:6;:103::i;:::-;16988:30;;;;:14;:30;;;;;;;;:143;;-1:-1:-1;;16988:143:6;;;;;;;;;;-1:-1:-1;;17209:57:6;;;;-1:-1:-1;17333:14:6;17318:56;;-1:-1:-1;;;17318:56:6;;-1:-1:-1;;;;;17318:56:6;;;;;;;;;;;;;;;17333:14;;;;;17318:35;;:56;;;;;16988:30;17318:56;;;;;;;17333:14;17318:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17394:14:6;;16023:1393;-1:-1:-1;;;;;16023:1393:6:o;18319:468::-;18439:6;:8;;;;;;18403:18;18460:290;;;;18533:3;18523:6;;:13;;-1:-1:-1;;;18508:29:6;18495:42;;18460:290;;;-1:-1:-1;;18651:6:6;;18661:3;18651:13;;18319:468::o;718:413:26:-;1078:20;1116:8;;;718:413::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\n\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"./interfaces/IERC1155.sol\";\r\nimport \"./interfaces/IERC165.sol\";\r\nimport \"./interfaces/IERC721.sol\";\r\nimport \"./interfaces/IERC1155ERC721.sol\";\r\nimport \"./interfaces/IERC721TokenReceiver.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./UsingHelpers.sol\";\r\n\r\n//preparing for ERC-1066, ERC-1444, EIP-838\r\n\r\n/**\r\n * @title VoucherKernel contract is controlling the core business logic\r\n * @dev Notes:\r\n * - Since this is a reference app, it is not yet optimized.\r\n * In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\r\n * - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\r\n * See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\r\n */\r\n// solhint-disable-next-line\r\ncontract VoucherKernel is IVoucherKernel, Ownable, Pausable, UsingHelpers {\r\n using Address for address;\r\n using SafeMath for uint256;\r\n\r\n //AssetRegistry assetRegistry;\r\n address private tokensContract;\r\n\r\n //promise for an asset could be reusable, but simplified here for brevity\r\n struct Promise {\r\n bytes32 promiseId;\r\n uint256 nonce; //the asset that is offered\r\n address seller; //the seller who created the promise\r\n //we simplify the value for the demoapp, otherwise voucher details would be packed in one bytes32 field value\r\n uint256 validFrom;\r\n uint256 validTo;\r\n uint256 price;\r\n uint256 depositSe;\r\n uint256 depositBu;\r\n uint256 idx;\r\n }\r\n\r\n struct VoucherPaymentMethod {\r\n uint8 paymentMethod;\r\n address addressTokenPrice;\r\n address addressTokenDeposits;\r\n }\r\n\r\n address private bosonRouterAddress; //address of the Boson Router contract\r\n address private cashierAddress; //address of the Cashier contract\r\n\r\n mapping(bytes32 => Promise) private promises; //promises to deliver goods or services\r\n mapping(address => uint256) private tokenNonces; //mapping between seller address and its own nonces. Every time seller creates supply ID it gets incremented. Used to avoid duplicate ID's\r\n mapping(uint256 => VoucherPaymentMethod) private paymentDetails; // tokenSupplyId to VoucherPaymentMethod\r\n\r\n bytes32[] private promiseKeys;\r\n\r\n mapping(uint256 => bytes32) private ordersPromise; //mapping between an order (supply a.k.a. VoucherSet token) and a promise\r\n\r\n mapping(uint256 => VoucherStatus) private vouchersStatus; //recording the vouchers evolution\r\n\r\n //ID reqs\r\n mapping(uint256 => uint256) private typeCounters; //counter for ID of a particular type of NFT\r\n uint256 private constant MASK_TYPE = uint256(uint128(~0)) << 128; //the type mask in the upper 128 bits\r\n //1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private constant MASK_NF_INDEX = uint128(~0); //the non-fungible index mask in the lower 128\r\n //0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\r\n\r\n uint256 private constant TYPE_NF_BIT = 1 << 255; //the first bit represents an NFT type\r\n //1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private typeId; //base token type ... 127-bits cover 1.701411835*10^38 types (not differentiating between FTs and NFTs)\r\n /* Token IDs:\r\n Fungibles: 0, followed by 127-bit FT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <0>\r\n \r\n Non-fungible VoucherSets (supply tokens): 1, followed by 127-bit NFT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <1>\r\n */\r\n\r\n uint256 private complainPeriod;\r\n uint256 private cancelFaultPeriod;\r\n\r\n event LogPromiseCreated(\r\n bytes32 indexed _promiseId,\r\n uint256 indexed _nonce,\r\n address indexed _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _idx\r\n );\r\n\r\n event LogVoucherDelivered(\r\n uint256 indexed _tokenIdSupply,\r\n uint256 _tokenIdVoucher,\r\n address _issuer,\r\n address _holder,\r\n bytes32 _promiseId,\r\n uint256 _correlationId\r\n );\r\n\r\n event LogVoucherRedeemed(\r\n uint256 _tokenIdVoucher,\r\n address _holder,\r\n bytes32 _promiseId\r\n );\r\n\r\n event LogVoucherRefunded(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherComplain(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherFaultCancel(uint256 _tokenIdVoucher);\r\n\r\n event LogExpirationTriggered(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogFinalizeVoucher(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogBosonRouterSet(address _newBosonRouter, address _triggeredBy);\r\n\r\n event LogCashierSet(address _newCashier, address _triggeredBy);\r\n\r\n event LogComplainPeriodChanged(\r\n uint256 _newComplainPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogCancelFaultPeriodChanged(\r\n uint256 _newCancelFaultPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogVoucherSetFaultCancel(uint256 _tokenIdSupply, address _issuer);\r\n\r\n event LogFundsReleased(\r\n uint256 _tokenIdVoucher,\r\n uint8 _type //0 .. payment, 1 .. deposits\r\n );\r\n\r\n modifier onlyFromRouter() {\r\n require(bosonRouterAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == bosonRouterAddress, \"UNAUTHORIZED_BR\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyFromCashier() {\r\n require(cashierAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == cashierAddress, \"UNAUTHORIZED_C\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyVoucherOwner(uint256 _tokenIdVoucher, address _sender) {\r\n //check authorization\r\n require(\r\n IERC721(tokensContract).ownerOf(_tokenIdVoucher) == _sender,\r\n \"UNAUTHORIZED_V\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n constructor(address _tokensContract) {\r\n tokensContract = _tokensContract;\r\n\r\n complainPeriod = 7 * 1 days;\r\n cancelFaultPeriod = 7 * 1 days;\r\n }\r\n\r\n /**\r\n * @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\r\n * Only BR contract is in control of this function.\r\n */\r\n function pause() external override onlyFromRouter {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @notice Unpause the process of interaction with voucherID's (ERC-721).\r\n * Only BR contract is in control of this function.\r\n */\r\n function unpause() external override onlyFromRouter {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @notice Creating a new promise for goods or services.\r\n * Can be reused, e.g. for making different batches of these (in the future).\r\n * @param _seller seller of the promise\r\n * @param _validFrom Start of valid period\r\n * @param _validTo End of valid period\r\n * @param _price Price (payment amount)\r\n * @param _depositSe Seller's deposit\r\n * @param _depositBu Buyer's deposit\r\n */\r\n function createTokenSupplyID(\r\n address _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _price,\r\n uint256 _depositSe,\r\n uint256 _depositBu,\r\n uint256 _quantity\r\n ) external override onlyFromRouter returns (uint256) {\r\n require(_validFrom <= _validTo, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n // solhint-disable-next-line not-rely-on-time\r\n require(_validTo >= block.timestamp + 5 minutes, \"INVALID_VALIDITY_TO\"); //\"Minimum order validity is set to prevent any potential attack from flash-loans or similar.\" //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n bytes32 key;\r\n key = keccak256(\r\n abi.encodePacked(_seller, tokenNonces[_seller]++, _validFrom, _validTo)\r\n );\r\n\r\n if (promiseKeys.length > 0) {\r\n require(\r\n promiseKeys[promises[key].idx] != key,\r\n \"PROMISE_ALREADY_EXISTS\"\r\n );\r\n }\r\n\r\n promises[key] = Promise({\r\n promiseId: key,\r\n nonce: tokenNonces[_seller],\r\n seller: _seller,\r\n validFrom: _validFrom,\r\n validTo: _validTo,\r\n price: _price,\r\n depositSe: _depositSe,\r\n depositBu: _depositBu,\r\n idx: promiseKeys.length\r\n });\r\n\r\n promiseKeys.push(key);\r\n\r\n emit LogPromiseCreated(\r\n key,\r\n tokenNonces[_seller],\r\n _seller,\r\n _validFrom,\r\n _validTo,\r\n promiseKeys.length - 1\r\n );\r\n\r\n return createOrder(_seller, key, _quantity);\r\n }\r\n\r\n /**\r\n * @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\r\n * @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\r\n * @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\r\n * @param _tokenPrice token address which will hold the funds for the price of the voucher\r\n * @param _tokenDeposits token address which will hold the funds for the deposits of the voucher\r\n */\r\n function createPaymentMethod(\r\n uint256 _tokenIdSupply,\r\n uint8 _paymentMethod,\r\n address _tokenPrice,\r\n address _tokenDeposits\r\n ) external override onlyFromRouter {\r\n require(\r\n _paymentMethod > 0 &&\r\n _paymentMethod <= 4,\r\n \"INVALID PAYMENT METHOD\"\r\n );\r\n \r\n paymentDetails[_tokenIdSupply] = VoucherPaymentMethod({\r\n paymentMethod: _paymentMethod,\r\n addressTokenPrice: _tokenPrice,\r\n addressTokenDeposits: _tokenDeposits\r\n });\r\n }\r\n\r\n /**\r\n * @notice Create an order for offering a certain quantity of an asset\r\n * This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\r\n * @param _seller seller of the promise\r\n * @param _promiseId ID of a promise (simplified into asset for demo)\r\n * @param _quantity Quantity of assets on offer\r\n */\r\n function createOrder(\r\n address _seller,\r\n bytes32 _promiseId,\r\n uint256 _quantity\r\n ) private returns (uint256) {\r\n require(_promiseId != bytes32(0), \"UNSPECIFIED_PROMISE\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(promises[_promiseId].seller == _seller, \"UNAUTHORIZED_CO\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n require(_quantity > 0, \"INVALID_QUANTITY\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n uint256 tokenIdSupply = generateTokenType(true); //create & assign a new non-fungible type\r\n\r\n ordersPromise[tokenIdSupply] = _promiseId;\r\n\r\n IERC1155ERC721(tokensContract).mint(\r\n _seller,\r\n tokenIdSupply,\r\n _quantity,\r\n \"\"\r\n );\r\n\r\n return tokenIdSupply;\r\n }\r\n\r\n /**\r\n * @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\r\n * @param _tokenIdSupply ID of the supply token (ERC-1155)\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n * @param _paymentMethod method being used for that particular order that needs to be fulfilled\r\n * @param _correlationId ID of the current interaction with the smart contract for a specific user\r\n */\r\n function fillOrder(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder,\r\n uint8 _paymentMethod,\r\n uint256 _correlationId\r\n ) external override onlyFromRouter {\r\n uint8 paymentMethod = getVoucherPaymentMethod(_tokenIdSupply);\r\n\r\n //checks\r\n require(paymentMethod == _paymentMethod, \"Incorrect Payment Method\");\r\n checkOrderFillable(_tokenIdSupply, _issuer, _holder);\r\n\r\n //close order\r\n uint256 voucherTokenId = extract721(_issuer, _holder, _tokenIdSupply);\r\n\r\n emit LogVoucherDelivered(\r\n _tokenIdSupply,\r\n voucherTokenId,\r\n _issuer,\r\n _holder,\r\n getPromiseIdFromVoucherId(voucherTokenId),\r\n _correlationId\r\n );\r\n }\r\n\r\n /**\r\n * @notice Check order is fillable\r\n * @dev Will throw if checks don't pass\r\n * @param _tokenIdSupply ID of the supply token\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n */\r\n function checkOrderFillable(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder\r\n ) internal view {\r\n require(_tokenIdSupply != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n if (_holder.isContract()) {\r\n require(\r\n IERC165(_holder).supportsInterface(0x150b7a02),\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"31\"\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n require(_holder != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(\r\n IERC1155(tokensContract).balanceOf(_issuer, _tokenIdSupply) > 0,\r\n \"OFFER_EMPTY\"\r\n ); //hex\"40\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Unavailable)\r\n\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n\r\n require(\r\n promises[promiseKey].validTo >= block.timestamp,\r\n \"OFFER_EXPIRED\"\r\n );\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _to The address of the token holder\r\n * @param _tokenIdSupply ID of the token type\r\n * @return ID of the voucher token\r\n */\r\n function extract721(\r\n address _issuer,\r\n address _to,\r\n uint256 _tokenIdSupply\r\n ) internal returns (uint256) {\r\n if (_to.isContract()) {\r\n require(\r\n ERC721TokenReceiver(_to).onERC721Received(\r\n _issuer,\r\n msg.sender,\r\n _tokenIdSupply,\r\n \"\"\r\n ) == ERC721TokenReceiver(_to).onERC721Received.selector,\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, 1); // This is hardcoded as 1 on purpose\r\n\r\n //calculate tokenId\r\n uint256 voucherTokenId =\r\n _tokenIdSupply | ++typeCounters[_tokenIdSupply];\r\n\r\n //set status\r\n vouchersStatus[voucherTokenId].status = determineStatus(\r\n vouchersStatus[voucherTokenId].status,\r\n IDX_COMMIT\r\n );\r\n vouchersStatus[voucherTokenId].isPaymentReleased = false;\r\n vouchersStatus[voucherTokenId].isDepositsReleased = false;\r\n\r\n //mint voucher NFT as ERC-721\r\n IERC1155ERC721(tokensContract).mint(_to, voucherTokenId);\r\n\r\n return voucherTokenId;\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _tokenIdSupply ID of the token type\r\n * @param _qty qty that should be burned\r\n */\r\n function burnSupplyOnPause(\r\n address _issuer,\r\n uint256 _tokenIdSupply,\r\n uint256 _qty\r\n ) external override whenPaused onlyFromCashier {\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, _qty);\r\n }\r\n\r\n /**\r\n * @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\r\n * @param _isNonFungible Flag for generating NFT or FT\r\n * @return _tokenType Returns a newly generated token type\r\n */\r\n function generateTokenType(bool _isNonFungible)\r\n internal\r\n returns (uint256 _tokenType)\r\n {\r\n typeId++;\r\n\r\n if (_isNonFungible) {\r\n _tokenType = TYPE_NF_BIT | (typeId << 128); //upper bit is 1, followed by sequence, leaving lower 128-bits as 0\r\n } else {\r\n _tokenType = typeId << 128; //upper bit is not set, followed by sequence, leaving lower 128-bits as 0\r\n }\r\n\r\n return _tokenType;\r\n }\r\n\r\n /* solhint-disable */\r\n\r\n /**\r\n * @notice Redemption of the vouchers promise\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function redeem(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n //check status\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"ALREADY_PROCESSED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REDEEM\r\n );\r\n\r\n emit LogVoucherRedeemed(\r\n _tokenIdVoucher,\r\n _msgSender,\r\n tPromise.promiseId\r\n );\r\n }\r\n\r\n // // // // // // // //\r\n // UNHAPPY PATH\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Refunding a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function refund(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"INAPPLICABLE_STATUS\"\r\n ); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REFUND\r\n );\r\n\r\n emit LogVoucherRefunded(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Issue a complain for a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function complain(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_COMPLAIN),\r\n \"ALREADY_COMPLAINED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_FINAL),\r\n \"ALREADY_FINALIZED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check if still in the complain period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n //if redeemed or refunded\r\n if (\r\n isStateRedemptionSigned(vouchersStatus[_tokenIdVoucher].status) ||\r\n isStateRefunded(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if expired\r\n } else if (isStateExpired(vouchersStatus[_tokenIdVoucher].status)) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <= tPromise.validTo + complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if cancelOrFault\r\n } else if (\r\n isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_CANCEL_FAULT)\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired));\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function cancelOrFault(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n {\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n require(\r\n getSupplyHolder(tokenIdSupply) == _msgSender,\r\n \"UNAUTHORIZED_COF\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_CANCEL_FAULT), \"ALREADY_CANCELFAULT\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_REDEEM) || isStatus(tStatus, IDX_REFUND)) {\r\n //if redeemed or refunded\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //resetting the complain period\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStatus(tStatus, IDX_EXPIRE)) {\r\n //if expired\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp;\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStateCommitted(tStatus)) {\r\n //if committed only\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //complain period starts\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_CANCEL_FAULT\r\n );\r\n\r\n emit LogVoucherFaultCancel(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\r\n * @param _tokenIdSupply ID of the voucher set\r\n * @param _issuer owner of the voucher\r\n */\r\n function cancelOrFaultVoucherSet(uint256 _tokenIdSupply, address _issuer)\r\n external\r\n override\r\n onlyFromRouter\r\n whenNotPaused\r\n returns (uint256)\r\n {\r\n require(getSupplyHolder(_tokenIdSupply) == _issuer, \"UNAUTHORIZED_COF\");\r\n\r\n uint256 remQty = getRemQtyForSupply(_tokenIdSupply, _issuer);\r\n\r\n require(remQty > 0, \"OFFER_EMPTY\");\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, remQty);\r\n\r\n emit LogVoucherSetFaultCancel(_tokenIdSupply, _issuer);\r\n\r\n return remQty;\r\n }\r\n\r\n // // // // // // // //\r\n // BACK-END PROCESS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Mark voucher token that the payment was released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setPaymentReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 0);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token that the deposits were released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setDepositsReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 1);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token as expired\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerExpiration(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (\r\n tPromise.validTo < block.timestamp &&\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_EXPIRE\r\n );\r\n\r\n emit LogExpirationTriggered(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token to the final status\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerFinalizeVoucher(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n bool mark;\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_COMPLAIN)) {\r\n if (isStatus(tStatus, IDX_CANCEL_FAULT)) {\r\n //if COMPLAIN && COF: then final\r\n mark = true;\r\n } else if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod\r\n ) {\r\n //if COMPLAIN: then final after cof period\r\n mark = true;\r\n }\r\n } else if (\r\n isStatus(tStatus, IDX_CANCEL_FAULT) &&\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod\r\n ) {\r\n //if COF: then final after complain period\r\n mark = true;\r\n } else if (\r\n isStateRedemptionSigned(tStatus) || isStateRefunded(tStatus)\r\n ) {\r\n //if RDM/RFND NON_COMPLAIN: then final after complainPeriodStart + complainPeriod\r\n if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod\r\n ) {\r\n mark = true;\r\n }\r\n } else if (isStateExpired(tStatus)) {\r\n //if EXP NON_COMPLAIN: then final after validTo + complainPeriod\r\n if (block.timestamp >= tPromise.validTo + complainPeriod) {\r\n mark = true;\r\n }\r\n }\r\n\r\n if (mark) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_FINAL\r\n );\r\n emit LogFinalizeVoucher(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /* solhint-enable */\r\n\r\n // // // // // // // //\r\n // UTILS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Set the address of the new holder of a _tokenIdSupply on transfer\r\n * @param _tokenIdSupply _tokenIdSupply which will be transferred\r\n * @param _newSeller new holder of the supply\r\n */\r\n function setSupplyHolderOnTransfer(\r\n uint256 _tokenIdSupply,\r\n address _newSeller\r\n ) external override onlyFromCashier {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n promises[promiseKey].seller = _newSeller;\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Boson Router contract\r\n * @param _bosonRouterAddress The address of the BR contract\r\n */\r\n function setBosonRouterAddress(address _bosonRouterAddress)\r\n external\r\n onlyOwner\r\n {\r\n require(_bosonRouterAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n bosonRouterAddress = _bosonRouterAddress;\r\n\r\n emit LogBosonRouterSet(_bosonRouterAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Cashier contract\r\n * @param _cashierAddress The address of the BR contract\r\n */\r\n function setCashierAddress(address _cashierAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n require(_cashierAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n cashierAddress = _cashierAddress;\r\n\r\n emit LogCashierSet(_cashierAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _complainPeriod the new value for complain period (in number of seconds)\r\n */\r\n function setComplainPeriod(uint256 _complainPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n complainPeriod = _complainPeriod;\r\n\r\n emit LogComplainPeriodChanged(_complainPeriod, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)\r\n */\r\n function setCancelFaultPeriod(uint256 _cancelFaultPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n cancelFaultPeriod = _cancelFaultPeriod;\r\n\r\n emit LogCancelFaultPeriodChanged(_cancelFaultPeriod, msg.sender);\r\n }\r\n\r\n // // // // // // // //\r\n // GETTERS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Get the promise ID at specific index\r\n * @param _idx Index in the array of promise keys\r\n * @return Promise ID\r\n */\r\n function getPromiseKey(uint256 _idx)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n return promiseKeys[_idx];\r\n }\r\n\r\n /**\r\n * @notice Get the supply token ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the supply token\r\n */\r\n function getIdSupplyFromVoucher(uint256 _tokenIdVoucher)\r\n public\r\n pure\r\n override\r\n returns (uint256)\r\n {\r\n return _tokenIdVoucher & MASK_TYPE;\r\n }\r\n\r\n /**\r\n * @notice Get the promise ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromVoucherId(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n return promises[ordersPromise[tokenIdSupply]].promiseId;\r\n }\r\n\r\n /**\r\n * @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\r\n * @param _tokenSupplyId Token supply ID\r\n * @param _owner holder of the Token Supply\r\n * @return remaining quantity\r\n */\r\n function getRemQtyForSupply(uint256 _tokenSupplyId, address _owner)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return IERC1155(tokensContract).balanceOf(_owner, _tokenSupplyId);\r\n }\r\n\r\n /**\r\n * @notice Get all necessary funds for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\r\n */\r\n function getOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (\r\n promises[promiseKey].price,\r\n promises[promiseKey].depositSe,\r\n promises[promiseKey].depositBu\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get Buyer costs required to make an order for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Buyer's deposit)\r\n */\r\n function getBuyerOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256, uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (promises[promiseKey].price, promises[promiseKey].depositBu);\r\n }\r\n\r\n /**\r\n * @notice Get Seller deposit\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns sellers deposit\r\n */\r\n function getSellerDeposit(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].depositSe;\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a supply\r\n * @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\r\n * @return Address of the holder\r\n */\r\n function getSupplyHolder(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].seller;\r\n }\r\n\r\n /**\r\n * @notice Get promise data not retrieved by other accessor functions\r\n * @param _promiseKey ID of the promise\r\n * @return promise data not returned by other accessor methods\r\n */\r\n function getPromiseData(bytes32 _promiseKey)\r\n external\r\n view\r\n override\r\n returns (bytes32, uint256, uint256, uint256, uint256 )\r\n {\r\n Promise memory tPromise = promises[_promiseKey];\r\n return (tPromise.promiseId, tPromise.nonce, tPromise.validFrom, tPromise.validTo, tPromise.idx); \r\n }\r\n\r\n /**\r\n * @notice Get the current status of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Status of the voucher (via enum)\r\n */\r\n function getVoucherStatus(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (\r\n uint8,\r\n bool,\r\n bool,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n return (\r\n vouchersStatus[_tokenIdVoucher].status,\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased,\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased,\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart,\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Address of the holder\r\n */\r\n function getVoucherHolder(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return IERC721(tokensContract).ownerOf(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the price for the supply is held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherPriceToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenPrice;\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the deposits for the supply are held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherDepositToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenDeposits;\r\n }\r\n\r\n /**\r\n * @notice Get the payment method for a particular _tokenIdSupply\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return payment method\r\n */\r\n function getVoucherPaymentMethod(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint8)\r\n {\r\n return paymentDetails[_tokenIdSupply].paymentMethod;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isInValidityPeriod(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n //check validity period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n require(tPromise.validFrom <= block.timestamp, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n require(tPromise.validTo >= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isVoucherTransferable(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n return\r\n !(vouchersStatus[_tokenIdVoucher].isPaymentReleased ||\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased);\r\n }\r\n\r\n /**\r\n * @notice Get address of the Boson Router to which this contract points\r\n * @return Address of the Boson Router contract\r\n */\r\n function getBosonRouterAddress()\r\n external\r\n view\r\n override\r\n returns (address) \r\n {\r\n return bosonRouterAddress;\r\n }\r\n\r\n /**\r\n * @notice Get address of the Cashier contract to which this contract points\r\n * @return Address of the Cashier contract\r\n */\r\n function getCashierAddress()\r\n external\r\n view\r\n override\r\n returns (address)\r\n {\r\n return cashierAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the token nonce for a seller\r\n * @param _seller Address of the seller\r\n * @return The seller's nonce\r\n */\r\n function getTokenNonce(address _seller)\r\n external\r\n view\r\n override\r\n returns (uint256) \r\n {\r\n return tokenNonces[_seller];\r\n }\r\n\r\n /**\r\n * @notice Get the current type Id\r\n * @return type Id\r\n */\r\n function getTypeId()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return typeId;\r\n }\r\n\r\n /**\r\n * @notice Get the complain period\r\n * @return complain period\r\n */\r\n function getComplainPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return complainPeriod;\r\n }\r\n\r\n /**\r\n * @notice Get the cancel or fault period\r\n * @return cancel or fault period\r\n */\r\n function getCancelFaultPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return cancelFaultPeriod;\r\n }\r\n \r\n /**\r\n * @notice Get the promise ID from a voucher set\r\n * @param _tokenIdSupply ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromSupplyId(uint256 _tokenIdSupply)\r\n external\r\n view\r\n override\r\n returns (bytes32) \r\n {\r\n return ordersPromise[_tokenIdSupply];\r\n }\r\n\r\n /**\r\n * @notice Get the address of ERC1155ERC721 contract\r\n * @return Address of ERC1155ERC721 contract\r\n */\r\n function getTokensContractAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return tokensContract;\r\n }\r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "ast": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 6234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { + "hexValue": "30", + "id": 6233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3057:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6231, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3048:7:6", + "typeDescriptions": {} + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3048:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } + }, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6263, + "indexed": true, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5003:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6265, + "indexed": false, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5037:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6267, + "indexed": false, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5066:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5066:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6269, + "indexed": false, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5093:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5093:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4922:190:6" + }, + "src": "4899:214:6" + }, + { + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6287, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5386:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5375:96:6" + }, + "src": "5351:121:6" + }, + { + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5685:47:6" + }, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6313, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6315, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6001:75:6" + }, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6337, + "indexed": false, + "mutability": "mutable", + "name": "_newCancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6129:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6129:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6339, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6260:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6235:41:6" + }, + "src": "6205:72:6" + }, + { + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", + "parameters": { + "id": 6352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6318:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6318:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6351, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6352:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6350, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6352:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6307:93:6" + }, + "src": "6285:116:6" + }, + { + "body": { + "id": 6374, + "nodeType": "Block", + "src": "6435:335:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 6365, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:60:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6372, + "nodeType": "ExpressionStatement", + "src": "6606:60:6" + }, + { + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6824:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6824:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6386, + "nodeType": "ExpressionStatement", + "src": "6816:55:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6980:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6980:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7010:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + }, + "value": "UNAUTHORIZED_C" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + } + ], + "id": 6387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6972:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" + }, + { + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" + } + ] + }, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, + "nodeType": "ParameterList", + "parameters": [], + "src": "6802:2:6" + }, + "src": "6778:353:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6416, + "nodeType": "Block", + "src": "7207:269:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "7271:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7271:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7345:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + }, + "value": "UNAUTHORIZED_V" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + } + ], + "id": 6403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7249:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7249:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6414, + "nodeType": "ExpressionStatement", + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ + { + "expression": { + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6419, + "src": "7549:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7532:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6425, + "nodeType": "ExpressionStatement", + "src": "7532:32:6" + }, + { + "expression": { + "id": 6430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7577:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6431, + "nodeType": "ExpressionStatement", + "src": "7577:27:6" + }, + { + "expression": { + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7615:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8937:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 6484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8905:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8905:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6490, + "nodeType": "ExpressionStatement", + "src": "8905:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9118:39:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 6491, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9110:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6500, + "nodeType": "ExpressionStatement", + "src": "9110:71:6" + }, + { + "assignments": [ + 6502 + ], + "declarations": [ + { + "constant": false, + "id": 6502, + "mutability": "mutable", + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 6582, + "src": "9372:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9394:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "9400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9400:106:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9394:112:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + } + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10020:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6540, + "name": "Promise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6189, + "src": "9723:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" + } + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], + "nodeType": "FunctionCall", + "src": "9723:327:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "src": "9707:343:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6556, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10063:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" + } + }, + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" + } + }, + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31370:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32175:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32160:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ + { + "expression": { + "id": 7696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7685, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32226:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7687, + "indexExpression": { + "id": 7686, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32241:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32226:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32226:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7690, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32301:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7692, + "indexExpression": { + "id": 7691, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32316:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32301:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32301:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7694, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "32358:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7689, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "32267:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32267:116:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "32226:157:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7697, + "nodeType": "ExpressionStatement", + "src": "32226:157:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7699, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32428:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7698, + "name": "LogExpirationTriggered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6311, + "src": "32405:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32405:51:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7703, + "nodeType": "EmitStatement", + "src": "32400:56:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7652, + "nodeType": "StructuredDocumentation", + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "d40ffcf8", + "id": 7707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerExpiration", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, + "parameters": { + "id": 7655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7654, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7707, + "src": "31766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31765:25:6" + }, + "returnParameters": { + "id": 7657, + "nodeType": "ParameterList", + "parameters": [], + "src": "31809:0:6" + }, + "scope": 8454, + "src": "31739:736:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9412 + ], + "body": { + "id": 7860, + "nodeType": "Block", + "src": "32688:2186:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32726:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32707:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32729:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32699:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7720, + "nodeType": "ExpressionStatement", + "src": "32699:47:6" + }, + { + "assignments": [ + 7722 + ], + "declarations": [ + { + "constant": false, + "id": 7722, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "32849:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7721, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32849:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7727, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7723, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32865:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7725, + "indexExpression": { + "id": 7724, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32880:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32865:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32865:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32849:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "32924:29:6", + "subExpression": { + "arguments": [ + { + "id": 7730, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "32934:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7731, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "32943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7729, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "32925:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32925:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32955:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32916:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32916:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7736, + "nodeType": "ExpressionStatement", + "src": "32916:59:6" + }, + { + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" + }, + { + "assignments": [ + 7741 + ], + "declarations": [ + { + "constant": false, + "id": 7741, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33090:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7740, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "33090:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7747, + "initialValue": { + "baseExpression": { + "id": 7742, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "33129:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7746, + "indexExpression": { + "arguments": [ + { + "id": 7744, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33164:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7743, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "33138:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33138:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33129:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33090:91:6" + }, + { + "condition": { + "arguments": [ + { + "id": 7749, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33207:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7779, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7778, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33699:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33699:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7825, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7741, + "src": "34534:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "34534:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34534:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34515:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34595:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34352:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34345:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } + } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" + } + ] + } + }, + "id": 7840, + "nodeType": "IfStatement", + "src": "33194:1432:6", + "trueBody": { + "id": 7777, + "nodeType": "Block", + "src": "33231:444:6", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 7753, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33259:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ + { + "expression": { + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33363:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33356:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7759, + "nodeType": "ExpressionStatement", + "src": "33356:11:6" + } + ] + } + } + ] + } + }, + { + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7708, + "nodeType": "StructuredDocumentation", + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "65c303bc", + "id": 7861, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerFinalizeVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, + "parameters": { + "id": 7711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7710, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35255:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35244:69:6" + }, + "returnParameters": { + "id": 7871, + "nodeType": "ParameterList", + "parameters": [], + "src": "35348:0:6" + }, + "scope": 8454, + "src": "35210:258:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 7914, + "nodeType": "Block", + "src": "35725:295:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7895, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35744:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "35744:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35779:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35736:65:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7903, + "nodeType": "ExpressionStatement", + "src": "35736:65:6" + }, + { + "expression": { + "id": 7906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35904:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7907, + "nodeType": "ExpressionStatement", + "src": "35904:40:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7909, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35980:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7908, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "35962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35962:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7913, + "nodeType": "EmitStatement", + "src": "35957:55:6" + } + ] + }, + "documentation": { + "id": 7887, + "nodeType": "StructuredDocumentation", + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" + }, + "functionSelector": "bd17de40", + "id": 7915, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7892, + "modifierName": { + "id": 7891, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "35710:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35710:9:6" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7889, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 7915, + "src": "35654:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35654:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35653:29:6" + }, + "returnParameters": { + "id": 7893, + "nodeType": "ParameterList", + "parameters": [], + "src": "35725:0:6" + }, + "scope": 8454, + "src": "35623:397:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9432 + ], + "body": { + "id": 7944, + "nodeType": "Block", + "src": "36278:275:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" + } + ] + }, + "documentation": { + "id": 7946, + "nodeType": "StructuredDocumentation", + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + }, + "functionSelector": "8990834b", + "id": 7965, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, + "parameters": { + "id": 7949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7948, + "mutability": "mutable", + "name": "_complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 7965, + "src": "36842:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "36841:25:6" + }, + "returnParameters": { + "id": 7953, + "nodeType": "ParameterList", + "parameters": [], + "src": "36927:0:6" + }, + "scope": 8454, + "src": "36815:234:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9426 + ], + "body": { + "id": 7984, + "nodeType": "Block", + "src": "37442:134:6", + "statements": [ + { + "expression": { + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7980, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37557:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7978, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37954:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38737:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38718:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 8026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38740:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 8022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "38710:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38710:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8028, + "nodeType": "ExpressionStatement", + "src": "38710:47:6" + }, + { + "assignments": [ + 8030 + ], + "declarations": [ + { + "constant": false, + "id": 8030, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "38860:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38860:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8034, + "initialValue": { + "arguments": [ + { + "id": 8032, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38907:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8031, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "38884:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38884:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40136:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" + } + ] + }, + "documentation": { + "id": 8064, + "nodeType": "StructuredDocumentation", + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + }, + "functionSelector": "d887b4e7", + "id": 8097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, + "parameters": { + "id": 8067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8066, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39775:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39775:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39774:24:6" + }, + "returnParameters": { + "id": 8075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" + }, + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9472 + ], + "body": { + "id": 8124, + "nodeType": "Block", + "src": "40558:147:6", + "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ + { + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41040:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8128, + "src": "41054:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" + } + ] + }, + "documentation": { + "id": 8126, + "nodeType": "StructuredDocumentation", + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" + }, + "functionSelector": "88106323", + "id": 8146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSellerDeposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, + "parameters": { + "id": 8129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8128, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40904:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40904:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40903:24:6" + }, + "returnParameters": { + "id": 8133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" + }, + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9550 + ], + "body": { + "id": 8166, + "nodeType": "Block", + "src": "41487:114:6", + "statements": [ + { + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" + } + ] + }, + "documentation": { + "id": 8147, + "nodeType": "StructuredDocumentation", + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" + }, + "functionSelector": "1f38585f", + "id": 8167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupplyHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, + "parameters": { + "id": 8150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8149, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41383:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41382:24:6" + }, + "returnParameters": { + "id": 8154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" + }, + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9628 + ], + "body": { + "id": 8202, + "nodeType": "Block", + "src": "41981:173:6", + "statements": [ + { + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "42018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8200, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" + } + ] + }, + "documentation": { + "id": 8168, + "nodeType": "StructuredDocumentation", + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" + }, + "functionSelector": "a1e5e3f9", + "id": 8203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseData", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, + "parameters": { + "id": 8171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8170, + "mutability": "mutable", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41929:46:6" + }, + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" + }, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8263, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43588:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43588:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8267, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43678:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43678:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8278, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44119:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44119:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "44118:9:6" + }, + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, + "parameters": { + "id": 8294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8293, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44451:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8297, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44541:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8296, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "44541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "44540:7:6" + }, + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ + { + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" + } + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, + "parameters": { + "id": 8309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8308, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44841:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44840:25:6" + }, + "returnParameters": { + "id": 8313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44932:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8311, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44932:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "44931:6:6" + }, + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ + { + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "45704:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "45703:25:6" + }, + "returnParameters": { + "id": 8351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45795:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8370, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8375, + "src": "46226:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8385, + "src": "46538:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8388, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46770:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46770:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46769:17:6" + }, + "returnParameters": { + "id": 8393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8392, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46855:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "46855:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8409, + "src": "47095:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47095:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8419, + "src": "47336:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47336:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" + } + ] + }, + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, + "parameters": { + "id": 8433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47885:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" + }, + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 6234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { + "hexValue": "30", + "id": 6233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3057:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6231, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3048:7:6", + "typeDescriptions": {} + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3048:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } + }, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6263, + "indexed": true, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5003:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6265, + "indexed": false, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5037:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6267, + "indexed": false, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5066:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5066:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6269, + "indexed": false, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5093:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5093:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4922:190:6" + }, + "src": "4899:214:6" + }, + { + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6287, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5386:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5375:96:6" + }, + "src": "5351:121:6" + }, + { + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5685:47:6" + }, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6313, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6315, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6001:75:6" + }, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6337, + "indexed": false, + "mutability": "mutable", + "name": "_newCancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6129:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6129:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6339, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6260:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6235:41:6" + }, + "src": "6205:72:6" + }, + { + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", + "parameters": { + "id": 6352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6318:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6318:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6351, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6352:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6350, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6352:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6307:93:6" + }, + "src": "6285:116:6" + }, + { + "body": { + "id": 6374, + "nodeType": "Block", + "src": "6435:335:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 6365, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:60:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6372, + "nodeType": "ExpressionStatement", + "src": "6606:60:6" + }, + { + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6824:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6824:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6386, + "nodeType": "ExpressionStatement", + "src": "6816:55:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6980:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6980:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7010:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + }, + "value": "UNAUTHORIZED_C" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + } + ], + "id": 6387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6972:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" + }, + { + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" + } + ] + }, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, + "nodeType": "ParameterList", + "parameters": [], + "src": "6802:2:6" + }, + "src": "6778:353:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6416, + "nodeType": "Block", + "src": "7207:269:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "7271:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7271:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7345:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + }, + "value": "UNAUTHORIZED_V" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + } + ], + "id": 6403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7249:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7249:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6414, + "nodeType": "ExpressionStatement", + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ + { + "expression": { + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6419, + "src": "7549:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7532:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6425, + "nodeType": "ExpressionStatement", + "src": "7532:32:6" + }, + { + "expression": { + "id": 6430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7577:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6431, + "nodeType": "ExpressionStatement", + "src": "7577:27:6" + }, + { + "expression": { + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7615:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8937:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 6484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8905:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8905:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6490, + "nodeType": "ExpressionStatement", + "src": "8905:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9118:39:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 6491, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9110:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6500, + "nodeType": "ExpressionStatement", + "src": "9110:71:6" + }, + { + "assignments": [ + 6502 + ], + "declarations": [ + { + "constant": false, + "id": 6502, + "mutability": "mutable", + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 6582, + "src": "9372:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9394:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "9400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9400:106:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9394:112:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + } + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10020:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6540, + "name": "Promise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6189, + "src": "9723:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" + } + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], + "nodeType": "FunctionCall", + "src": "9723:327:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "src": "9707:343:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6556, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10063:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" + } + }, + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" + } + }, + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31370:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32175:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32160:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ + { + "expression": { + "id": 7696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7685, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32226:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7687, + "indexExpression": { + "id": 7686, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32241:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32226:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32226:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7690, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32301:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7692, + "indexExpression": { + "id": 7691, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32316:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32301:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32301:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7694, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "32358:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7689, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "32267:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32267:116:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "32226:157:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7697, + "nodeType": "ExpressionStatement", + "src": "32226:157:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7699, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32428:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7698, + "name": "LogExpirationTriggered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6311, + "src": "32405:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32405:51:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7703, + "nodeType": "EmitStatement", + "src": "32400:56:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7652, + "nodeType": "StructuredDocumentation", + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "d40ffcf8", + "id": 7707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerExpiration", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, + "parameters": { + "id": 7655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7654, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7707, + "src": "31766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31765:25:6" + }, + "returnParameters": { + "id": 7657, + "nodeType": "ParameterList", + "parameters": [], + "src": "31809:0:6" + }, + "scope": 8454, + "src": "31739:736:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9412 + ], + "body": { + "id": 7860, + "nodeType": "Block", + "src": "32688:2186:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32726:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32707:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32729:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32699:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7720, + "nodeType": "ExpressionStatement", + "src": "32699:47:6" + }, + { + "assignments": [ + 7722 + ], + "declarations": [ + { + "constant": false, + "id": 7722, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "32849:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7721, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32849:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7727, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7723, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32865:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7725, + "indexExpression": { + "id": 7724, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32880:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32865:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32865:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32849:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "32924:29:6", + "subExpression": { + "arguments": [ + { + "id": 7730, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "32934:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7731, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "32943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7729, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "32925:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32925:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32955:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32916:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32916:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7736, + "nodeType": "ExpressionStatement", + "src": "32916:59:6" + }, + { + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" + }, + { + "assignments": [ + 7741 + ], + "declarations": [ + { + "constant": false, + "id": 7741, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33090:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7740, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "33090:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7747, + "initialValue": { + "baseExpression": { + "id": 7742, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "33129:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7746, + "indexExpression": { + "arguments": [ + { + "id": 7744, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33164:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7743, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "33138:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33138:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33129:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33090:91:6" + }, + { + "condition": { + "arguments": [ + { + "id": 7749, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33207:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7779, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7778, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33699:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33699:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7825, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7741, + "src": "34534:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "34534:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34534:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34515:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34595:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34352:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34345:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } + } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" + } + ] + } + }, + "id": 7840, + "nodeType": "IfStatement", + "src": "33194:1432:6", + "trueBody": { + "id": 7777, + "nodeType": "Block", + "src": "33231:444:6", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 7753, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33259:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ + { + "expression": { + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33363:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33356:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7759, + "nodeType": "ExpressionStatement", + "src": "33356:11:6" + } + ] + } + } + ] + } + }, + { + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7708, + "nodeType": "StructuredDocumentation", + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "65c303bc", + "id": 7861, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerFinalizeVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, + "parameters": { + "id": 7711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7710, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35255:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35244:69:6" + }, + "returnParameters": { + "id": 7871, + "nodeType": "ParameterList", + "parameters": [], + "src": "35348:0:6" + }, + "scope": 8454, + "src": "35210:258:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 7914, + "nodeType": "Block", + "src": "35725:295:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7895, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35744:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "35744:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35779:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35736:65:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7903, + "nodeType": "ExpressionStatement", + "src": "35736:65:6" + }, + { + "expression": { + "id": 7906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35904:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7907, + "nodeType": "ExpressionStatement", + "src": "35904:40:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7909, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35980:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7908, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "35962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35962:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7913, + "nodeType": "EmitStatement", + "src": "35957:55:6" + } + ] + }, + "documentation": { + "id": 7887, + "nodeType": "StructuredDocumentation", + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" + }, + "functionSelector": "bd17de40", + "id": 7915, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7892, + "modifierName": { + "id": 7891, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "35710:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35710:9:6" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7889, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 7915, + "src": "35654:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35654:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35653:29:6" + }, + "returnParameters": { + "id": 7893, + "nodeType": "ParameterList", + "parameters": [], + "src": "35725:0:6" + }, + "scope": 8454, + "src": "35623:397:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9432 + ], + "body": { + "id": 7944, + "nodeType": "Block", + "src": "36278:275:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" + } + ] + }, + "documentation": { + "id": 7946, + "nodeType": "StructuredDocumentation", + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + }, + "functionSelector": "8990834b", + "id": 7965, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, + "parameters": { + "id": 7949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7948, + "mutability": "mutable", + "name": "_complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 7965, + "src": "36842:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "36841:25:6" + }, + "returnParameters": { + "id": 7953, + "nodeType": "ParameterList", + "parameters": [], + "src": "36927:0:6" + }, + "scope": 8454, + "src": "36815:234:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9426 + ], + "body": { + "id": 7984, + "nodeType": "Block", + "src": "37442:134:6", + "statements": [ + { + "expression": { + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7980, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37557:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7978, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37954:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38737:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38718:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 8026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38740:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 8022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "38710:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38710:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8028, + "nodeType": "ExpressionStatement", + "src": "38710:47:6" + }, + { + "assignments": [ + 8030 + ], + "declarations": [ + { + "constant": false, + "id": 8030, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "38860:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38860:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8034, + "initialValue": { + "arguments": [ + { + "id": 8032, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38907:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8031, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "38884:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38884:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40136:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" + } + ] + }, + "documentation": { + "id": 8064, + "nodeType": "StructuredDocumentation", + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + }, + "functionSelector": "d887b4e7", + "id": 8097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, + "parameters": { + "id": 8067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8066, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39775:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39775:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39774:24:6" + }, + "returnParameters": { + "id": 8075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" + }, + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9472 + ], + "body": { + "id": 8124, + "nodeType": "Block", + "src": "40558:147:6", + "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ + { + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41040:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8128, + "src": "41054:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" + } + ] + }, + "documentation": { + "id": 8126, + "nodeType": "StructuredDocumentation", + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" + }, + "functionSelector": "88106323", + "id": 8146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSellerDeposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, + "parameters": { + "id": 8129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8128, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40904:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40904:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40903:24:6" + }, + "returnParameters": { + "id": 8133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" + }, + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9550 + ], + "body": { + "id": 8166, + "nodeType": "Block", + "src": "41487:114:6", + "statements": [ + { + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" + } + ] + }, + "documentation": { + "id": 8147, + "nodeType": "StructuredDocumentation", + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" + }, + "functionSelector": "1f38585f", + "id": 8167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupplyHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, + "parameters": { + "id": 8150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8149, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41383:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41382:24:6" + }, + "returnParameters": { + "id": 8154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" + }, + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9628 + ], + "body": { + "id": 8202, + "nodeType": "Block", + "src": "41981:173:6", + "statements": [ + { + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "42018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8200, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" + } + ] + }, + "documentation": { + "id": 8168, + "nodeType": "StructuredDocumentation", + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" + }, + "functionSelector": "a1e5e3f9", + "id": 8203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseData", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, + "parameters": { + "id": 8171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8170, + "mutability": "mutable", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41929:46:6" + }, + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" + }, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8263, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43588:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43588:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8267, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43678:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43678:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8278, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44119:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44119:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "44118:9:6" + }, + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, + "parameters": { + "id": 8294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8293, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44451:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8297, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44541:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8296, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "44541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "44540:7:6" + }, + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ + { + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" + } + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, + "parameters": { + "id": 8309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8308, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44841:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44840:25:6" + }, + "returnParameters": { + "id": 8313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44932:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8311, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44932:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "44931:6:6" + }, + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ + { + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "45704:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "45703:25:6" + }, + "returnParameters": { + "id": 8351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45795:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8370, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8375, + "src": "46226:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8385, + "src": "46538:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8388, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46770:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46770:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46769:17:6" + }, + "returnParameters": { + "id": 8393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8392, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46855:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "46855:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8409, + "src": "47095:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47095:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8419, + "src": "47336:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47336:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" + } + ] + }, + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, + "parameters": { + "id": 8433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47885:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" + }, + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "compiler": { + "name": "solc", + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + } + }, + "links": {}, + "address": "0x374d7a42F86A6a5Ce864bbA462999aCccf9750E3", + "transactionHash": "0x16297c4fc5662415b53d6d2ff8c0aa3c53378e7d3af36ed78b5964d972924849" + }, + "5777": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event", + "signature": "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event", + "signature": "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event", + "signature": "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event", + "signature": "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event", + "signature": "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event", + "signature": "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event", + "signature": "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event", + "signature": "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event", + "signature": "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event", + "signature": "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event", + "signature": "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event", + "signature": "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event", + "signature": "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event", + "signature": "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event", + "signature": "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event", + "signature": "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa" + } + }, + "links": {}, + "address": "0x7589e53b8a55212Af8b3ad6ef5c31D9c02bFA25F", + "transactionHash": "0x1a2a3135e2b562ab632c96a5446871a701f7b0c338f60a8b87a4713c5e5ef3d9" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T10:31:40.059Z", + "networkType": "ethereum", + "devdoc": { + "details": "Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931", + "kind": "dev", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "details": "Token ID is derived following the same principles for both ERC-1155 and ERC-721", + "params": { + "_issuer": "The address of the token issuer", + "_qty": "qty that should be burned", + "_tokenIdSupply": "ID of the token type" + } + }, + "cancelOrFault(uint256,address)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "params": { + "_issuer": "owner of the voucher", + "_tokenIdSupply": "ID of the voucher set" + } + }, + "complain(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "params": { + "_paymentMethod": "might be ETHETH, ETHTKN, TKNETH or TKNTKN", + "_tokenDeposits": "token address which will hold the funds for the deposits of the voucher", + "_tokenIdSupply": "_tokenIdSupply of the voucher set this is related to", + "_tokenPrice": "token address which will hold the funds for the price of the voucher" + } + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "params": { + "_depositBu": "Buyer's deposit", + "_depositSe": "Seller's deposit", + "_price": "Price (payment amount)", + "_seller": "seller of the promise", + "_validFrom": "Start of valid period", + "_validTo": "End of valid period" + } + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "params": { + "_correlationId": "ID of the current interaction with the smart contract for a specific user", + "_holder": "Address of the recipient of the voucher (ERC-721)", + "_issuer": "Address of the token's issuer", + "_paymentMethod": "method being used for that particular order that needs to be fulfilled", + "_tokenIdSupply": "ID of the supply token (ERC-1155)" + } + }, + "getBosonRouterAddress()": { + "returns": { + "_0": "Address of the Boson Router contract" + } + }, + "getBuyerOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Buyer's deposit)" + } + }, + "getCancelFaultPeriod()": { + "returns": { + "_0": "cancel or fault period" + } + }, + "getCashierAddress()": { + "returns": { + "_0": "Address of the Cashier contract" + } + }, + "getComplainPeriod()": { + "returns": { + "_0": "complain period" + } + }, + "getIdSupplyFromVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the supply token" + } + }, + "getOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + } + }, + "getPromiseData(bytes32)": { + "params": { + "_promiseKey": "ID of the promise" + }, + "returns": { + "_0": "promise data not returned by other accessor methods" + } + }, + "getPromiseIdFromSupplyId(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseIdFromVoucherId(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseKey(uint256)": { + "params": { + "_idx": "Index in the array of promise keys" + }, + "returns": { + "_0": "Promise ID" + } + }, + "getRemQtyForSupply(uint256,address)": { + "params": { + "_owner": "holder of the Token Supply", + "_tokenSupplyId": "Token supply ID" + }, + "returns": { + "_0": "remaining quantity" + } + }, + "getSellerDeposit(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns sellers deposit" + } + }, + "getSupplyHolder(uint256)": { + "params": { + "_tokenIdSupply": "ID of the order (aka VoucherSet) which is mapped to the corresponding Promise." + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getTokenNonce(address)": { + "params": { + "_seller": "Address of the seller" + }, + "returns": { + "_0": "The seller's nonce" + } + }, + "getTokensContractAddress()": { + "returns": { + "_0": "Address of ERC1155ERC721 contract" + } + }, + "getTypeId()": { + "returns": { + "_0": "type Id" + } + }, + "getVoucherDepositToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherHolder(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getVoucherPaymentMethod(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "payment method" + } + }, + "getVoucherPriceToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherStatus(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Status of the voucher (via enum)" + } + }, + "isInValidityPeriod(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "isVoucherTransferable(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "redeem(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "refund(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setBosonRouterAddress(address)": { + "params": { + "_bosonRouterAddress": "The address of the BR contract" + } + }, + "setCancelFaultPeriod(uint256)": { + "params": { + "_cancelFaultPeriod": "the new value for cancelOrFault period (in number of seconds)" + } + }, + "setCashierAddress(address)": { + "params": { + "_cashierAddress": "The address of the BR contract" + } + }, + "setComplainPeriod(uint256)": { + "params": { + "_complainPeriod": "the new value for complain period (in number of seconds)" + } + }, + "setDepositsReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setPaymentReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "params": { + "_newSeller": "new holder of the supply", + "_tokenIdSupply": "_tokenIdSupply which will be transferred" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "triggerExpiration(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "triggerFinalizeVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + } + }, + "title": "VoucherKernel contract is controlling the core business logic", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "notice": "Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155" + }, + "cancelOrFault(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal" + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange." + }, + "complain(uint256,address)": { + "notice": "Issue a complain for a voucher" + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "notice": "Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set." + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future)." + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "notice": "Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder" + }, + "getBosonRouterAddress()": { + "notice": "Get address of the Boson Router to which this contract points" + }, + "getBuyerOrderCosts(uint256)": { + "notice": "Get Buyer costs required to make an order for a supply token" + }, + "getCancelFaultPeriod()": { + "notice": "Get the cancel or fault period" + }, + "getCashierAddress()": { + "notice": "Get address of the Cashier contract to which this contract points" + }, + "getComplainPeriod()": { + "notice": "Get the complain period" + }, + "getIdSupplyFromVoucher(uint256)": { + "notice": "Get the supply token ID from a voucher token" + }, + "getOrderCosts(uint256)": { + "notice": "Get all necessary funds for a supply token" + }, + "getPromiseData(bytes32)": { + "notice": "Get promise data not retrieved by other accessor functions" + }, + "getPromiseIdFromSupplyId(uint256)": { + "notice": "Get the promise ID from a voucher set" + }, + "getPromiseIdFromVoucherId(uint256)": { + "notice": "Get the promise ID from a voucher token" + }, + "getPromiseKey(uint256)": { + "notice": "Get the promise ID at specific index" + }, + "getRemQtyForSupply(uint256,address)": { + "notice": "Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account" + }, + "getSellerDeposit(uint256)": { + "notice": "Get Seller deposit" + }, + "getSupplyHolder(uint256)": { + "notice": "Get the holder of a supply" + }, + "getTokenNonce(address)": { + "notice": "Get the token nonce for a seller" + }, + "getTokensContractAddress()": { + "notice": "Get the address of ERC1155ERC721 contract" + }, + "getTypeId()": { + "notice": "Get the current type Id" + }, + "getVoucherDepositToken(uint256)": { + "notice": "Get the address of the token where the deposits for the supply are held" + }, + "getVoucherHolder(uint256)": { + "notice": "Get the holder of a voucher" + }, + "getVoucherPaymentMethod(uint256)": { + "notice": "Get the payment method for a particular _tokenIdSupply" + }, + "getVoucherPriceToken(uint256)": { + "notice": "Get the address of the token where the price for the supply is held" + }, + "getVoucherStatus(uint256)": { + "notice": "Get the current status of a voucher" + }, + "isInValidityPeriod(uint256)": { + "notice": "Checks whether a voucher is in valid period for redemption (between start date and end date)" + }, + "isVoucherTransferable(uint256)": { + "notice": "Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred" + }, + "pause()": { + "notice": "Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function." + }, + "redeem(uint256,address)": { + "notice": "Redemption of the vouchers promise" + }, + "refund(uint256,address)": { + "notice": "Refunding a voucher" + }, + "setBosonRouterAddress(address)": { + "notice": "Set the address of the Boson Router contract" + }, + "setCancelFaultPeriod(uint256)": { + "notice": "Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setCashierAddress(address)": { + "notice": "Set the address of the Cashier contract" + }, + "setComplainPeriod(uint256)": { + "notice": "Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setDepositsReleased(uint256)": { + "notice": "Mark voucher token that the deposits were released" + }, + "setPaymentReleased(uint256)": { + "notice": "Mark voucher token that the payment was released" + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "notice": "Set the address of the new holder of a _tokenIdSupply on transfer" + }, + "triggerExpiration(uint256)": { + "notice": "Mark voucher token as expired" + }, + "triggerFinalizeVoucher(uint256)": { + "notice": "Mark voucher token to the final status" + }, + "unpause()": { + "notice": "Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/external/lambdas/triggerExpirations/src/configs.js b/external/lambdas/triggerExpirations/src/configs.js new file mode 100644 index 00000000..865efa32 --- /dev/null +++ b/external/lambdas/triggerExpirations/src/configs.js @@ -0,0 +1,45 @@ +const AWS = require('aws-sdk') +const region = "eu-west-2" +const sm = new AWS.SecretsManager({region}) +const ethers = require('ethers') + +const getSecrets = async (SecretId) => { + return await new Promise((resolve, reject) => { + sm.getSecretValue({SecretId}, (err, result) => { + if (err) reject(err) + else resolve(JSON.parse(result.SecretString)) + }) + }) +} + +const configs = { + local: () => { + throw new Error('Local run is expected to use config defined in a specific module') + }, + cloud: secrets => { + const apiUrl = secrets.apiurl; + + return { + VOUCHER_KERNEL_ADDRESS: secrets.voucherkerneladdress, + CASHIER_ADDRESS: secrets.cashieraddress, + EXECUTOR_PRIVATE_KEY: secrets.executorsecret, + API_URL: apiUrl, + ALL_VOUCHERS_URL: `${apiUrl}/vouchers/all`, + UPDATE_STATUS_URL: `${apiUrl}/vouchers/update-status-from-keepers`, + WITHDRAW_VOUCHER_URL: `${apiUrl}/payments/create-payment`, + GCLOUD_SECRET: secrets.gcloudsecret, + GAS_LIMIT: "6000000", + PROVIDER: ethers.getDefaultProvider(secrets.networkname, { + etherscan: secrets.etherscanapikey, + infura: secrets.infuraapikey, + }) + } + } +}; + +async function getConfigParams(SecretId, env) { + const secrets = env != 'local' ? await getSecrets(SecretId) : '' + return configs[env](secrets); +} + +module.exports = getConfigParams; diff --git a/external/lambdas/triggerExpirations/src/index.js b/external/lambdas/triggerExpirations/src/index.js new file mode 100644 index 00000000..ed909f48 --- /dev/null +++ b/external/lambdas/triggerExpirations/src/index.js @@ -0,0 +1,181 @@ +const ethers = require("ethers"); +const axios = require("axios").default; + +const getConfigParams = require('./configs') +const BN = ethers.BigNumber.from; + +const VoucherKernel = require("./abis/VoucherKernel.json"); +const utils = require("./utils"); + +exports.handler = async (config) => { + if (!config) { + config = await getConfigParams(process.env.SSM_SECRET, "cloud"); + } + const executor = new ethers.Wallet(config.EXECUTOR_PRIVATE_KEY, config.PROVIDER); + + axios.defaults.headers.common = { + Authorization: `Bearer ${config.GCLOUD_SECRET}`, + }; + + // Expiration process + await triggerExpirations(executor, config); + + const response = { + statusCode: 200, + body: `Expirations process was executed successfully!` + }; + + return response; +}; + +async function triggerExpirations(executor, config) { + let hasErrors = false; + let voucherKernelContractExecutor = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + let res; + + try { + res = await axios.get(config.ALL_VOUCHERS_URL); + } catch (e) { + hasErrors = true; + console.log(`Error while getting all vouchers from the DB. Error: ${e}`); + } + + if ( + typeof res === "undefined" || + !Object.prototype.hasOwnProperty.call(res, "data") + ) + return; + + for (let i = 0; i < res.data.vouchers.length; i++) { + let voucher = res.data.vouchers[i]; + let voucherStatus; // 0 - status, 1 - isPaymentReleased, 2 - isDepositsReleased + let voucherID = voucher._tokenIdVoucher; + let isStatusCommit = false; + + if (!voucher.blockchainAnchored) { + console.log(`Voucher: ${voucherID} is not anchored on blockchain`); + continue; + } + + if (voucher.EXPIRED) { + console.log(`Voucher: ${voucherID} is already expired`); + continue; + } + + try { + // eslint-disable-next-line no-await-in-loop + voucherStatus = await voucherKernelContractExecutor.getVoucherStatus( + voucherID + ); + isStatusCommit = utils.isStateCommitted(voucherStatus[0]); + } catch (e) { + hasErrors = true; + console.log( + `Error while checking voucher status toward the contract. Error: ${e}` + ); + continue; + } + + try { + let isExpired = utils.isStatus(voucherStatus[0], utils.IDX_EXPIRE); + + if (isExpired) { + console.log( + `Voucher: ${voucherID} is expired, but the DB was not updated while the event was triggered. Updating Database only.` + ); + + const payload = [ + { + _tokenIdVoucher: voucherID, + status: "EXPIRED", + }, + ]; + await axios.patch(config.UPDATE_STATUS_URL, payload); + console.log(`Voucher: ${voucherID}. Database updated.`); + continue; + } + } catch (error) { + console.log(error); + continue; + } + + if ( + !isStatusCommit || + !(await shouldTriggerExpiration(config, executor, voucherID)) + ) { + console.log(`Expiration still should not be triggered towards the contract for Voucher: ${voucherID}.`); + continue; + } + + console.log( + `Voucher: ${voucherID} is with commit status. The expiration is triggered.` + ); + + let receipt; + + try { + let txOrder = await voucherKernelContractExecutor.triggerExpiration( + voucherID + ); + receipt = await txOrder.wait(); + } catch (e) { + hasErrors = true; + console.log( + `Error while triggering expiration of the voucher. Error: ${e}` + ); + } + + let parsedEvent = await utils.findEventByName( + receipt, + "LogExpirationTriggered", + "_tokenIdVoucher", + "_triggeredBy" + ); + + if (parsedEvent && parsedEvent[0]) { + parsedEvent[0]._tokenIdVoucher = voucherID; + const payload = [ + { + ...parsedEvent[0], + status: "EXPIRED", + }, + ]; + + console.log(`Voucher: ${voucherID}. The expiration finished.`); + + try { + await axios.patch(config.UPDATE_STATUS_URL, payload); + + console.log(`Voucher: ${voucherID}. Database updated.`); + } catch (e) { + hasErrors = true; + console.log(e); + console.log( + `Error while updating the DB related to finalization of the voucher. Error: ${e}` + ); + continue; + } + } + } + + let infoMsg = hasErrors + ? "triggerExpirations function finished with errors" + : "triggerExpirations function finished successfully"; + + console.info(infoMsg); +} + +async function shouldTriggerExpiration(config, executor, voucherId) { + let currTimestamp = await utils.getCurrTimestamp(executor.provider); + let voucherValidTo = await utils.getVoucherValidTo( + config, + executor, + voucherId + ); + + return voucherValidTo < currTimestamp; +} \ No newline at end of file diff --git a/external/lambdas/triggerExpirations/src/package.json b/external/lambdas/triggerExpirations/src/package.json new file mode 100644 index 00000000..86048ea7 --- /dev/null +++ b/external/lambdas/triggerExpirations/src/package.json @@ -0,0 +1,15 @@ +{ + "name": "aws-lambda-functions", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "node -e \"(async () => console.log(await require('./index').handler({})))();\"" + }, + "dependencies": { + "@aws-sdk/client-s3": "^3.3.0", + "@aws-sdk/node-http-handler": "^3.3.0", + "aws-sdk": "^2.903.0", + "axios": "^0.20.0", + "ethers": "^5.0.14" + } +} diff --git a/external/lambdas/triggerExpirations/src/utils.js b/external/lambdas/triggerExpirations/src/utils.js new file mode 100644 index 00000000..53c08adb --- /dev/null +++ b/external/lambdas/triggerExpirations/src/utils.js @@ -0,0 +1,116 @@ +const ethers = require("ethers"); +const VoucherKernel = require("./abis/VoucherKernel.json"); + +const ONE = 1; + +const IDX_COMMIT = 7; +const IDX_REDEEM = 6; +const IDX_REFUND = 5; +const IDX_EXPIRE = 4; +const IDX_COMPLAIN = 3; +const IDX_CANCEL_FAULT = 2; +const IDX_FINAL = 1; + +async function findEventByName(txReceipt, eventName, ...eventFields) { + if (typeof txReceipt !== "object" || txReceipt === null) return; + + let eventsArr = []; + + for (const key in txReceipt.events) { + if ( + Object.prototype.hasOwnProperty.call(txReceipt.events, key) && + txReceipt.events[key].event === eventName + ) { + const event = txReceipt.events[key]; + + const resultObj = { + txHash: txReceipt.transactionHash, + }; + + for (let index = 0; index < eventFields.length; index++) { + resultObj[eventFields[index]] = event.args[ + eventFields[index] + ].toString(); + } + eventsArr.push(resultObj); + } + } + + return eventsArr; +} + +function isStatus(_status, idx) { + return (_status >> idx) & (ONE == 1); +} + +async function getComplainPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getComplainPeriod(); +} + +async function getCancelFaultPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getCancelFaultPeriod(); +} + +async function getVoucherValidTo(config, executor, voucherId) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + const promiseKey = await vk.getPromiseIdFromVoucherId(voucherId); + return (await vk.getPromiseData(promiseKey))[3].toString(); +} + +async function getCurrTimestamp(provider) { + let blockNumber = await provider.getBlockNumber(); + let block = await provider.getBlock(blockNumber); + + return block.timestamp; +} + +function isStateCommitted(status) { + return status == setChange(0, IDX_COMMIT); +} + +function isStateRedemptionSigned(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REDEEM); +} + +function isStateRefunded(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REFUND); +} + +function isStateExpired(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_EXPIRE); +} + +function setChange(status, changeIdx) { + return status | (ONE << changeIdx); +} + +module.exports = { + IDX_FINAL, + IDX_EXPIRE, + IDX_COMPLAIN, + IDX_CANCEL_FAULT, + findEventByName, + isStatus, + getCurrTimestamp, + getComplainPeriod, + getCancelFaultPeriod, + getVoucherValidTo, + isStateCommitted, + isStateRedemptionSigned, + isStateRefunded, + isStateExpired, +}; diff --git a/external/lambdas/triggerExpirations/update-fn.sh b/external/lambdas/triggerExpirations/update-fn.sh new file mode 100644 index 00000000..332686cc --- /dev/null +++ b/external/lambdas/triggerExpirations/update-fn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +aws lambda update-function-code --function-name "triggerExpirationsDev" --zip-file "fileb://./src.zip" \ No newline at end of file diff --git a/external/lambdas/triggerExpirations/zip.sh b/external/lambdas/triggerExpirations/zip.sh new file mode 100644 index 00000000..2aeca917 --- /dev/null +++ b/external/lambdas/triggerExpirations/zip.sh @@ -0,0 +1 @@ +zip -r src.zip src/ \ No newline at end of file diff --git a/external/lambdas/triggerFinalizations/create-fn.sh b/external/lambdas/triggerFinalizations/create-fn.sh new file mode 100644 index 00000000..7dfa1bfa --- /dev/null +++ b/external/lambdas/triggerFinalizations/create-fn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +aws lambda create-function --function-name "triggerFinalizationsDev" --runtime "nodejs14.x" --role "arn:aws:iam::237351624248:role/aws-basic-lambda-executon" --timeout 900 --handler "src/index.handler" --region "us-east-2" --zip-file "fileb://./src.zip" \ No newline at end of file diff --git a/external/lambdas/triggerFinalizations/src/abis/VoucherKernel.json b/external/lambdas/triggerFinalizations/src/abis/VoucherKernel.json new file mode 100644 index 00000000..ce42ce3c --- /dev/null +++ b/external/lambdas/triggerFinalizations/src/abis/VoucherKernel.json @@ -0,0 +1,61300 @@ +{ + "contractName": "VoucherKernel", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_tokensContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositSe", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositBu", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + } + ], + "name": "createTokenSupplyID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, + { + "internalType": "address", + "name": "_tokenPrice", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenDeposits", + "type": "address" + } + ], + "name": "createPaymentMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "fillOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_qty", + "type": "uint256" + } + ], + "name": "burnSupplyOnPause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "redeem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "complain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "cancelOrFault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "cancelOrFaultVoucherSet", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "setPaymentReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "setDepositsReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "triggerExpiration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "triggerFinalizeVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_newSeller", + "type": "address" + } + ], + "name": "setSupplyHolderOnTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_bosonRouterAddress", + "type": "address" + } + ], + "name": "setBosonRouterAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_cashierAddress", + "type": "address" + } + ], + "name": "setCashierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_complainPeriod", + "type": "uint256" + } + ], + "name": "setComplainPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cancelFaultPeriod", + "type": "uint256" + } + ], + "name": "setCancelFaultPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "getPromiseKey", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getIdSupplyFromVoucher", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getPromiseIdFromVoucherId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenSupplyId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "getRemQtyForSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getBuyerOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSellerDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSupplyHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_promiseKey", + "type": "bytes32" + } + ], + "name": "getPromiseData", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getVoucherStatus", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getVoucherHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPriceToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherDepositToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPaymentMethod", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isInValidityPeriod", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isVoucherTransferable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getBosonRouterAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCashierAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + } + ], + "name": "getTokenNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTypeId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getComplainPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCancelFaultPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getPromiseIdFromSupplyId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTokensContractAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokensContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newBosonRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogBosonRouterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newCancelFaultPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCancelFaultPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newCashier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCashierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newComplainPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogComplainPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogExpirationTriggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogFinalizeVoucher\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"LogFundsReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"LogPromiseCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherComplain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"LogVoucherDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"}],\"name\":\"LogVoucherRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"LogVoucherSetFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_qty\",\"type\":\"uint256\"}],\"name\":\"burnSupplyOnPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"cancelOrFault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"cancelOrFaultVoucherSet\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"complain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_tokenPrice\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenDeposits\",\"type\":\"address\"}],\"name\":\"createPaymentMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositSe\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositBu\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"createTokenSupplyID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"fillOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBosonRouterAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getBuyerOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancelFaultPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCashierAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getComplainPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getIdSupplyFromVoucher\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_promiseKey\",\"type\":\"bytes32\"}],\"name\":\"getPromiseData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromSupplyId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromVoucherId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"getPromiseKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenSupplyId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getRemQtyForSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSellerDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSupplyHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"getTokenNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokensContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTypeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherDepositToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPaymentMethod\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPriceToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherStatus\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isInValidityPeriod\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isVoucherTransferable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bosonRouterAddress\",\"type\":\"address\"}],\"name\":\"setBosonRouterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_cancelFaultPeriod\",\"type\":\"uint256\"}],\"name\":\"setCancelFaultPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_cashierAddress\",\"type\":\"address\"}],\"name\":\"setCashierAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_complainPeriod\",\"type\":\"uint256\"}],\"name\":\"setComplainPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setDepositsReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setPaymentReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_newSeller\",\"type\":\"address\"}],\"name\":\"setSupplyHolderOnTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerExpiration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerFinalizeVoucher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\",\"kind\":\"dev\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"details\":\"Token ID is derived following the same principles for both ERC-1155 and ERC-721\",\"params\":{\"_issuer\":\"The address of the token issuer\",\"_qty\":\"qty that should be burned\",\"_tokenIdSupply\":\"ID of the token type\"}},\"cancelOrFault(uint256,address)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"cancelOrFaultVoucherSet(uint256,address)\":{\"params\":{\"_issuer\":\"owner of the voucher\",\"_tokenIdSupply\":\"ID of the voucher set\"}},\"complain(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"createPaymentMethod(uint256,uint8,address,address)\":{\"params\":{\"_paymentMethod\":\"might be ETHETH, ETHTKN, TKNETH or TKNTKN\",\"_tokenDeposits\":\"token address which will hold the funds for the deposits of the voucher\",\"_tokenIdSupply\":\"_tokenIdSupply of the voucher set this is related to\",\"_tokenPrice\":\"token address which will hold the funds for the price of the voucher\"}},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"_depositBu\":\"Buyer's deposit\",\"_depositSe\":\"Seller's deposit\",\"_price\":\"Price (payment amount)\",\"_seller\":\"seller of the promise\",\"_validFrom\":\"Start of valid period\",\"_validTo\":\"End of valid period\"}},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"params\":{\"_correlationId\":\"ID of the current interaction with the smart contract for a specific user\",\"_holder\":\"Address of the recipient of the voucher (ERC-721)\",\"_issuer\":\"Address of the token's issuer\",\"_paymentMethod\":\"method being used for that particular order that needs to be fulfilled\",\"_tokenIdSupply\":\"ID of the supply token (ERC-1155)\"}},\"getBosonRouterAddress()\":{\"returns\":{\"_0\":\"Address of the Boson Router contract\"}},\"getBuyerOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Buyer's deposit)\"}},\"getCancelFaultPeriod()\":{\"returns\":{\"_0\":\"cancel or fault period\"}},\"getCashierAddress()\":{\"returns\":{\"_0\":\"Address of the Cashier contract\"}},\"getComplainPeriod()\":{\"returns\":{\"_0\":\"complain period\"}},\"getIdSupplyFromVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the supply token\"}},\"getOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\"}},\"getPromiseData(bytes32)\":{\"params\":{\"_promiseKey\":\"ID of the promise\"},\"returns\":{\"_0\":\"promise data not returned by other accessor methods\"}},\"getPromiseIdFromSupplyId(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseIdFromVoucherId(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseKey(uint256)\":{\"params\":{\"_idx\":\"Index in the array of promise keys\"},\"returns\":{\"_0\":\"Promise ID\"}},\"getRemQtyForSupply(uint256,address)\":{\"params\":{\"_owner\":\"holder of the Token Supply\",\"_tokenSupplyId\":\"Token supply ID\"},\"returns\":{\"_0\":\"remaining quantity\"}},\"getSellerDeposit(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns sellers deposit\"}},\"getSupplyHolder(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getTokenNonce(address)\":{\"params\":{\"_seller\":\"Address of the seller\"},\"returns\":{\"_0\":\"The seller's nonce\"}},\"getTokensContractAddress()\":{\"returns\":{\"_0\":\"Address of ERC1155ERC721 contract\"}},\"getTypeId()\":{\"returns\":{\"_0\":\"type Id\"}},\"getVoucherDepositToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherHolder(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getVoucherPaymentMethod(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"payment method\"}},\"getVoucherPriceToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherStatus(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Status of the voucher (via enum)\"}},\"isInValidityPeriod(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"isVoucherTransferable(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"refund(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setBosonRouterAddress(address)\":{\"params\":{\"_bosonRouterAddress\":\"The address of the BR contract\"}},\"setCancelFaultPeriod(uint256)\":{\"params\":{\"_cancelFaultPeriod\":\"the new value for cancelOrFault period (in number of seconds)\"}},\"setCashierAddress(address)\":{\"params\":{\"_cashierAddress\":\"The address of the BR contract\"}},\"setComplainPeriod(uint256)\":{\"params\":{\"_complainPeriod\":\"the new value for complain period (in number of seconds)\"}},\"setDepositsReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setPaymentReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setSupplyHolderOnTransfer(uint256,address)\":{\"params\":{\"_newSeller\":\"new holder of the supply\",\"_tokenIdSupply\":\"_tokenIdSupply which will be transferred\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"triggerExpiration(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"triggerFinalizeVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}}},\"title\":\"VoucherKernel contract is controlling the core business logic\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"notice\":\"Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\"},\"cancelOrFault(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\"},\"cancelOrFaultVoucherSet(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\"},\"complain(uint256,address)\":{\"notice\":\"Issue a complain for a voucher\"},\"createPaymentMethod(uint256,uint8,address,address)\":{\"notice\":\"Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\"},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future).\"},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"notice\":\"Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\"},\"getBosonRouterAddress()\":{\"notice\":\"Get address of the Boson Router to which this contract points\"},\"getBuyerOrderCosts(uint256)\":{\"notice\":\"Get Buyer costs required to make an order for a supply token\"},\"getCancelFaultPeriod()\":{\"notice\":\"Get the cancel or fault period\"},\"getCashierAddress()\":{\"notice\":\"Get address of the Cashier contract to which this contract points\"},\"getComplainPeriod()\":{\"notice\":\"Get the complain period\"},\"getIdSupplyFromVoucher(uint256)\":{\"notice\":\"Get the supply token ID from a voucher token\"},\"getOrderCosts(uint256)\":{\"notice\":\"Get all necessary funds for a supply token\"},\"getPromiseData(bytes32)\":{\"notice\":\"Get promise data not retrieved by other accessor functions\"},\"getPromiseIdFromSupplyId(uint256)\":{\"notice\":\"Get the promise ID from a voucher set\"},\"getPromiseIdFromVoucherId(uint256)\":{\"notice\":\"Get the promise ID from a voucher token\"},\"getPromiseKey(uint256)\":{\"notice\":\"Get the promise ID at specific index\"},\"getRemQtyForSupply(uint256,address)\":{\"notice\":\"Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\"},\"getSellerDeposit(uint256)\":{\"notice\":\"Get Seller deposit\"},\"getSupplyHolder(uint256)\":{\"notice\":\"Get the holder of a supply\"},\"getTokenNonce(address)\":{\"notice\":\"Get the token nonce for a seller\"},\"getTokensContractAddress()\":{\"notice\":\"Get the address of ERC1155ERC721 contract\"},\"getTypeId()\":{\"notice\":\"Get the current type Id\"},\"getVoucherDepositToken(uint256)\":{\"notice\":\"Get the address of the token where the deposits for the supply are held\"},\"getVoucherHolder(uint256)\":{\"notice\":\"Get the holder of a voucher\"},\"getVoucherPaymentMethod(uint256)\":{\"notice\":\"Get the payment method for a particular _tokenIdSupply\"},\"getVoucherPriceToken(uint256)\":{\"notice\":\"Get the address of the token where the price for the supply is held\"},\"getVoucherStatus(uint256)\":{\"notice\":\"Get the current status of a voucher\"},\"isInValidityPeriod(uint256)\":{\"notice\":\"Checks whether a voucher is in valid period for redemption (between start date and end date)\"},\"isVoucherTransferable(uint256)\":{\"notice\":\"Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\"},\"pause()\":{\"notice\":\"Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function.\"},\"redeem(uint256,address)\":{\"notice\":\"Redemption of the vouchers promise\"},\"refund(uint256,address)\":{\"notice\":\"Refunding a voucher\"},\"setBosonRouterAddress(address)\":{\"notice\":\"Set the address of the Boson Router contract\"},\"setCancelFaultPeriod(uint256)\":{\"notice\":\"Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setCashierAddress(address)\":{\"notice\":\"Set the address of the Cashier contract\"},\"setComplainPeriod(uint256)\":{\"notice\":\"Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setDepositsReleased(uint256)\":{\"notice\":\"Mark voucher token that the deposits were released\"},\"setPaymentReleased(uint256)\":{\"notice\":\"Mark voucher token that the payment was released\"},\"setSupplyHolderOnTransfer(uint256,address)\":{\"notice\":\"Set the address of the new holder of a _tokenIdSupply on transfer\"},\"triggerExpiration(uint256)\":{\"notice\":\"Mark voucher token as expired\"},\"triggerFinalizeVoucher(uint256)\":{\"notice\":\"Mark voucher token to the final status\"},\"unpause()\":{\"notice\":\"Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":\"VoucherKernel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol\":{\"keccak256\":\"0x867daada4cae6f8f547fc7eba2db9f8aa282228901c125e773dfd808943a235a\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://e50dc3939a48de65fd3ba74d54c20d2370adad18ddc97c8dca721839d20e0224\",\"dweb:/ipfs/QmcL6Z8wCcQfgcTQ2UH4vyJ84hYckJW7LGpN6oKg2kQKBm\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":{\"keccak256\":\"0x3d7decc1350a42e2a425ef915c8d0ddf5143289ee9e578c64727cf1393969836\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://fb17e7fca89026ae4fdfed6887bf9027341161038f1a4f5693257874b42102f3\",\"dweb:/ipfs/QmckQ5mpGzPjVSv8u2ZD6zkv5JDf1THuQMSodaW75HwFQJ\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol\":{\"keccak256\":\"0x34796b446a93c5ac705507913582dcab993b7cc86429c5e272b99597b64e51d9\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://51ba6851cc9c12c62f8ba7f20780880d590f1030c265edee05158064b9f67a36\",\"dweb:/ipfs/QmNidTbLJeMMFFk3iftCeWP9pLsFxdSHsckvakXgKnxoKC\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol\":{\"keccak256\":\"0xb4b2da06924caa82a63fa15eebec3357f13bd6693a9601fc3e37689e8aca80fc\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://ee602fbf4081c7db5fab98da408eb74c5c3e49a843acf142f259ebf788012bc8\",\"dweb:/ipfs/QmQ6ASnm4weSxGmcy9PU4oGZAmnDKdrW4AQN4dDmuZJUii\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x39c55885f7e34a407316f0f15d337baaf69723252f154d7c727c97f818b23e5e\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://3c297eddef2d21c163eecc6758ae3fe9872594025eff98f22d3cb84d4771df9f\",\"dweb:/ipfs/QmTvQ8URMHEHy1GTBfYqkQZXcu1jb9DpxTWUbNFX7BrEX8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xff346a09a5d08dfe7196c4516d78522da0dec1bde99e04e0f3b269f96796d29f\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://197cdfdd6994addd3ef4702e3b367d4563f907106c6be50b2932cb7d336daf0c\",\"dweb:/ipfs/QmSKe383xVyeY8ecpEPHdvEevMVDR121Qqq4udmeaipXQe\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol\":{\"keccak256\":\"0x7b8243200a7630a258025cc2a9fa2fec0ec9f009b0f6e4b7dc0b0bdcb64b2761\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7a1037cfbea713ba1649ec7c9c44570e012cf3f2eafcec3fd7e8da323e81248b\",\"dweb:/ipfs/QmaZzB7rN4RyPhGgfn9Fkvf5K6ynd4owHj6vA8iMH2k3N9\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://19c0dfbf7bb7744af0c03156e372d0096e0d07de8805ead7722243b8b42276a3\",\"dweb:/ipfs/QmPEFDvi6mJZ3sVii3uBs3CQzAARXPFwCKiHG5zkiCmC4V\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x4c5617b558186dc4b2b994b18ab9236410cd2dd1d9ad1213bbcca2e1d5321ce8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27b103fe3d550cf3717751a2c67e14008806af25baa3916b5717eeb68a2767ad\",\"dweb:/ipfs/QmS6gG9XVCx3qco7ewaSgJdcQRfZuurqxqPnKmRJ3Dj7Fg\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620041fc380380620041fc833981810160405260208110156200003757600080fd5b5051600062000045620000ce565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b039290921691909117905562093a80600c819055600d55620000d2565b3390565b61411a80620000e26000396000f3fe608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "sourceMap": "1169:47176:6:-:0;;;7484:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7484:169:6;867:17:22;887:12;:10;:12::i;:::-;909:6;:18;;-1:-1:-1;;;;;;909:18:22;-1:-1:-1;;;;;909:18:22;;;;;;;942:43;;909:18;;-1:-1:-1;909:18:22;942:43;;909:6;;942:43;-1:-1:-1;928:5:29;918:15;;-1:-1:-1;;;;918:15:29;;;-1:-1:-1;7532:32:6;;-1:-1:-1;;;;;;7532:32:6;-1:-1:-1;;;;;7532:32:6;;;;;;;;;;7594:10;7577:14;:27;;;7615:17;:30;1169:47176;;598:104:27;685:10;598:104;:::o;1169:47176:6:-;;;;;;;", + "deployedSourceMap": "1169:47176:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47239:151;;;:::i;:::-;;;;;;;;;;;;;;;;38179:190;;;;;;;;;;;;;;;;-1:-1:-1;38179:190:6;;:::i;44418:205::-;;;;;;;;;;;;;;;;-1:-1:-1;44418:205:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;41358:243;;;;;;;;;;;;;;;;-1:-1:-1;41358:243:6;;:::i;:::-;;;;-1:-1:-1;;;;;41358:243:6;;;;;;;;;;;;;;42355:589;;;;;;;;;;;;;;;;-1:-1:-1;42355:589:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8074:81;;;:::i;:::-;;29860:573;;;;;;;;;;;;;;;;-1:-1:-1;29860:573:6;;;;;;-1:-1:-1;;;;;29860:573:6;;:::i;47851:196::-;;;;;;;;;;;;;;;;-1:-1:-1;47851:196:6;;:::i;45673:295::-;;;;;;;;;;;;;;;;-1:-1:-1;45673:295:6;;:::i;:::-;;;;;;;;;;;;;;;;;;1035:84:29;;;:::i;32613:2261:6:-;;;;;;;;;;;;;;;;-1:-1:-1;32613:2261:6;;:::i;21299:4356::-;;;;;;;;;;;;;;;;-1:-1:-1;21299:4356:6;;;;;;-1:-1:-1;;;;;21299:4356:6;;:::i;1700:145:22:-;;;:::i;17796:246:6:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17796:246:6;;;;;;;;;;;;;:::i;30666:396::-;;;;;;;;;;;;;;;;-1:-1:-1;30666:396:6;;:::i;8614:1740::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8614:1740:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;20288:816::-;;;;;;;;;;;;;;;;-1:-1:-1;20288:816:6;;;;;;-1:-1:-1;;;;;20288:816:6;;:::i;19015:1008::-;;;;;;;;;;;;;;;;-1:-1:-1;19015:1008:6;;;;;;-1:-1:-1;;;;;19015:1008:6;;:::i;37819:160::-;;;;;;;;;;;;;;;;-1:-1:-1;37819:160:6;;:::i;7835:77::-;;;:::i;40878:247::-;;;;;;;;;;;;;;;;-1:-1:-1;40878:247:6;;:::i;35210:258::-;;;;;;;;;;;;;;;;-1:-1:-1;35210:258:6;;;;;;-1:-1:-1;;;;;35210:258:6;;:::i;36815:234::-;;;;;;;;;;;;;;;;-1:-1:-1;36815:234:6;;:::i;1068:85:22:-;;;:::i;47006:135:6:-;;;:::i;47502:157::-;;;:::i;46125:160::-;;;:::i;44813:623::-;;;;;;;;;;;;;;;;-1:-1:-1;44813:623:6;;:::i;43997:213::-;;;;;;;;;;;;;;;;-1:-1:-1;43997:213:6;;:::i;41817:337::-;;;;;;;;;;;;;;;;-1:-1:-1;41817:337:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13347:790;;;;;;;;;;;;;;;;-1:-1:-1;13347:790:6;;;-1:-1:-1;;;;;13347:790:6;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;38559:438::-;;;;;;;;;;;;;;;;-1:-1:-1;38559:438:6;;:::i;35623:397::-;;;;;;;;;;;;;;;;-1:-1:-1;35623:397:6;-1:-1:-1;;;;;35623:397:6;;:::i;36166:387::-;;;;;;;;;;;;;;;;-1:-1:-1;36166:387:6;-1:-1:-1;;;;;36166:387:6;;:::i;48181:161::-;;;:::i;10896:572::-;;;;;;;;;;;;;;;;-1:-1:-1;10896:572:6;;;;;;;;;;-1:-1:-1;;;;;10896:572:6;;;;;;;;;;;;:::i;31739:736::-;;;;;;;;;;;;;;;;-1:-1:-1;31739:736:6;;:::i;39752:424::-;;;;;;;;;;;;;;;;-1:-1:-1;39752:424:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;39279:232;;;;;;;;;;;;;;;;-1:-1:-1;39279:232:6;;;;;;-1:-1:-1;;;;;39279:232:6;;:::i;43558:208::-;;;;;;;;;;;;;;;;-1:-1:-1;43558:208:6;;:::i;46747:169::-;;;;;;;;;;;;;;;;-1:-1:-1;46747:169:6;-1:-1:-1;;;;;46747:169:6;;:::i;31212:398::-;;;;;;;;;;;;;;;;-1:-1:-1;31212:398:6;;:::i;37324:252::-;;;;;;;;;;;;;;;;-1:-1:-1;37324:252:6;;:::i;1994:240:22:-;;;;;;;;;;;;;;;;-1:-1:-1;1994:240:22;-1:-1:-1;;;;;1994:240:22;;:::i;25836:3701:6:-;;;;;;;;;;;;;;;;-1:-1:-1;25836:3701:6;;;;;;-1:-1:-1;;;;;25836:3701:6;;:::i;43126:205::-;;;;;;;;;;;;;;;;-1:-1:-1;43126:205:6;;:::i;46441:151::-;;;:::i;40417:288::-;;;;;;;;;;;;;;;;-1:-1:-1;40417:288:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;47239:151;47368:14;;47239:151;:::o;38179:190::-;-1:-1:-1;;;;;;38334:27:6;;38179:190;;;;:::o;44418:205::-;44541:5;44571:30;;;:14;:30;;;;;:44;;;;44418:205::o;41358:243::-;41473:7;41519:29;;;:13;:29;;;;;;;;;41566:20;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;41566:27:6;;41358:243::o;42355:589::-;42486:5;42623:31;;;:14;:31;;;;;:38;;;42805:51;;;42740:50;42871:54;;;;42623:38;;;;;;42676:49;;;;;42740:50;;;;;;;;42805:51;42871:54;42355:589::o;8074:81::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8137:10:::1;:8;:10::i;:::-;8074:81::o:0;29860:573::-;6454:18;;30035:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;::::1;;30103:7:6::2;-1:-1:-1::0;;;;;30068:42:6::2;:31;30084:14;30068:15;:31::i;:::-;-1:-1:-1::0;;;;;30068:42:6::2;;30060:71;;;::::0;;-1:-1:-1;;;30060:71:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30060:71:6;;;;;;;;;;;;;::::2;;30144:14;30161:43;30180:14;30196:7;30161:18;:43::i;:::-;30144:60;;30234:1;30225:6;:10;30217:34;;;::::0;;-1:-1:-1;;;30217:34:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30217:34:6;;;;;;;;;;;;;::::2;;30279:14;::::0;30264:68:::2;::::0;;-1:-1:-1;;;30264:68:6;;-1:-1:-1;;;;;30264:68:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;30279:14;;;::::2;::::0;30264:35:::2;::::0;:68;;;;;30279:14:::2;::::0;30264:68;;;;;;;30279:14;;30264:68;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;30350:49:6::2;::::0;;;;;-1:-1:-1;;;;;30350:49:6;::::2;;::::0;::::2;::::0;;;::::2;::::0;-1:-1:-1;30350:49:6;;;;;;;;-1:-1:-1;30350:49:6::2;30419:6:::0;29860:573;-1:-1:-1;;;29860:573:6:o;47851:196::-;47977:7;48010:29;;;:13;:29;;;;;;;47851:196::o;45673:295::-;45795:4;45839:31;;;:14;:31;;;;;:49;;;;;;;:120;;-1:-1:-1;45909:31:6;;;;:14;:31;;;;;:50;;;;;;45839:120;45837:123;;45673:295;-1:-1:-1;;45673:295:6:o;1035:84:29:-;1082:4;1105:7;-1:-1:-1;;;1105:7:29;;;;;1035:84::o;32613:2261:6:-;32707:20;32699:47;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;;;;32849:13;32865:31;;;:14;:31;;;;;:38;;;32925:28;32865:38;;32925:8;:28::i;:::-;32924:29;32916:59;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;;;;33070:9;33090:23;;:::i;:::-;33129:8;:52;33138:42;33164:15;33138:25;:42::i;:::-;33129:52;;;;;;;;;;;;;;-1:-1:-1;33129:52:6;33090:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33090:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33198:31:6;;33207:7;;33198:8;:31::i;:::-;33194:1432;;;33250:35;33259:7;488:1:5;33250:8:6;:35::i;:::-;33246:418;;;33363:4;33356:11;;33246:418;;;33525:17;;33447:31;;;;:14;:31;;;;;:54;;;:95;33411:15;:131;33389:275;;33644:4;33637:11;;33389:275;33194:1432;;;33699:35;33708:7;488:1:5;33699:8:6;:35::i;:::-;:152;;;;-1:-1:-1;33837:14:6;;33783:31;;;;:14;:31;;;;;:51;;;:68;33751:15;:100;;33699:152;33681:945;;;33941:4;33934:11;;33681:945;;;33981:32;34005:7;33981:23;:32::i;:::-;:60;;;;34017:24;34033:7;34017:15;:24::i;:::-;33963:663;;;34296:14;;34221:31;;;;:14;:31;;;;;:51;;;:89;34185:15;:125;34163:209;;34352:4;34345:11;;33963:663;;;34393:23;34408:7;34393:14;:23::i;:::-;34389:237;;;34553:14;;34534:8;:16;;;:33;34515:15;:52;34511:104;;34595:4;34588:11;;34511:104;34642:4;34638:229;;;34704:84;34738:7;532:1:5;34704:15:6;:84::i;:::-;34663:31;;;;:14;:31;;;;;;;;;:125;;-1:-1:-1;;34663:125:6;;;;;;;;;;;;;34808:47;;;;;34844:10;34808:47;;;;;;;;;;;;;;;;;;;34638:229;32613:2261;;;;:::o;21299:4356::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;21471:15;;21488:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;21548:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;21539:62:::3;::::0;21548:38:::3;;437:1:5;21539:8:6;:62::i;:::-;21538:63;21516:131;;;::::0;;-1:-1:-1;;;21516:131:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21516:131:6;;;;;;;;;;;;;::::3;;21772:31;::::0;;;:14:::3;:31;::::0;;;;:38;21763:59:::3;::::0;21772:38:::3;;::::0;21763:8:::3;:59::i;:::-;21762:60;21740:127;;;::::0;;-1:-1:-1;;;21740:127:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21740:127:6;;;;;;;;;;;;;::::3;;22011:23;;:::i;:::-;22050:8;:52;22059:42;22085:15;22059:25;:42::i;:::-;22050:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;22050:52:6;;;22011:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;22011:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;22192:31;;;:14:::3;:31:::0;;;;:38;22011:91;;-1:-1:-1;22168:63:6::3;::::0;22192:38:::3;;22168:23;:63::i;:::-;:135;;;-1:-1:-1::0;22264:31:6::3;::::0;;;:14:::3;:31;::::0;;;;:38;22248:55:::3;::::0;22264:38:::3;;22248:15;:55::i;:::-;22150:3498;;;22384:31;::::0;;;:14:::3;:31;::::0;;;;:38;22353:127:::3;::::0;22384:38:::3;;488:1:5;22353:8:6;:127::i;:::-;22330:921;;22718:17;::::0;22672:14:::3;::::0;22589:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;:146;22545:15;:190;;22515:286;;;::::0;;-1:-1:-1;;;22515:286:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22515:286:6;;;;;;;;;;;;;::::3;;22330:921;;;23077:14;::::0;22994:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;22950:15;:141;;22920:237;;;::::0;;-1:-1:-1;;;22920:237:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22920:237:6;;;;;;;;;;;;;::::3;;23267:31;::::0;;;:14:::3;:31;::::0;;;;23324:33:::3;23267:54;::::0;::::3;:90:::0;23447:38;23413:118:::3;::::0;23447:38:::3;;437:1:5;23413:15:6;:118::i;:::-;23372:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:159;;-1:-1:-1;;23372:159:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;23553:35;;;;;;;::::3;::::0;;;;;;;;;::::3;22150:3498;;;23653:31;::::0;;;:14:::3;:31;::::0;;;;:38;23638:54:::3;::::0;23653:38:::3;;23638:14;:54::i;:::-;23634:2014;;;23763:31;::::0;;;:14:::3;:31;::::0;;;;:38;23732:127:::3;::::0;23763:38:::3;;488:1:5;23732:8:6;:127::i;:::-;23709:739;;24004:17;;23987:14;;23968:8;:16;;;:33;:53;23924:15;:97;;23894:193;;;::::0;;-1:-1:-1;;;23894:193:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;23894:193:6;;;;;;;;;;;;;::::3;23709:739;24274:14;;24255:8;:16;;;:33;24236:15;:52;;24206:148;;;::::0;;-1:-1:-1;;;24206:148:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24206:148:6;;;;;;;;;;;;;::::3;23634:2014;24864:31;::::0;;;:14:::3;:31;::::0;;;;:38;24855:66:::3;::::0;24864:38:::3;;488:1:5;24855:8:6;:66::i;:::-;24837:811;;;25093:14;::::0;25014:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:93:::3;24974:15;:133;;24948:217;;;::::0;;-1:-1:-1;;;24948:217:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24948:217:6;;;;;;;;;;;;;::::3;;25337:31;::::0;;;:14:::3;:31;::::0;;;;:38;25303:118:::3;::::0;25337:38:::3;;437:1:5;25303:15:6;:118::i;24837:811::-;25511:29;::::0;;-1:-1:-1;;;25511:29:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;25511:29:6;;;;;;;;;;;;;::::3;24837:811;7467:1;6761::::2;;21299:4356:::0;;:::o;1700:145:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1806:1:::1;1790:6:::0;;1769:40:::1;::::0;-1:-1:-1;;;;;1790:6:22;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1769:40:22;1806:1;;1769:40:::1;1836:1;1819:19:::0;;-1:-1:-1;;;;;;1819:19:22::1;::::0;;1700:145::o;17796:246:6:-;1614:8:29;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;6824:14:6::1;::::0;-1:-1:-1;;;;;6824:14:6::1;6816:55;;;::::0;;-1:-1:-1;;;6816:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;::::1;;6994:14;::::0;-1:-1:-1;;;;;6994:14:6::1;6980:10;:28;6972:55;;;::::0;;-1:-1:-1;;;6972:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;::::1;;17983:14:::2;::::0;17968:66:::2;::::0;;-1:-1:-1;;;17968:66:6;;-1:-1:-1;;;;;17968:66:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;17983:14;;;::::2;::::0;17968:35:::2;::::0;:66;;;;;17983:14:::2;::::0;17968:66;;;;;;;17983:14;;17968:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;17796:246:::0;;;:::o;30666:396::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;30804:20;30796:47:::1;;;::::0;;-1:-1:-1;;;30796:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;30796:47:6;;;;;;;;;;;;;::::1;;30944:31;::::0;;;:14:::1;:31;::::0;;;;;;;:56;;-1:-1:-1;;30944:56:6::1;;;::::0;;31018:36;;;;;;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31018:36:6;;;;;;;;;::::1;30666:396:::0;:::o;8614:1740::-;6454:18;;8885:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8927:8:::1;8913:10;:22;;8905:56;;;::::0;;-1:-1:-1;;;8905:56:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;8905:56:6;;;;;;;;;;;;;::::1;;9130:15;9148:9;9130:27;9118:8;:39;;9110:71;;;::::0;;-1:-1:-1;;;9110:71:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9110:71:6;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;9450:20:6;::::1;9372:11;9450:20:::0;;;:11:::1;:20;::::0;;;;;;;;:22;;::::1;::::0;::::1;::::0;;;9424:71;;-1:-1:-1;;;;;;9424:71:6::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9400:106;;;::::1;::::0;9523:11:::1;:18:::0;:22;9519:176:::1;;9600:13;::::0;;;:8:::1;:13;::::0;;;;:17:::1;;::::0;9588:11:::1;:30:::0;;9622:3;;9600:17;9588:30;::::1;;;;;;;;;;;;;:37;;9562:121;;;::::0;;-1:-1:-1;;;9562:121:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9562:121:6;;;;;;;;;;;;;::::1;;9723:327;;;;;;;;9757:3;9723:327;;;;9782:11;:20;9794:7;-1:-1:-1::0;;;;;9782:20:6::1;-1:-1:-1::0;;;;;9782:20:6::1;;;;;;;;;;;;;9723:327;;;;9825:7;-1:-1:-1::0;;;;;9723:327:6::1;;;;;9858:10;9723:327;;;;9892:8;9723:327;;;;9922:6;9723:327;;;;9954:10;9723:327;;;;9990:10;9723:327;;;;10020:11;:18;;;;9723:327;;::::0;9707:8:::1;:13;9716:3;9707:13;;;;;;;;;;;:343;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10063:11;10080:3;10063:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10187:7;-1:-1:-1::0;;;;;10102:188:6::1;10152:11;:20;10164:7;-1:-1:-1::0;;;;;10152:20:6::1;-1:-1:-1::0;;;;;10152:20:6::1;;;;;;;;;;;;;10134:3;10102:188;10209:10;10234:8;10278:1;10257:11;:18;;;;:22;10102:188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10310:36;10322:7;10331:3;10336:9;10310:11;:36::i;:::-;10303:43:::0;8614:1740;-1:-1:-1;;;;;;;;;8614:1740:6:o;20288:816::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;20458:15;;20475:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;20542:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;20525:56:::3;::::0;20542:38:::3;;20525:16;:56::i;:::-;20503:125;;;::::0;;-1:-1:-1;;;20503:125:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;20503:125:6;;;;;;;;;;;;;::::3;;20770:35;20789:15;20770:18;:35::i;:::-;-1:-1:-1::0;20818:31:6::3;::::0;;;:14:::3;:31;::::0;;;;20872:15:::3;20818:51;::::0;::::3;:69:::0;20969:38;20939:104:::3;::::0;20969:38:::3;;345:1:5;20939:15:6;:104::i;:::-;20898:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;20898:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;21061:35;;;;;;;::::3;::::0;;;;;;;;;::::3;6761:1:::2;;20288:816:::0;;:::o;19015:1008::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;19185:15;;19202:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;19293:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;19276:56:::3;::::0;19293:38:::3;;19276:16;:56::i;:::-;19254:123;;;::::0;;-1:-1:-1;;;19254:123:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;19254:123:6;;;;;;;;;;;;;::::3;;19505:35;19524:15;19505:18;:35::i;:::-;;19551:23;;:::i;:::-;19590:8;:52;19599:42;19625:15;19599:25;:42::i;:::-;19590:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;19590:52:6;;;19551:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;19551:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;19655:31;;;:14:::3;:31:::0;;;;;;;19709:15:::3;19655:51:::0;;::::3;:69:::0;;;;19806:38;;19551:91;;-1:-1:-1;19776:104:6::3;::::0;19806:38:::3;::::0;;::::3;::::0;19776:15:::3;:104::i;:::-;19735:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;19735:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;19986:18;;19898:117;;;;;-1:-1:-1;;;;;19898:117:6;::::3;::::0;;::::3;::::0;;;;;;;;;::::3;::::0;;;;;;;;::::3;7467:1;6761::::2;;19015:1008:::0;;:::o;37819:160::-;37922:7;37954:11;37966:4;37954:17;;;;;;;;;;;;;;;;37947:24;;37819:160;;;:::o;7835:77::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;7896:8:::1;:6;:8::i;40878:247::-:0;40994:7;41040:29;;;:13;:29;;;;;;;;;41087:20;;:8;:20;;;;;:30;;;;40878:247::o;35210:258::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;35359:18:::1;35380:29:::0;;;:13:::1;:29;::::0;;;;;;;;35420:20;;:8:::1;:20:::0;;;;;;:27:::1;;:40:::0;;-1:-1:-1;;;;;;35420:40:6::1;-1:-1:-1::0;;;;;35420:40:6;;::::1;::::0;;;::::1;::::0;;35210:258::o;36815:234::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;36938:14:6::1;:32:::0;;;36988:53:::1;::::0;;;;;37030:10:::1;36988:53;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;36815:234:::0;:::o;1068:85:22:-;1114:7;1140:6;-1:-1:-1;;;;;1140:6:22;1068:85;:::o;47006:135:6:-;47127:6;;47006:135;:::o;47502:157::-;47634:17;;47502:157;:::o;46125:160::-;46259:18;;-1:-1:-1;;;;;46259:18:6;46125:160;:::o;44813:623::-;44932:4;44987:23;;:::i;:::-;45026:8;:52;45035:42;45061:15;45035:25;:42::i;:::-;45026:52;;;;;;;;;;;;;;-1:-1:-1;45026:52:6;44987:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;44987:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;45119:15:6;-1:-1:-1;45097:37:6;45089:71;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;;;;45282:15;45262:8;:16;;;:35;;45254:67;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;;;;-1:-1:-1;45424:4:6;;44813:623;-1:-1:-1;;44813:623:6:o;43997:213::-;44119:7;44151:30;;;:14;:30;;;;;:51;;;-1:-1:-1;;;;;44151:51:6;;43997:213::o;41817:337::-;41930:7;41939;41948;41957;41966;41992:23;;:::i;:::-;-1:-1:-1;;;42018:21:6;;;;-1:-1:-1;;42018:8:6;:21;;;;;;;;;41992:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41992:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41992:47:6;;41817:337::o;13347:790::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;13566:19:::1;13588:39;13612:14;13588:23;:39::i;:::-;13566:61;;13683:14;13666:31;;:13;:31;;;13658:68;;;::::0;;-1:-1:-1;;;13658:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;13658:68:6;;;;;;;;;;;;;::::1;;13737:52;13756:14;13772:7;13781;13737:18;:52::i;:::-;13825:22;13850:44;13861:7;13870;13879:14;13850:10;:44::i;:::-;13825:69;;13946:14;13912:217;13975:14;14004:7;14026;14048:41;14074:14;14048:25;:41::i;:::-;13912:217;::::0;;;;;-1:-1:-1;;;;;13912:217:6;;::::1;;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;::::1;6761:1;;13347:790:::0;;;;;:::o;38559:438::-;38685:7;38718:20;38710:47;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;;;;38860:21;38884:39;38907:15;38884:22;:39::i;:::-;38941:38;38950:28;;;:13;:28;;;;;;;;;38941:38;;:8;:38;;;;;:48;;38559:438;-1:-1:-1;;;38559:438:6:o;35623:397::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;35744:33:6;::::1;35736:65;;;::::0;;-1:-1:-1;;;35736:65:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;35736:65:6;;;;;;;;;;;;;::::1;;35904:18;:40:::0;;-1:-1:-1;;;;;;35904:40:6::1;-1:-1:-1::0;;;;;35904:40:6;::::1;::::0;;::::1;::::0;;;35962:50:::1;::::0;;;;;36001:10:::1;35962:50;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;35623:397:::0;:::o;36166:387::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;36297:29:6;::::1;36289:61;;;::::0;;-1:-1:-1;;;36289:61:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;36289:61:6;;;;;;;;;;;;;::::1;;36453:14;:32:::0;;-1:-1:-1;;;;;;36453:32:6::1;-1:-1:-1::0;;;;;36453:32:6;::::1;::::0;;::::1;::::0;;;36503:42:::1;::::0;;;;;36534:10:::1;36503:42;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;36166:387:::0;:::o;48181:161::-;48320:14;;-1:-1:-1;;;;;48320:14:6;48181:161;:::o;10896:572::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;11142:1:::1;11125:14;:18;;;:58;;;;;11182:1;11164:14;:19;;;;11125:58;11103:130;;;::::0;;-1:-1:-1;;;11103:130:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11103:130:6;;;;;;;;;;;;;::::1;;11287:173;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;11287:173:6;;::::1;;::::0;;::::1;::::0;;;;;::::1;::::0;;;;;;-1:-1:-1;11254:30:6;;;:14:::1;:30:::0;;;;;;;:206;;;;;;;::::1;;;-1:-1:-1::0;;;;;;11254:206:6;;;::::1;-1:-1:-1::0;;11254:206:6;;::::1;::::0;;;::::1;;::::0;;;::::1;::::0;;;;;;;::::1;::::0;;;;;::::1;-1:-1:-1::0;;;;;;11254:206:6;;::::1;::::0;;;::::1;::::0;;10896:572::o;31739:736::-;31828:20;31820:47;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;;;;31970:23;;:::i;:::-;32009:8;:52;32018:42;32044:15;32018:25;:42::i;:::-;32009:52;;;;;;;;;;;;;;-1:-1:-1;32009:52:6;31970:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;31970:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32111:15:6;-1:-1:-1;32092:107:6;;;;-1:-1:-1;32160:31:6;;;;:14;:31;;;;;:38;32143:56;;32160:38;;32143:16;:56::i;:::-;32074:394;;;32301:31;;;;:14;:31;;;;;:38;32267:116;;32301:38;;390:1:5;32267:15:6;:116::i;:::-;32226:31;;;;:14;:31;;;;;;;;;:157;;-1:-1:-1;;32226:157:6;;;;;;;;;;;;;32405:51;;;;;32445:10;32405:51;;;;;;;;;;;;;;;;;;;32074:394;31739:736;;:::o;39752:424::-;39879:7;39979:29;;;:13;:29;;;;;;;;;40041:20;;:8;:20;;;;;:26;;;;40082:30;;;;40127;;;;;40041:26;;39752:424::o;39279:232::-;39454:14;;39445:58;;;-1:-1:-1;;;39445:58:6;;-1:-1:-1;;;;;39445:58:6;;;;;;;;;;;;;;;39413:7;;39454:14;;;;;39445:34;;:58;;;;;;;;;;;;;;;39454:14;39445:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39445:58:6;;39279:232;-1:-1:-1;;;39279:232:6:o;43558:208::-;43678:7;43710:30;;;:14;:30;;;;;:48;;;;-1:-1:-1;;;;;43710:48:6;;43558:208::o;46747:169::-;-1:-1:-1;;;;;46888:20:6;46855:7;46888:20;;;:11;:20;;;;;;;46747:169::o;31212:398::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;31351:20;31343:47:::1;;;::::0;;-1:-1:-1;;;31343:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;31343:47:6;;;;;;;;;;;;;::::1;;31491:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:57;;-1:-1:-1;;31491:57:6::1;::::0;::::1;::::0;;31566:36;;;;;31544:4:::1;31566:36:::0;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31566:36:6;;;;;;;;;::::1;31212:398:::0;:::o;37324:252::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;37453:17:6::1;:38:::0;;;37509:59:::1;::::0;;;;;37557:10:::1;37509:59;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;37324:252:::0;:::o;1994:240:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;2082:22:22;::::1;2074:73;;;;-1:-1:-1::0;;;2074:73:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:6;::::0;;2162:38:::1;::::0;-1:-1:-1;;;;;2162:38:22;;::::1;::::0;2183:6;::::1;::::0;-1:-1:-1;;;;;;;;;;;2162:38:22;::::1;2210:6;:17:::0;;-1:-1:-1;;;;;;2210:17:22::1;-1:-1:-1::0;;;;;2210:17:22;;;::::1;::::0;;;::::1;::::0;;1994:240::o;25836:3701:6:-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;25979:21:6::1;26003:39;26026:15;26003:22;:39::i;:::-;25979:63;;26109:10;-1:-1:-1::0;;;;;26075:44:6::1;:30;26091:13;26075:15;:30::i;:::-;-1:-1:-1::0;;;;;26075:44:6::1;;26053:110;;;::::0;;-1:-1:-1;;;26053:110:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26053:110:6;;;;;;;;;;;;;::::1;;26260:13;26276:31:::0;;;:14:::1;:31;::::0;;;;:38;::::1;;26336:35;26276:38:::0;488:1:5::1;26336:8:6;:35::i;:::-;26335:36;26327:68;;;::::0;;-1:-1:-1;;;26327:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26327:68:6;;;;;;;;;;;;;::::1;;26497:28;26506:7;532:1:5;26497:8:6;:28::i;:::-;26496:29;26488:59;;;::::0;;-1:-1:-1;;;26488:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26488:59:6;;;;;;;;;;;;;::::1;;26642:23;;:::i;:::-;26681:8;:52;26690:42;26716:15;26690:25;:42::i;:::-;26681:52:::0;;::::1;::::0;;::::1;::::0;;;;;;;;-1:-1:-1;26681:52:6;26642:91;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;-1:-1:-1;;;;;26642:91:6::1;::::0;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;26750:29:6::1;::::0;26759:7;;26750:8:::1;:29::i;:::-;:62;;;;26783:29;26792:7;345:1:5;26783:8:6;:29::i;:::-;26746:2595;;;26873:31;26882:7;437:1:5;26873:8:6;:31::i;:::-;26868:931;;27128:17;::::0;27082:14:::1;::::0;26999:31:::1;::::0;;;:14:::1;:31;::::0;;;;:51:::1;;::::0;:97:::1;:146;26955:15;:190;;26925:281;;;::::0;;-1:-1:-1;;;26925:281:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26925:281:6;;;;;;;;;;;;;::::1;;27303:31;::::0;;;:14:::1;:31;::::0;;;;27357:37:::1;27303:51;::::0;;::::1;:91:::0;26868:931:::1;;;27627:17;::::0;27541:31:::1;::::0;;;:14:::1;:31;::::0;;;;:54:::1;;::::0;:103:::1;27497:15;:147;;27467:238;;;::::0;;-1:-1:-1;;;27467:238:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27467:238:6;;;;;;;;;;;;;::::1;;26746:2595;;;27820:29;27829:7;390:1:5;27820:8:6;:29::i;:::-;27816:1525;;;27897:31;27906:7;437:1:5;27897:8:6;:31::i;:::-;27892:806;;28059:17;;28042:14;;28023:8;:16;;;:33;:53;27979:15;:97;;27949:188;;;::::0;;-1:-1:-1;;;27949:188:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27949:188:6;;;;;;;;;;;;;::::1;27816:1525;28719:25;28736:7;28719:16;:25::i;:::-;28715:626;;;28896:17;;28879:14;;28860:8;:16;;;:33;:53;28820:15;:93;;28794:172;;;::::0;;-1:-1:-1;;;28794:172:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;28794:172:6;;;;;;;;;;;;;::::1;;29059:31;::::0;;;:14:::1;:31;::::0;;;;29113:33:::1;29059:51;::::0;;::::1;:87:::0;28715:626:::1;29394:79;29424:7;488:1:5;29394:15:6;:79::i;:::-;29353:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:120;;-1:-1:-1;;29353:120:6::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;29491:38;;;;;;;::::1;::::0;;;;;;;;;::::1;1388:1:29;;;25836:3701:6::0;;:::o;43126:205::-;43283:14;;43275:48;;;-1:-1:-1;;;43275:48:6;;;;;;;;;;43243:7;;-1:-1:-1;;;;;43283:14:6;;43275:31;;:48;;;;;;;;;;;;;;43283:14;43275:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43275:48:6;;43126:205;-1:-1:-1;;43126:205:6:o;46441:151::-;46570:14;;-1:-1:-1;;;;;46570:14:6;46441:151;:::o;40417:288::-;40535:7;40590:29;;;:13;:29;;;;;;;;;40638:20;;:8;:20;;;;;:26;;;;40666:30;;;;;40638:26;;40417:288::o;2047:117:29:-;1614:8;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;2115:5:::1;2105:15:::0;;-1:-1:-1;;;;2105:15:29::1;::::0;;2135:22:::1;2144:12;:10;:12::i;:::-;2135:22;::::0;;-1:-1:-1;;;;;2135:22:29;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2047:117::o:0;3510:128:5:-;3603:15;;;;;;;210:1;3602:23;;;:28;;3510:128::o;2321:205::-;2419:4;2459:59;2475:30;2491:1;255;2475:15;:30::i;:::-;300:1;2459:15;:59::i;:::-;2448:70;;:7;:70;;;2441:77;;2321:205;;;:::o;2733:165::-;2796:4;2831:59;2847:30;2863:1;255;2847:15;:30::i;:::-;345:1;2831:15;:59::i;3104:164::-;3166:4;3201:59;3217:30;3233:1;255;3217:15;:30::i;:::-;390:1;3779:175;210:1;3928:17;;;;;;3917:29;;3779:175::o;598:104:27:-;685:10;598:104;:::o;11858:938:6:-;11986:7;12014:24;12006:56;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;;;;12171:20;;;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;12171:38:6;;;:27;;:38;12163:66;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;;;;12344:1;12332:9;:13;12324:42;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;;;;12462:21;12486:23;12504:4;12486:17;:23::i;:::-;12564:28;;;;:13;:28;;;;;;:41;;;12633:14;;12618:137;;-1:-1:-1;;;12618:137:6;;-1:-1:-1;;;;;12618:137:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12462:47;;-1:-1:-1;12633:14:6;;;12618:35;;:137;;;;;12564:28;;12618:137;;;;;;12564:28;12633:14;12618:137;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12775:13:6;;11858:938;-1:-1:-1;;;;;;;11858:938:6:o;1969:137:5:-;2033:4;2068:30;2084:1;255;2068:15;:30::i;1800:115:29:-;1349:8;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;1859:7:::1;:14:::0;;-1:-1:-1;;;;1859:14:29::1;-1:-1:-1::0;;;1859:14:29::1;::::0;;1888:20:::1;1895:12;:10;:12::i;14430:1142:6:-:0;14583:19;14575:46;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;;;;14728:20;:7;-1:-1:-1;;;;;14728:18:6;;:20::i;:::-;14724:282;;;14791:46;;;-1:-1:-1;;;14791:46:6;;-1:-1:-1;;;14791:46:6;;;;;;-1:-1:-1;;;;;14791:34:6;;;;;:46;;;;;;;;;;;;;;:34;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14791:46:6;14765:135;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15026:21:6;;15018:53;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;;;;15203:14;;15194:59;;;-1:-1:-1;;;15194:59:6;;-1:-1:-1;;;;;15194:59:6;;;;;;;;;;;;;;;15256:1;;15203:14;;;;;15194:34;;:59;;;;;;;;;;;;;;;15203:14;15194:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15194:59:6;:63;15172:124;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;;;;15391:18;15412:29;;;:13;:29;;;;;;;;;15476:20;;;:8;:20;;;;;;:28;;15508:15;-1:-1:-1;15476:47:6;15454:110;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;;;16023:1393;16149:7;16173:16;:3;-1:-1:-1;;;;;16173:14:6;;:16::i;:::-;16169:545;;;16232:185;;;-1:-1:-1;;;16232:185:6;;;-1:-1:-1;;;;;16232:185:6;;;;;;;16326:10;16232:185;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;;;;;;;;16421:50;;16232:41;;;;16421:50;;16232:185;;;;;;;;;;;;;;;;:41;:185;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;-1:-1:-1;;;;;;16232:239:6;;16206:328;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;;;;16741:14;;;16726:63;;;-1:-1:-1;;;16726:63:6;;-1:-1:-1;;;;;16726:63:6;;;;;;;;;;;;;;;;;;;;;;16741:14;;;;;16726:35;;:63;;;;;16741:14;;16726:63;;;;;;;;16741:14;;16726:63;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16868:22:6;16925:28;;;:12;:28;;;;;;;;16923:30;;;;;;;;16906:47;;17058:30;;;:14;:30;;;;;;:37;16906:47;;-1:-1:-1;17028:103:6;;17058:37;;255:1:5;17028:15:6;:103::i;:::-;16988:30;;;;:14;:30;;;;;;;;:143;;-1:-1:-1;;16988:143:6;;;;;;;;;;-1:-1:-1;;17209:57:6;;;;-1:-1:-1;17333:14:6;17318:56;;-1:-1:-1;;;17318:56:6;;-1:-1:-1;;;;;17318:56:6;;;;;;;;;;;;;;;17333:14;;;;;17318:35;;:56;;;;;16988:30;17318:56;;;;;;;17333:14;17318:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17394:14:6;;16023:1393;-1:-1:-1;;;;;16023:1393:6:o;18319:468::-;18439:6;:8;;;;;;18403:18;18460:290;;;;18533:3;18523:6;;:13;;-1:-1:-1;;;18508:29:6;18495:42;;18460:290;;;-1:-1:-1;;18651:6:6;;18661:3;18651:13;;18319:468::o;718:413:26:-;1078:20;1116:8;;;718:413::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\n\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"./interfaces/IERC1155.sol\";\r\nimport \"./interfaces/IERC165.sol\";\r\nimport \"./interfaces/IERC721.sol\";\r\nimport \"./interfaces/IERC1155ERC721.sol\";\r\nimport \"./interfaces/IERC721TokenReceiver.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./UsingHelpers.sol\";\r\n\r\n//preparing for ERC-1066, ERC-1444, EIP-838\r\n\r\n/**\r\n * @title VoucherKernel contract is controlling the core business logic\r\n * @dev Notes:\r\n * - Since this is a reference app, it is not yet optimized.\r\n * In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\r\n * - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\r\n * See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\r\n */\r\n// solhint-disable-next-line\r\ncontract VoucherKernel is IVoucherKernel, Ownable, Pausable, UsingHelpers {\r\n using Address for address;\r\n using SafeMath for uint256;\r\n\r\n //AssetRegistry assetRegistry;\r\n address private tokensContract;\r\n\r\n //promise for an asset could be reusable, but simplified here for brevity\r\n struct Promise {\r\n bytes32 promiseId;\r\n uint256 nonce; //the asset that is offered\r\n address seller; //the seller who created the promise\r\n //we simplify the value for the demoapp, otherwise voucher details would be packed in one bytes32 field value\r\n uint256 validFrom;\r\n uint256 validTo;\r\n uint256 price;\r\n uint256 depositSe;\r\n uint256 depositBu;\r\n uint256 idx;\r\n }\r\n\r\n struct VoucherPaymentMethod {\r\n uint8 paymentMethod;\r\n address addressTokenPrice;\r\n address addressTokenDeposits;\r\n }\r\n\r\n address private bosonRouterAddress; //address of the Boson Router contract\r\n address private cashierAddress; //address of the Cashier contract\r\n\r\n mapping(bytes32 => Promise) private promises; //promises to deliver goods or services\r\n mapping(address => uint256) private tokenNonces; //mapping between seller address and its own nonces. Every time seller creates supply ID it gets incremented. Used to avoid duplicate ID's\r\n mapping(uint256 => VoucherPaymentMethod) private paymentDetails; // tokenSupplyId to VoucherPaymentMethod\r\n\r\n bytes32[] private promiseKeys;\r\n\r\n mapping(uint256 => bytes32) private ordersPromise; //mapping between an order (supply a.k.a. VoucherSet token) and a promise\r\n\r\n mapping(uint256 => VoucherStatus) private vouchersStatus; //recording the vouchers evolution\r\n\r\n //ID reqs\r\n mapping(uint256 => uint256) private typeCounters; //counter for ID of a particular type of NFT\r\n uint256 private constant MASK_TYPE = uint256(uint128(~0)) << 128; //the type mask in the upper 128 bits\r\n //1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private constant MASK_NF_INDEX = uint128(~0); //the non-fungible index mask in the lower 128\r\n //0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\r\n\r\n uint256 private constant TYPE_NF_BIT = 1 << 255; //the first bit represents an NFT type\r\n //1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private typeId; //base token type ... 127-bits cover 1.701411835*10^38 types (not differentiating between FTs and NFTs)\r\n /* Token IDs:\r\n Fungibles: 0, followed by 127-bit FT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <0>\r\n \r\n Non-fungible VoucherSets (supply tokens): 1, followed by 127-bit NFT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <1>\r\n */\r\n\r\n uint256 private complainPeriod;\r\n uint256 private cancelFaultPeriod;\r\n\r\n event LogPromiseCreated(\r\n bytes32 indexed _promiseId,\r\n uint256 indexed _nonce,\r\n address indexed _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _idx\r\n );\r\n\r\n event LogVoucherDelivered(\r\n uint256 indexed _tokenIdSupply,\r\n uint256 _tokenIdVoucher,\r\n address _issuer,\r\n address _holder,\r\n bytes32 _promiseId,\r\n uint256 _correlationId\r\n );\r\n\r\n event LogVoucherRedeemed(\r\n uint256 _tokenIdVoucher,\r\n address _holder,\r\n bytes32 _promiseId\r\n );\r\n\r\n event LogVoucherRefunded(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherComplain(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherFaultCancel(uint256 _tokenIdVoucher);\r\n\r\n event LogExpirationTriggered(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogFinalizeVoucher(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogBosonRouterSet(address _newBosonRouter, address _triggeredBy);\r\n\r\n event LogCashierSet(address _newCashier, address _triggeredBy);\r\n\r\n event LogComplainPeriodChanged(\r\n uint256 _newComplainPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogCancelFaultPeriodChanged(\r\n uint256 _newCancelFaultPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogVoucherSetFaultCancel(uint256 _tokenIdSupply, address _issuer);\r\n\r\n event LogFundsReleased(\r\n uint256 _tokenIdVoucher,\r\n uint8 _type //0 .. payment, 1 .. deposits\r\n );\r\n\r\n modifier onlyFromRouter() {\r\n require(bosonRouterAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == bosonRouterAddress, \"UNAUTHORIZED_BR\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyFromCashier() {\r\n require(cashierAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == cashierAddress, \"UNAUTHORIZED_C\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyVoucherOwner(uint256 _tokenIdVoucher, address _sender) {\r\n //check authorization\r\n require(\r\n IERC721(tokensContract).ownerOf(_tokenIdVoucher) == _sender,\r\n \"UNAUTHORIZED_V\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n constructor(address _tokensContract) {\r\n tokensContract = _tokensContract;\r\n\r\n complainPeriod = 7 * 1 days;\r\n cancelFaultPeriod = 7 * 1 days;\r\n }\r\n\r\n /**\r\n * @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\r\n * Only BR contract is in control of this function.\r\n */\r\n function pause() external override onlyFromRouter {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @notice Unpause the process of interaction with voucherID's (ERC-721).\r\n * Only BR contract is in control of this function.\r\n */\r\n function unpause() external override onlyFromRouter {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @notice Creating a new promise for goods or services.\r\n * Can be reused, e.g. for making different batches of these (in the future).\r\n * @param _seller seller of the promise\r\n * @param _validFrom Start of valid period\r\n * @param _validTo End of valid period\r\n * @param _price Price (payment amount)\r\n * @param _depositSe Seller's deposit\r\n * @param _depositBu Buyer's deposit\r\n */\r\n function createTokenSupplyID(\r\n address _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _price,\r\n uint256 _depositSe,\r\n uint256 _depositBu,\r\n uint256 _quantity\r\n ) external override onlyFromRouter returns (uint256) {\r\n require(_validFrom <= _validTo, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n // solhint-disable-next-line not-rely-on-time\r\n require(_validTo >= block.timestamp + 5 minutes, \"INVALID_VALIDITY_TO\"); //\"Minimum order validity is set to prevent any potential attack from flash-loans or similar.\" //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n bytes32 key;\r\n key = keccak256(\r\n abi.encodePacked(_seller, tokenNonces[_seller]++, _validFrom, _validTo)\r\n );\r\n\r\n if (promiseKeys.length > 0) {\r\n require(\r\n promiseKeys[promises[key].idx] != key,\r\n \"PROMISE_ALREADY_EXISTS\"\r\n );\r\n }\r\n\r\n promises[key] = Promise({\r\n promiseId: key,\r\n nonce: tokenNonces[_seller],\r\n seller: _seller,\r\n validFrom: _validFrom,\r\n validTo: _validTo,\r\n price: _price,\r\n depositSe: _depositSe,\r\n depositBu: _depositBu,\r\n idx: promiseKeys.length\r\n });\r\n\r\n promiseKeys.push(key);\r\n\r\n emit LogPromiseCreated(\r\n key,\r\n tokenNonces[_seller],\r\n _seller,\r\n _validFrom,\r\n _validTo,\r\n promiseKeys.length - 1\r\n );\r\n\r\n return createOrder(_seller, key, _quantity);\r\n }\r\n\r\n /**\r\n * @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\r\n * @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\r\n * @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\r\n * @param _tokenPrice token address which will hold the funds for the price of the voucher\r\n * @param _tokenDeposits token address which will hold the funds for the deposits of the voucher\r\n */\r\n function createPaymentMethod(\r\n uint256 _tokenIdSupply,\r\n uint8 _paymentMethod,\r\n address _tokenPrice,\r\n address _tokenDeposits\r\n ) external override onlyFromRouter {\r\n require(\r\n _paymentMethod > 0 &&\r\n _paymentMethod <= 4,\r\n \"INVALID PAYMENT METHOD\"\r\n );\r\n \r\n paymentDetails[_tokenIdSupply] = VoucherPaymentMethod({\r\n paymentMethod: _paymentMethod,\r\n addressTokenPrice: _tokenPrice,\r\n addressTokenDeposits: _tokenDeposits\r\n });\r\n }\r\n\r\n /**\r\n * @notice Create an order for offering a certain quantity of an asset\r\n * This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\r\n * @param _seller seller of the promise\r\n * @param _promiseId ID of a promise (simplified into asset for demo)\r\n * @param _quantity Quantity of assets on offer\r\n */\r\n function createOrder(\r\n address _seller,\r\n bytes32 _promiseId,\r\n uint256 _quantity\r\n ) private returns (uint256) {\r\n require(_promiseId != bytes32(0), \"UNSPECIFIED_PROMISE\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(promises[_promiseId].seller == _seller, \"UNAUTHORIZED_CO\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n require(_quantity > 0, \"INVALID_QUANTITY\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n uint256 tokenIdSupply = generateTokenType(true); //create & assign a new non-fungible type\r\n\r\n ordersPromise[tokenIdSupply] = _promiseId;\r\n\r\n IERC1155ERC721(tokensContract).mint(\r\n _seller,\r\n tokenIdSupply,\r\n _quantity,\r\n \"\"\r\n );\r\n\r\n return tokenIdSupply;\r\n }\r\n\r\n /**\r\n * @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\r\n * @param _tokenIdSupply ID of the supply token (ERC-1155)\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n * @param _paymentMethod method being used for that particular order that needs to be fulfilled\r\n * @param _correlationId ID of the current interaction with the smart contract for a specific user\r\n */\r\n function fillOrder(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder,\r\n uint8 _paymentMethod,\r\n uint256 _correlationId\r\n ) external override onlyFromRouter {\r\n uint8 paymentMethod = getVoucherPaymentMethod(_tokenIdSupply);\r\n\r\n //checks\r\n require(paymentMethod == _paymentMethod, \"Incorrect Payment Method\");\r\n checkOrderFillable(_tokenIdSupply, _issuer, _holder);\r\n\r\n //close order\r\n uint256 voucherTokenId = extract721(_issuer, _holder, _tokenIdSupply);\r\n\r\n emit LogVoucherDelivered(\r\n _tokenIdSupply,\r\n voucherTokenId,\r\n _issuer,\r\n _holder,\r\n getPromiseIdFromVoucherId(voucherTokenId),\r\n _correlationId\r\n );\r\n }\r\n\r\n /**\r\n * @notice Check order is fillable\r\n * @dev Will throw if checks don't pass\r\n * @param _tokenIdSupply ID of the supply token\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n */\r\n function checkOrderFillable(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder\r\n ) internal view {\r\n require(_tokenIdSupply != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n if (_holder.isContract()) {\r\n require(\r\n IERC165(_holder).supportsInterface(0x150b7a02),\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"31\"\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n require(_holder != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(\r\n IERC1155(tokensContract).balanceOf(_issuer, _tokenIdSupply) > 0,\r\n \"OFFER_EMPTY\"\r\n ); //hex\"40\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Unavailable)\r\n\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n\r\n require(\r\n promises[promiseKey].validTo >= block.timestamp,\r\n \"OFFER_EXPIRED\"\r\n );\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _to The address of the token holder\r\n * @param _tokenIdSupply ID of the token type\r\n * @return ID of the voucher token\r\n */\r\n function extract721(\r\n address _issuer,\r\n address _to,\r\n uint256 _tokenIdSupply\r\n ) internal returns (uint256) {\r\n if (_to.isContract()) {\r\n require(\r\n ERC721TokenReceiver(_to).onERC721Received(\r\n _issuer,\r\n msg.sender,\r\n _tokenIdSupply,\r\n \"\"\r\n ) == ERC721TokenReceiver(_to).onERC721Received.selector,\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, 1); // This is hardcoded as 1 on purpose\r\n\r\n //calculate tokenId\r\n uint256 voucherTokenId =\r\n _tokenIdSupply | ++typeCounters[_tokenIdSupply];\r\n\r\n //set status\r\n vouchersStatus[voucherTokenId].status = determineStatus(\r\n vouchersStatus[voucherTokenId].status,\r\n IDX_COMMIT\r\n );\r\n vouchersStatus[voucherTokenId].isPaymentReleased = false;\r\n vouchersStatus[voucherTokenId].isDepositsReleased = false;\r\n\r\n //mint voucher NFT as ERC-721\r\n IERC1155ERC721(tokensContract).mint(_to, voucherTokenId);\r\n\r\n return voucherTokenId;\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _tokenIdSupply ID of the token type\r\n * @param _qty qty that should be burned\r\n */\r\n function burnSupplyOnPause(\r\n address _issuer,\r\n uint256 _tokenIdSupply,\r\n uint256 _qty\r\n ) external override whenPaused onlyFromCashier {\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, _qty);\r\n }\r\n\r\n /**\r\n * @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\r\n * @param _isNonFungible Flag for generating NFT or FT\r\n * @return _tokenType Returns a newly generated token type\r\n */\r\n function generateTokenType(bool _isNonFungible)\r\n internal\r\n returns (uint256 _tokenType)\r\n {\r\n typeId++;\r\n\r\n if (_isNonFungible) {\r\n _tokenType = TYPE_NF_BIT | (typeId << 128); //upper bit is 1, followed by sequence, leaving lower 128-bits as 0\r\n } else {\r\n _tokenType = typeId << 128; //upper bit is not set, followed by sequence, leaving lower 128-bits as 0\r\n }\r\n\r\n return _tokenType;\r\n }\r\n\r\n /* solhint-disable */\r\n\r\n /**\r\n * @notice Redemption of the vouchers promise\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function redeem(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n //check status\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"ALREADY_PROCESSED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REDEEM\r\n );\r\n\r\n emit LogVoucherRedeemed(\r\n _tokenIdVoucher,\r\n _msgSender,\r\n tPromise.promiseId\r\n );\r\n }\r\n\r\n // // // // // // // //\r\n // UNHAPPY PATH\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Refunding a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function refund(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"INAPPLICABLE_STATUS\"\r\n ); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REFUND\r\n );\r\n\r\n emit LogVoucherRefunded(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Issue a complain for a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function complain(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_COMPLAIN),\r\n \"ALREADY_COMPLAINED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_FINAL),\r\n \"ALREADY_FINALIZED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check if still in the complain period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n //if redeemed or refunded\r\n if (\r\n isStateRedemptionSigned(vouchersStatus[_tokenIdVoucher].status) ||\r\n isStateRefunded(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if expired\r\n } else if (isStateExpired(vouchersStatus[_tokenIdVoucher].status)) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <= tPromise.validTo + complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if cancelOrFault\r\n } else if (\r\n isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_CANCEL_FAULT)\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired));\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function cancelOrFault(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n {\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n require(\r\n getSupplyHolder(tokenIdSupply) == _msgSender,\r\n \"UNAUTHORIZED_COF\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_CANCEL_FAULT), \"ALREADY_CANCELFAULT\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_REDEEM) || isStatus(tStatus, IDX_REFUND)) {\r\n //if redeemed or refunded\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //resetting the complain period\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStatus(tStatus, IDX_EXPIRE)) {\r\n //if expired\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp;\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStateCommitted(tStatus)) {\r\n //if committed only\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //complain period starts\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_CANCEL_FAULT\r\n );\r\n\r\n emit LogVoucherFaultCancel(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\r\n * @param _tokenIdSupply ID of the voucher set\r\n * @param _issuer owner of the voucher\r\n */\r\n function cancelOrFaultVoucherSet(uint256 _tokenIdSupply, address _issuer)\r\n external\r\n override\r\n onlyFromRouter\r\n whenNotPaused\r\n returns (uint256)\r\n {\r\n require(getSupplyHolder(_tokenIdSupply) == _issuer, \"UNAUTHORIZED_COF\");\r\n\r\n uint256 remQty = getRemQtyForSupply(_tokenIdSupply, _issuer);\r\n\r\n require(remQty > 0, \"OFFER_EMPTY\");\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, remQty);\r\n\r\n emit LogVoucherSetFaultCancel(_tokenIdSupply, _issuer);\r\n\r\n return remQty;\r\n }\r\n\r\n // // // // // // // //\r\n // BACK-END PROCESS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Mark voucher token that the payment was released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setPaymentReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 0);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token that the deposits were released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setDepositsReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 1);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token as expired\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerExpiration(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (\r\n tPromise.validTo < block.timestamp &&\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_EXPIRE\r\n );\r\n\r\n emit LogExpirationTriggered(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token to the final status\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerFinalizeVoucher(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n bool mark;\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_COMPLAIN)) {\r\n if (isStatus(tStatus, IDX_CANCEL_FAULT)) {\r\n //if COMPLAIN && COF: then final\r\n mark = true;\r\n } else if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod\r\n ) {\r\n //if COMPLAIN: then final after cof period\r\n mark = true;\r\n }\r\n } else if (\r\n isStatus(tStatus, IDX_CANCEL_FAULT) &&\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod\r\n ) {\r\n //if COF: then final after complain period\r\n mark = true;\r\n } else if (\r\n isStateRedemptionSigned(tStatus) || isStateRefunded(tStatus)\r\n ) {\r\n //if RDM/RFND NON_COMPLAIN: then final after complainPeriodStart + complainPeriod\r\n if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod\r\n ) {\r\n mark = true;\r\n }\r\n } else if (isStateExpired(tStatus)) {\r\n //if EXP NON_COMPLAIN: then final after validTo + complainPeriod\r\n if (block.timestamp >= tPromise.validTo + complainPeriod) {\r\n mark = true;\r\n }\r\n }\r\n\r\n if (mark) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_FINAL\r\n );\r\n emit LogFinalizeVoucher(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /* solhint-enable */\r\n\r\n // // // // // // // //\r\n // UTILS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Set the address of the new holder of a _tokenIdSupply on transfer\r\n * @param _tokenIdSupply _tokenIdSupply which will be transferred\r\n * @param _newSeller new holder of the supply\r\n */\r\n function setSupplyHolderOnTransfer(\r\n uint256 _tokenIdSupply,\r\n address _newSeller\r\n ) external override onlyFromCashier {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n promises[promiseKey].seller = _newSeller;\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Boson Router contract\r\n * @param _bosonRouterAddress The address of the BR contract\r\n */\r\n function setBosonRouterAddress(address _bosonRouterAddress)\r\n external\r\n onlyOwner\r\n {\r\n require(_bosonRouterAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n bosonRouterAddress = _bosonRouterAddress;\r\n\r\n emit LogBosonRouterSet(_bosonRouterAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Cashier contract\r\n * @param _cashierAddress The address of the BR contract\r\n */\r\n function setCashierAddress(address _cashierAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n require(_cashierAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n cashierAddress = _cashierAddress;\r\n\r\n emit LogCashierSet(_cashierAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _complainPeriod the new value for complain period (in number of seconds)\r\n */\r\n function setComplainPeriod(uint256 _complainPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n complainPeriod = _complainPeriod;\r\n\r\n emit LogComplainPeriodChanged(_complainPeriod, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)\r\n */\r\n function setCancelFaultPeriod(uint256 _cancelFaultPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n cancelFaultPeriod = _cancelFaultPeriod;\r\n\r\n emit LogCancelFaultPeriodChanged(_cancelFaultPeriod, msg.sender);\r\n }\r\n\r\n // // // // // // // //\r\n // GETTERS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Get the promise ID at specific index\r\n * @param _idx Index in the array of promise keys\r\n * @return Promise ID\r\n */\r\n function getPromiseKey(uint256 _idx)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n return promiseKeys[_idx];\r\n }\r\n\r\n /**\r\n * @notice Get the supply token ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the supply token\r\n */\r\n function getIdSupplyFromVoucher(uint256 _tokenIdVoucher)\r\n public\r\n pure\r\n override\r\n returns (uint256)\r\n {\r\n return _tokenIdVoucher & MASK_TYPE;\r\n }\r\n\r\n /**\r\n * @notice Get the promise ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromVoucherId(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n return promises[ordersPromise[tokenIdSupply]].promiseId;\r\n }\r\n\r\n /**\r\n * @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\r\n * @param _tokenSupplyId Token supply ID\r\n * @param _owner holder of the Token Supply\r\n * @return remaining quantity\r\n */\r\n function getRemQtyForSupply(uint256 _tokenSupplyId, address _owner)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return IERC1155(tokensContract).balanceOf(_owner, _tokenSupplyId);\r\n }\r\n\r\n /**\r\n * @notice Get all necessary funds for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\r\n */\r\n function getOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (\r\n promises[promiseKey].price,\r\n promises[promiseKey].depositSe,\r\n promises[promiseKey].depositBu\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get Buyer costs required to make an order for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Buyer's deposit)\r\n */\r\n function getBuyerOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256, uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (promises[promiseKey].price, promises[promiseKey].depositBu);\r\n }\r\n\r\n /**\r\n * @notice Get Seller deposit\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns sellers deposit\r\n */\r\n function getSellerDeposit(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].depositSe;\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a supply\r\n * @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\r\n * @return Address of the holder\r\n */\r\n function getSupplyHolder(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].seller;\r\n }\r\n\r\n /**\r\n * @notice Get promise data not retrieved by other accessor functions\r\n * @param _promiseKey ID of the promise\r\n * @return promise data not returned by other accessor methods\r\n */\r\n function getPromiseData(bytes32 _promiseKey)\r\n external\r\n view\r\n override\r\n returns (bytes32, uint256, uint256, uint256, uint256 )\r\n {\r\n Promise memory tPromise = promises[_promiseKey];\r\n return (tPromise.promiseId, tPromise.nonce, tPromise.validFrom, tPromise.validTo, tPromise.idx); \r\n }\r\n\r\n /**\r\n * @notice Get the current status of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Status of the voucher (via enum)\r\n */\r\n function getVoucherStatus(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (\r\n uint8,\r\n bool,\r\n bool,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n return (\r\n vouchersStatus[_tokenIdVoucher].status,\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased,\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased,\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart,\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Address of the holder\r\n */\r\n function getVoucherHolder(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return IERC721(tokensContract).ownerOf(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the price for the supply is held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherPriceToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenPrice;\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the deposits for the supply are held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherDepositToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenDeposits;\r\n }\r\n\r\n /**\r\n * @notice Get the payment method for a particular _tokenIdSupply\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return payment method\r\n */\r\n function getVoucherPaymentMethod(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint8)\r\n {\r\n return paymentDetails[_tokenIdSupply].paymentMethod;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isInValidityPeriod(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n //check validity period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n require(tPromise.validFrom <= block.timestamp, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n require(tPromise.validTo >= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isVoucherTransferable(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n return\r\n !(vouchersStatus[_tokenIdVoucher].isPaymentReleased ||\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased);\r\n }\r\n\r\n /**\r\n * @notice Get address of the Boson Router to which this contract points\r\n * @return Address of the Boson Router contract\r\n */\r\n function getBosonRouterAddress()\r\n external\r\n view\r\n override\r\n returns (address) \r\n {\r\n return bosonRouterAddress;\r\n }\r\n\r\n /**\r\n * @notice Get address of the Cashier contract to which this contract points\r\n * @return Address of the Cashier contract\r\n */\r\n function getCashierAddress()\r\n external\r\n view\r\n override\r\n returns (address)\r\n {\r\n return cashierAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the token nonce for a seller\r\n * @param _seller Address of the seller\r\n * @return The seller's nonce\r\n */\r\n function getTokenNonce(address _seller)\r\n external\r\n view\r\n override\r\n returns (uint256) \r\n {\r\n return tokenNonces[_seller];\r\n }\r\n\r\n /**\r\n * @notice Get the current type Id\r\n * @return type Id\r\n */\r\n function getTypeId()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return typeId;\r\n }\r\n\r\n /**\r\n * @notice Get the complain period\r\n * @return complain period\r\n */\r\n function getComplainPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return complainPeriod;\r\n }\r\n\r\n /**\r\n * @notice Get the cancel or fault period\r\n * @return cancel or fault period\r\n */\r\n function getCancelFaultPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return cancelFaultPeriod;\r\n }\r\n \r\n /**\r\n * @notice Get the promise ID from a voucher set\r\n * @param _tokenIdSupply ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromSupplyId(uint256 _tokenIdSupply)\r\n external\r\n view\r\n override\r\n returns (bytes32) \r\n {\r\n return ordersPromise[_tokenIdSupply];\r\n }\r\n\r\n /**\r\n * @notice Get the address of ERC1155ERC721 contract\r\n * @return Address of ERC1155ERC721 contract\r\n */\r\n function getTokensContractAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return tokensContract;\r\n }\r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "ast": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 6234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { + "hexValue": "30", + "id": 6233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3057:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6231, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3048:7:6", + "typeDescriptions": {} + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3048:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } + }, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6263, + "indexed": true, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5003:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6265, + "indexed": false, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5037:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6267, + "indexed": false, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5066:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5066:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6269, + "indexed": false, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5093:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5093:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4922:190:6" + }, + "src": "4899:214:6" + }, + { + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6287, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5386:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5375:96:6" + }, + "src": "5351:121:6" + }, + { + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5685:47:6" + }, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6313, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6315, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6001:75:6" + }, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6337, + "indexed": false, + "mutability": "mutable", + "name": "_newCancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6129:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6129:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6339, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6260:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6235:41:6" + }, + "src": "6205:72:6" + }, + { + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", + "parameters": { + "id": 6352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6318:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6318:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6351, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6352:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6350, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6352:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6307:93:6" + }, + "src": "6285:116:6" + }, + { + "body": { + "id": 6374, + "nodeType": "Block", + "src": "6435:335:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 6365, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:60:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6372, + "nodeType": "ExpressionStatement", + "src": "6606:60:6" + }, + { + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6824:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6824:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6386, + "nodeType": "ExpressionStatement", + "src": "6816:55:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6980:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6980:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7010:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + }, + "value": "UNAUTHORIZED_C" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + } + ], + "id": 6387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6972:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" + }, + { + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" + } + ] + }, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, + "nodeType": "ParameterList", + "parameters": [], + "src": "6802:2:6" + }, + "src": "6778:353:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6416, + "nodeType": "Block", + "src": "7207:269:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "7271:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7271:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7345:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + }, + "value": "UNAUTHORIZED_V" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + } + ], + "id": 6403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7249:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7249:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6414, + "nodeType": "ExpressionStatement", + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ + { + "expression": { + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6419, + "src": "7549:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7532:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6425, + "nodeType": "ExpressionStatement", + "src": "7532:32:6" + }, + { + "expression": { + "id": 6430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7577:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6431, + "nodeType": "ExpressionStatement", + "src": "7577:27:6" + }, + { + "expression": { + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7615:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8937:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 6484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8905:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8905:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6490, + "nodeType": "ExpressionStatement", + "src": "8905:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9118:39:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 6491, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9110:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6500, + "nodeType": "ExpressionStatement", + "src": "9110:71:6" + }, + { + "assignments": [ + 6502 + ], + "declarations": [ + { + "constant": false, + "id": 6502, + "mutability": "mutable", + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 6582, + "src": "9372:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9394:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "9400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9400:106:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9394:112:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + } + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10020:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6540, + "name": "Promise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6189, + "src": "9723:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" + } + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], + "nodeType": "FunctionCall", + "src": "9723:327:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "src": "9707:343:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6556, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10063:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" + } + }, + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" + } + }, + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31370:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32175:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32160:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ + { + "expression": { + "id": 7696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7685, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32226:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7687, + "indexExpression": { + "id": 7686, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32241:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32226:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32226:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7690, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32301:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7692, + "indexExpression": { + "id": 7691, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32316:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32301:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32301:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7694, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "32358:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7689, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "32267:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32267:116:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "32226:157:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7697, + "nodeType": "ExpressionStatement", + "src": "32226:157:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7699, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32428:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7698, + "name": "LogExpirationTriggered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6311, + "src": "32405:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32405:51:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7703, + "nodeType": "EmitStatement", + "src": "32400:56:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7652, + "nodeType": "StructuredDocumentation", + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "d40ffcf8", + "id": 7707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerExpiration", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, + "parameters": { + "id": 7655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7654, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7707, + "src": "31766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31765:25:6" + }, + "returnParameters": { + "id": 7657, + "nodeType": "ParameterList", + "parameters": [], + "src": "31809:0:6" + }, + "scope": 8454, + "src": "31739:736:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9412 + ], + "body": { + "id": 7860, + "nodeType": "Block", + "src": "32688:2186:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32726:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32707:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32729:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32699:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7720, + "nodeType": "ExpressionStatement", + "src": "32699:47:6" + }, + { + "assignments": [ + 7722 + ], + "declarations": [ + { + "constant": false, + "id": 7722, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "32849:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7721, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32849:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7727, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7723, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32865:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7725, + "indexExpression": { + "id": 7724, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32880:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32865:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32865:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32849:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "32924:29:6", + "subExpression": { + "arguments": [ + { + "id": 7730, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "32934:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7731, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "32943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7729, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "32925:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32925:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32955:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32916:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32916:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7736, + "nodeType": "ExpressionStatement", + "src": "32916:59:6" + }, + { + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" + }, + { + "assignments": [ + 7741 + ], + "declarations": [ + { + "constant": false, + "id": 7741, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33090:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7740, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "33090:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7747, + "initialValue": { + "baseExpression": { + "id": 7742, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "33129:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7746, + "indexExpression": { + "arguments": [ + { + "id": 7744, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33164:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7743, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "33138:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33138:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33129:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33090:91:6" + }, + { + "condition": { + "arguments": [ + { + "id": 7749, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33207:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7779, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7778, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33699:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33699:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7825, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7741, + "src": "34534:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "34534:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34534:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34515:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34595:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34352:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34345:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } + } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" + } + ] + } + }, + "id": 7840, + "nodeType": "IfStatement", + "src": "33194:1432:6", + "trueBody": { + "id": 7777, + "nodeType": "Block", + "src": "33231:444:6", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 7753, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33259:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ + { + "expression": { + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33363:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33356:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7759, + "nodeType": "ExpressionStatement", + "src": "33356:11:6" + } + ] + } + } + ] + } + }, + { + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7708, + "nodeType": "StructuredDocumentation", + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "65c303bc", + "id": 7861, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerFinalizeVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, + "parameters": { + "id": 7711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7710, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35255:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35244:69:6" + }, + "returnParameters": { + "id": 7871, + "nodeType": "ParameterList", + "parameters": [], + "src": "35348:0:6" + }, + "scope": 8454, + "src": "35210:258:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 7914, + "nodeType": "Block", + "src": "35725:295:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7895, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35744:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "35744:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35779:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35736:65:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7903, + "nodeType": "ExpressionStatement", + "src": "35736:65:6" + }, + { + "expression": { + "id": 7906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35904:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7907, + "nodeType": "ExpressionStatement", + "src": "35904:40:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7909, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35980:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7908, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "35962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35962:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7913, + "nodeType": "EmitStatement", + "src": "35957:55:6" + } + ] + }, + "documentation": { + "id": 7887, + "nodeType": "StructuredDocumentation", + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" + }, + "functionSelector": "bd17de40", + "id": 7915, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7892, + "modifierName": { + "id": 7891, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "35710:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35710:9:6" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7889, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 7915, + "src": "35654:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35654:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35653:29:6" + }, + "returnParameters": { + "id": 7893, + "nodeType": "ParameterList", + "parameters": [], + "src": "35725:0:6" + }, + "scope": 8454, + "src": "35623:397:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9432 + ], + "body": { + "id": 7944, + "nodeType": "Block", + "src": "36278:275:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" + } + ] + }, + "documentation": { + "id": 7946, + "nodeType": "StructuredDocumentation", + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + }, + "functionSelector": "8990834b", + "id": 7965, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, + "parameters": { + "id": 7949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7948, + "mutability": "mutable", + "name": "_complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 7965, + "src": "36842:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "36841:25:6" + }, + "returnParameters": { + "id": 7953, + "nodeType": "ParameterList", + "parameters": [], + "src": "36927:0:6" + }, + "scope": 8454, + "src": "36815:234:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9426 + ], + "body": { + "id": 7984, + "nodeType": "Block", + "src": "37442:134:6", + "statements": [ + { + "expression": { + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7980, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37557:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7978, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37954:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38737:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38718:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 8026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38740:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 8022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "38710:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38710:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8028, + "nodeType": "ExpressionStatement", + "src": "38710:47:6" + }, + { + "assignments": [ + 8030 + ], + "declarations": [ + { + "constant": false, + "id": 8030, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "38860:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38860:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8034, + "initialValue": { + "arguments": [ + { + "id": 8032, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38907:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8031, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "38884:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38884:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40136:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" + } + ] + }, + "documentation": { + "id": 8064, + "nodeType": "StructuredDocumentation", + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + }, + "functionSelector": "d887b4e7", + "id": 8097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, + "parameters": { + "id": 8067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8066, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39775:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39775:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39774:24:6" + }, + "returnParameters": { + "id": 8075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" + }, + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9472 + ], + "body": { + "id": 8124, + "nodeType": "Block", + "src": "40558:147:6", + "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ + { + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41040:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8128, + "src": "41054:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" + } + ] + }, + "documentation": { + "id": 8126, + "nodeType": "StructuredDocumentation", + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" + }, + "functionSelector": "88106323", + "id": 8146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSellerDeposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, + "parameters": { + "id": 8129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8128, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40904:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40904:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40903:24:6" + }, + "returnParameters": { + "id": 8133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" + }, + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9550 + ], + "body": { + "id": 8166, + "nodeType": "Block", + "src": "41487:114:6", + "statements": [ + { + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" + } + ] + }, + "documentation": { + "id": 8147, + "nodeType": "StructuredDocumentation", + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" + }, + "functionSelector": "1f38585f", + "id": 8167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupplyHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, + "parameters": { + "id": 8150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8149, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41383:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41382:24:6" + }, + "returnParameters": { + "id": 8154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" + }, + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9628 + ], + "body": { + "id": 8202, + "nodeType": "Block", + "src": "41981:173:6", + "statements": [ + { + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "42018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8200, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" + } + ] + }, + "documentation": { + "id": 8168, + "nodeType": "StructuredDocumentation", + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" + }, + "functionSelector": "a1e5e3f9", + "id": 8203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseData", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, + "parameters": { + "id": 8171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8170, + "mutability": "mutable", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41929:46:6" + }, + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" + }, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8263, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43588:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43588:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8267, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43678:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43678:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8278, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44119:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44119:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "44118:9:6" + }, + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, + "parameters": { + "id": 8294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8293, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44451:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8297, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44541:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8296, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "44541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "44540:7:6" + }, + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ + { + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" + } + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, + "parameters": { + "id": 8309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8308, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44841:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44840:25:6" + }, + "returnParameters": { + "id": 8313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44932:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8311, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44932:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "44931:6:6" + }, + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ + { + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "45704:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "45703:25:6" + }, + "returnParameters": { + "id": 8351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45795:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8370, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8375, + "src": "46226:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8385, + "src": "46538:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8388, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46770:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46770:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46769:17:6" + }, + "returnParameters": { + "id": 8393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8392, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46855:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "46855:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8409, + "src": "47095:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47095:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8419, + "src": "47336:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47336:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" + } + ] + }, + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, + "parameters": { + "id": 8433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47885:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" + }, + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 6234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { + "hexValue": "30", + "id": 6233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3057:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6231, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3048:7:6", + "typeDescriptions": {} + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3048:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } + }, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6263, + "indexed": true, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5003:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6265, + "indexed": false, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5037:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6267, + "indexed": false, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5066:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5066:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6269, + "indexed": false, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5093:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5093:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4922:190:6" + }, + "src": "4899:214:6" + }, + { + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6287, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5386:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5375:96:6" + }, + "src": "5351:121:6" + }, + { + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5685:47:6" + }, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6313, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6315, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6001:75:6" + }, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6337, + "indexed": false, + "mutability": "mutable", + "name": "_newCancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6129:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6129:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6339, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6260:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6235:41:6" + }, + "src": "6205:72:6" + }, + { + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", + "parameters": { + "id": 6352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6318:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6318:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6351, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6352:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6350, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6352:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6307:93:6" + }, + "src": "6285:116:6" + }, + { + "body": { + "id": 6374, + "nodeType": "Block", + "src": "6435:335:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 6365, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:60:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6372, + "nodeType": "ExpressionStatement", + "src": "6606:60:6" + }, + { + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6824:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6824:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6386, + "nodeType": "ExpressionStatement", + "src": "6816:55:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6980:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6980:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7010:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + }, + "value": "UNAUTHORIZED_C" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + } + ], + "id": 6387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6972:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" + }, + { + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" + } + ] + }, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, + "nodeType": "ParameterList", + "parameters": [], + "src": "6802:2:6" + }, + "src": "6778:353:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6416, + "nodeType": "Block", + "src": "7207:269:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "7271:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7271:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7345:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + }, + "value": "UNAUTHORIZED_V" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + } + ], + "id": 6403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7249:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7249:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6414, + "nodeType": "ExpressionStatement", + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ + { + "expression": { + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6419, + "src": "7549:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7532:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6425, + "nodeType": "ExpressionStatement", + "src": "7532:32:6" + }, + { + "expression": { + "id": 6430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7577:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6431, + "nodeType": "ExpressionStatement", + "src": "7577:27:6" + }, + { + "expression": { + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7615:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8937:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 6484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8905:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8905:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6490, + "nodeType": "ExpressionStatement", + "src": "8905:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9118:39:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 6491, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9110:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6500, + "nodeType": "ExpressionStatement", + "src": "9110:71:6" + }, + { + "assignments": [ + 6502 + ], + "declarations": [ + { + "constant": false, + "id": 6502, + "mutability": "mutable", + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 6582, + "src": "9372:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9394:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "9400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9400:106:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9394:112:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + } + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10020:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6540, + "name": "Promise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6189, + "src": "9723:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" + } + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], + "nodeType": "FunctionCall", + "src": "9723:327:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "src": "9707:343:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6556, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10063:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" + } + }, + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" + } + }, + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31370:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32175:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32160:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ + { + "expression": { + "id": 7696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7685, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32226:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7687, + "indexExpression": { + "id": 7686, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32241:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32226:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32226:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7690, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32301:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7692, + "indexExpression": { + "id": 7691, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32316:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32301:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32301:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7694, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "32358:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7689, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "32267:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32267:116:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "32226:157:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7697, + "nodeType": "ExpressionStatement", + "src": "32226:157:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7699, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32428:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7698, + "name": "LogExpirationTriggered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6311, + "src": "32405:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32405:51:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7703, + "nodeType": "EmitStatement", + "src": "32400:56:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7652, + "nodeType": "StructuredDocumentation", + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "d40ffcf8", + "id": 7707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerExpiration", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, + "parameters": { + "id": 7655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7654, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7707, + "src": "31766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31765:25:6" + }, + "returnParameters": { + "id": 7657, + "nodeType": "ParameterList", + "parameters": [], + "src": "31809:0:6" + }, + "scope": 8454, + "src": "31739:736:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9412 + ], + "body": { + "id": 7860, + "nodeType": "Block", + "src": "32688:2186:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32726:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32707:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32729:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32699:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7720, + "nodeType": "ExpressionStatement", + "src": "32699:47:6" + }, + { + "assignments": [ + 7722 + ], + "declarations": [ + { + "constant": false, + "id": 7722, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "32849:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7721, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32849:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7727, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7723, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32865:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7725, + "indexExpression": { + "id": 7724, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32880:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32865:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32865:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32849:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "32924:29:6", + "subExpression": { + "arguments": [ + { + "id": 7730, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "32934:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7731, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "32943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7729, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "32925:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32925:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32955:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32916:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32916:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7736, + "nodeType": "ExpressionStatement", + "src": "32916:59:6" + }, + { + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" + }, + { + "assignments": [ + 7741 + ], + "declarations": [ + { + "constant": false, + "id": 7741, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33090:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7740, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "33090:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7747, + "initialValue": { + "baseExpression": { + "id": 7742, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "33129:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7746, + "indexExpression": { + "arguments": [ + { + "id": 7744, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33164:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7743, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "33138:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33138:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33129:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33090:91:6" + }, + { + "condition": { + "arguments": [ + { + "id": 7749, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33207:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7779, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7778, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33699:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33699:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7825, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7741, + "src": "34534:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "34534:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34534:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34515:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34595:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34352:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34345:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } + } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" + } + ] + } + }, + "id": 7840, + "nodeType": "IfStatement", + "src": "33194:1432:6", + "trueBody": { + "id": 7777, + "nodeType": "Block", + "src": "33231:444:6", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 7753, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33259:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ + { + "expression": { + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33363:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33356:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7759, + "nodeType": "ExpressionStatement", + "src": "33356:11:6" + } + ] + } + } + ] + } + }, + { + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7708, + "nodeType": "StructuredDocumentation", + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "65c303bc", + "id": 7861, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerFinalizeVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, + "parameters": { + "id": 7711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7710, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35255:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35244:69:6" + }, + "returnParameters": { + "id": 7871, + "nodeType": "ParameterList", + "parameters": [], + "src": "35348:0:6" + }, + "scope": 8454, + "src": "35210:258:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 7914, + "nodeType": "Block", + "src": "35725:295:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7895, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35744:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "35744:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35779:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35736:65:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7903, + "nodeType": "ExpressionStatement", + "src": "35736:65:6" + }, + { + "expression": { + "id": 7906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35904:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7907, + "nodeType": "ExpressionStatement", + "src": "35904:40:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7909, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35980:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7908, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "35962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35962:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7913, + "nodeType": "EmitStatement", + "src": "35957:55:6" + } + ] + }, + "documentation": { + "id": 7887, + "nodeType": "StructuredDocumentation", + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" + }, + "functionSelector": "bd17de40", + "id": 7915, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7892, + "modifierName": { + "id": 7891, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "35710:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35710:9:6" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7889, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 7915, + "src": "35654:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35654:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35653:29:6" + }, + "returnParameters": { + "id": 7893, + "nodeType": "ParameterList", + "parameters": [], + "src": "35725:0:6" + }, + "scope": 8454, + "src": "35623:397:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9432 + ], + "body": { + "id": 7944, + "nodeType": "Block", + "src": "36278:275:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" + } + ] + }, + "documentation": { + "id": 7946, + "nodeType": "StructuredDocumentation", + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + }, + "functionSelector": "8990834b", + "id": 7965, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, + "parameters": { + "id": 7949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7948, + "mutability": "mutable", + "name": "_complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 7965, + "src": "36842:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "36841:25:6" + }, + "returnParameters": { + "id": 7953, + "nodeType": "ParameterList", + "parameters": [], + "src": "36927:0:6" + }, + "scope": 8454, + "src": "36815:234:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9426 + ], + "body": { + "id": 7984, + "nodeType": "Block", + "src": "37442:134:6", + "statements": [ + { + "expression": { + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7980, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37557:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7978, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37954:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38737:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38718:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 8026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38740:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 8022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "38710:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38710:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8028, + "nodeType": "ExpressionStatement", + "src": "38710:47:6" + }, + { + "assignments": [ + 8030 + ], + "declarations": [ + { + "constant": false, + "id": 8030, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "38860:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38860:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8034, + "initialValue": { + "arguments": [ + { + "id": 8032, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38907:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8031, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "38884:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38884:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40136:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" + } + ] + }, + "documentation": { + "id": 8064, + "nodeType": "StructuredDocumentation", + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + }, + "functionSelector": "d887b4e7", + "id": 8097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, + "parameters": { + "id": 8067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8066, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39775:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39775:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39774:24:6" + }, + "returnParameters": { + "id": 8075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" + }, + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9472 + ], + "body": { + "id": 8124, + "nodeType": "Block", + "src": "40558:147:6", + "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ + { + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41040:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8128, + "src": "41054:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" + } + ] + }, + "documentation": { + "id": 8126, + "nodeType": "StructuredDocumentation", + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" + }, + "functionSelector": "88106323", + "id": 8146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSellerDeposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, + "parameters": { + "id": 8129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8128, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40904:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40904:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40903:24:6" + }, + "returnParameters": { + "id": 8133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" + }, + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9550 + ], + "body": { + "id": 8166, + "nodeType": "Block", + "src": "41487:114:6", + "statements": [ + { + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" + } + ] + }, + "documentation": { + "id": 8147, + "nodeType": "StructuredDocumentation", + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" + }, + "functionSelector": "1f38585f", + "id": 8167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupplyHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, + "parameters": { + "id": 8150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8149, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41383:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41382:24:6" + }, + "returnParameters": { + "id": 8154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" + }, + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9628 + ], + "body": { + "id": 8202, + "nodeType": "Block", + "src": "41981:173:6", + "statements": [ + { + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "42018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8200, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" + } + ] + }, + "documentation": { + "id": 8168, + "nodeType": "StructuredDocumentation", + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" + }, + "functionSelector": "a1e5e3f9", + "id": 8203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseData", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, + "parameters": { + "id": 8171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8170, + "mutability": "mutable", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41929:46:6" + }, + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" + }, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8263, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43588:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43588:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8267, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43678:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43678:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8278, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44119:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44119:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "44118:9:6" + }, + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, + "parameters": { + "id": 8294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8293, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44451:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8297, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44541:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8296, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "44541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "44540:7:6" + }, + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ + { + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" + } + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, + "parameters": { + "id": 8309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8308, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44841:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44840:25:6" + }, + "returnParameters": { + "id": 8313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44932:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8311, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44932:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "44931:6:6" + }, + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ + { + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "45704:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "45703:25:6" + }, + "returnParameters": { + "id": 8351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45795:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8370, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8375, + "src": "46226:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8385, + "src": "46538:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8388, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46770:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46770:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46769:17:6" + }, + "returnParameters": { + "id": 8393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8392, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46855:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "46855:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8409, + "src": "47095:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47095:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8419, + "src": "47336:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47336:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" + } + ] + }, + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, + "parameters": { + "id": 8433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47885:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" + }, + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "compiler": { + "name": "solc", + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + } + }, + "links": {}, + "address": "0x374d7a42F86A6a5Ce864bbA462999aCccf9750E3", + "transactionHash": "0x16297c4fc5662415b53d6d2ff8c0aa3c53378e7d3af36ed78b5964d972924849" + }, + "5777": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event", + "signature": "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event", + "signature": "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event", + "signature": "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event", + "signature": "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event", + "signature": "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event", + "signature": "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event", + "signature": "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event", + "signature": "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event", + "signature": "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event", + "signature": "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event", + "signature": "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event", + "signature": "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event", + "signature": "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event", + "signature": "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event", + "signature": "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event", + "signature": "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa" + } + }, + "links": {}, + "address": "0x7589e53b8a55212Af8b3ad6ef5c31D9c02bFA25F", + "transactionHash": "0x1a2a3135e2b562ab632c96a5446871a701f7b0c338f60a8b87a4713c5e5ef3d9" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T10:31:40.059Z", + "networkType": "ethereum", + "devdoc": { + "details": "Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931", + "kind": "dev", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "details": "Token ID is derived following the same principles for both ERC-1155 and ERC-721", + "params": { + "_issuer": "The address of the token issuer", + "_qty": "qty that should be burned", + "_tokenIdSupply": "ID of the token type" + } + }, + "cancelOrFault(uint256,address)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "params": { + "_issuer": "owner of the voucher", + "_tokenIdSupply": "ID of the voucher set" + } + }, + "complain(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "params": { + "_paymentMethod": "might be ETHETH, ETHTKN, TKNETH or TKNTKN", + "_tokenDeposits": "token address which will hold the funds for the deposits of the voucher", + "_tokenIdSupply": "_tokenIdSupply of the voucher set this is related to", + "_tokenPrice": "token address which will hold the funds for the price of the voucher" + } + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "params": { + "_depositBu": "Buyer's deposit", + "_depositSe": "Seller's deposit", + "_price": "Price (payment amount)", + "_seller": "seller of the promise", + "_validFrom": "Start of valid period", + "_validTo": "End of valid period" + } + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "params": { + "_correlationId": "ID of the current interaction with the smart contract for a specific user", + "_holder": "Address of the recipient of the voucher (ERC-721)", + "_issuer": "Address of the token's issuer", + "_paymentMethod": "method being used for that particular order that needs to be fulfilled", + "_tokenIdSupply": "ID of the supply token (ERC-1155)" + } + }, + "getBosonRouterAddress()": { + "returns": { + "_0": "Address of the Boson Router contract" + } + }, + "getBuyerOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Buyer's deposit)" + } + }, + "getCancelFaultPeriod()": { + "returns": { + "_0": "cancel or fault period" + } + }, + "getCashierAddress()": { + "returns": { + "_0": "Address of the Cashier contract" + } + }, + "getComplainPeriod()": { + "returns": { + "_0": "complain period" + } + }, + "getIdSupplyFromVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the supply token" + } + }, + "getOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + } + }, + "getPromiseData(bytes32)": { + "params": { + "_promiseKey": "ID of the promise" + }, + "returns": { + "_0": "promise data not returned by other accessor methods" + } + }, + "getPromiseIdFromSupplyId(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseIdFromVoucherId(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseKey(uint256)": { + "params": { + "_idx": "Index in the array of promise keys" + }, + "returns": { + "_0": "Promise ID" + } + }, + "getRemQtyForSupply(uint256,address)": { + "params": { + "_owner": "holder of the Token Supply", + "_tokenSupplyId": "Token supply ID" + }, + "returns": { + "_0": "remaining quantity" + } + }, + "getSellerDeposit(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns sellers deposit" + } + }, + "getSupplyHolder(uint256)": { + "params": { + "_tokenIdSupply": "ID of the order (aka VoucherSet) which is mapped to the corresponding Promise." + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getTokenNonce(address)": { + "params": { + "_seller": "Address of the seller" + }, + "returns": { + "_0": "The seller's nonce" + } + }, + "getTokensContractAddress()": { + "returns": { + "_0": "Address of ERC1155ERC721 contract" + } + }, + "getTypeId()": { + "returns": { + "_0": "type Id" + } + }, + "getVoucherDepositToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherHolder(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getVoucherPaymentMethod(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "payment method" + } + }, + "getVoucherPriceToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherStatus(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Status of the voucher (via enum)" + } + }, + "isInValidityPeriod(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "isVoucherTransferable(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "redeem(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "refund(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setBosonRouterAddress(address)": { + "params": { + "_bosonRouterAddress": "The address of the BR contract" + } + }, + "setCancelFaultPeriod(uint256)": { + "params": { + "_cancelFaultPeriod": "the new value for cancelOrFault period (in number of seconds)" + } + }, + "setCashierAddress(address)": { + "params": { + "_cashierAddress": "The address of the BR contract" + } + }, + "setComplainPeriod(uint256)": { + "params": { + "_complainPeriod": "the new value for complain period (in number of seconds)" + } + }, + "setDepositsReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setPaymentReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "params": { + "_newSeller": "new holder of the supply", + "_tokenIdSupply": "_tokenIdSupply which will be transferred" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "triggerExpiration(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "triggerFinalizeVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + } + }, + "title": "VoucherKernel contract is controlling the core business logic", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "notice": "Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155" + }, + "cancelOrFault(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal" + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange." + }, + "complain(uint256,address)": { + "notice": "Issue a complain for a voucher" + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "notice": "Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set." + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future)." + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "notice": "Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder" + }, + "getBosonRouterAddress()": { + "notice": "Get address of the Boson Router to which this contract points" + }, + "getBuyerOrderCosts(uint256)": { + "notice": "Get Buyer costs required to make an order for a supply token" + }, + "getCancelFaultPeriod()": { + "notice": "Get the cancel or fault period" + }, + "getCashierAddress()": { + "notice": "Get address of the Cashier contract to which this contract points" + }, + "getComplainPeriod()": { + "notice": "Get the complain period" + }, + "getIdSupplyFromVoucher(uint256)": { + "notice": "Get the supply token ID from a voucher token" + }, + "getOrderCosts(uint256)": { + "notice": "Get all necessary funds for a supply token" + }, + "getPromiseData(bytes32)": { + "notice": "Get promise data not retrieved by other accessor functions" + }, + "getPromiseIdFromSupplyId(uint256)": { + "notice": "Get the promise ID from a voucher set" + }, + "getPromiseIdFromVoucherId(uint256)": { + "notice": "Get the promise ID from a voucher token" + }, + "getPromiseKey(uint256)": { + "notice": "Get the promise ID at specific index" + }, + "getRemQtyForSupply(uint256,address)": { + "notice": "Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account" + }, + "getSellerDeposit(uint256)": { + "notice": "Get Seller deposit" + }, + "getSupplyHolder(uint256)": { + "notice": "Get the holder of a supply" + }, + "getTokenNonce(address)": { + "notice": "Get the token nonce for a seller" + }, + "getTokensContractAddress()": { + "notice": "Get the address of ERC1155ERC721 contract" + }, + "getTypeId()": { + "notice": "Get the current type Id" + }, + "getVoucherDepositToken(uint256)": { + "notice": "Get the address of the token where the deposits for the supply are held" + }, + "getVoucherHolder(uint256)": { + "notice": "Get the holder of a voucher" + }, + "getVoucherPaymentMethod(uint256)": { + "notice": "Get the payment method for a particular _tokenIdSupply" + }, + "getVoucherPriceToken(uint256)": { + "notice": "Get the address of the token where the price for the supply is held" + }, + "getVoucherStatus(uint256)": { + "notice": "Get the current status of a voucher" + }, + "isInValidityPeriod(uint256)": { + "notice": "Checks whether a voucher is in valid period for redemption (between start date and end date)" + }, + "isVoucherTransferable(uint256)": { + "notice": "Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred" + }, + "pause()": { + "notice": "Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function." + }, + "redeem(uint256,address)": { + "notice": "Redemption of the vouchers promise" + }, + "refund(uint256,address)": { + "notice": "Refunding a voucher" + }, + "setBosonRouterAddress(address)": { + "notice": "Set the address of the Boson Router contract" + }, + "setCancelFaultPeriod(uint256)": { + "notice": "Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setCashierAddress(address)": { + "notice": "Set the address of the Cashier contract" + }, + "setComplainPeriod(uint256)": { + "notice": "Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setDepositsReleased(uint256)": { + "notice": "Mark voucher token that the deposits were released" + }, + "setPaymentReleased(uint256)": { + "notice": "Mark voucher token that the payment was released" + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "notice": "Set the address of the new holder of a _tokenIdSupply on transfer" + }, + "triggerExpiration(uint256)": { + "notice": "Mark voucher token as expired" + }, + "triggerFinalizeVoucher(uint256)": { + "notice": "Mark voucher token to the final status" + }, + "unpause()": { + "notice": "Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/external/lambdas/triggerFinalizations/src/configs.js b/external/lambdas/triggerFinalizations/src/configs.js new file mode 100644 index 00000000..865efa32 --- /dev/null +++ b/external/lambdas/triggerFinalizations/src/configs.js @@ -0,0 +1,45 @@ +const AWS = require('aws-sdk') +const region = "eu-west-2" +const sm = new AWS.SecretsManager({region}) +const ethers = require('ethers') + +const getSecrets = async (SecretId) => { + return await new Promise((resolve, reject) => { + sm.getSecretValue({SecretId}, (err, result) => { + if (err) reject(err) + else resolve(JSON.parse(result.SecretString)) + }) + }) +} + +const configs = { + local: () => { + throw new Error('Local run is expected to use config defined in a specific module') + }, + cloud: secrets => { + const apiUrl = secrets.apiurl; + + return { + VOUCHER_KERNEL_ADDRESS: secrets.voucherkerneladdress, + CASHIER_ADDRESS: secrets.cashieraddress, + EXECUTOR_PRIVATE_KEY: secrets.executorsecret, + API_URL: apiUrl, + ALL_VOUCHERS_URL: `${apiUrl}/vouchers/all`, + UPDATE_STATUS_URL: `${apiUrl}/vouchers/update-status-from-keepers`, + WITHDRAW_VOUCHER_URL: `${apiUrl}/payments/create-payment`, + GCLOUD_SECRET: secrets.gcloudsecret, + GAS_LIMIT: "6000000", + PROVIDER: ethers.getDefaultProvider(secrets.networkname, { + etherscan: secrets.etherscanapikey, + infura: secrets.infuraapikey, + }) + } + } +}; + +async function getConfigParams(SecretId, env) { + const secrets = env != 'local' ? await getSecrets(SecretId) : '' + return configs[env](secrets); +} + +module.exports = getConfigParams; diff --git a/external/lambdas/triggerFinalizations/src/index.js b/external/lambdas/triggerFinalizations/src/index.js new file mode 100644 index 00000000..13a6ec77 --- /dev/null +++ b/external/lambdas/triggerFinalizations/src/index.js @@ -0,0 +1,234 @@ +const ethers = require("ethers"); +const axios = require("axios").default; + +const getConfigParams = require('./configs') +const BN = ethers.BigNumber.from; + +const VoucherKernel = require("./abis/VoucherKernel.json"); +const utils = require("./utils"); + +exports.handler = async (config) => { + if (!config) { + config = await getConfigParams(process.env.SSM_SECRET, "cloud"); + } + const executor = new ethers.Wallet(config.EXECUTOR_PRIVATE_KEY, config.PROVIDER); + + axios.defaults.headers.common = { + Authorization: `Bearer ${config.GCLOUD_SECRET}`, + }; + + // Finalization process + await triggerFinalizations(executor, config); + + const response = { + statusCode: 200, + body: `Finalization process was executed successfully!` + }; + + return response; +}; + +async function triggerFinalizations(executor, config) { + let hasErrors = false; + let voucherKernelContractExecutor = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + let res; + + try { + res = await axios.get(config.ALL_VOUCHERS_URL); + } catch (e) { + console.log(`Error while getting all vouchers from the DB. Error: ${e}`); + return; + } + + if ( + typeof res === "undefined" || + !Object.prototype.hasOwnProperty.call(res, "data") + ) + return; + + for (let i = 0; i < res.data.vouchers.length; i++) { + let voucher = res.data.vouchers[i]; + let voucherID = voucher._tokenIdVoucher; + + if (!voucher.blockchainAnchored) { + console.log(`Voucher: ${voucherID} is not anchored on blockchain`); + continue; + } + + if (voucher.FINALIZED) { + console.log(`Voucher: ${voucherID} is already finalized`); + continue; + } + + let voucherStatus; + + try { + voucherStatus = await voucherKernelContractExecutor.getVoucherStatus( + voucherID + ); + } catch (e) { + hasErrors = true; + console.log( + `Error while checking voucher status toward the contract. Error: ${e}` + ); + continue; + } + + console.log(`Voucher: ${voucherID}. The finalization has started.`); + + try { + let status = voucherStatus[0]; + + let isFinalized = utils.isStatus(status, utils.IDX_FINAL); + + if (isFinalized) { + console.log( + `Voucher: ${voucherID} is with finalized, but the DB was not updated while the event was triggered. Updating Database only.` + ); + + const payload = [ + { + _tokenIdVoucher: voucherID, + status: "FINALIZED", + }, + ]; + + await axios.patch(config.UPDATE_STATUS_URL, payload); + console.log(`Voucher: ${voucherID}. Database updated.`); + continue; + } + } catch (error) { + console.log(error); + continue; + } + + if ( + !(await shouldTriggerFinalization( + config, + executor, + voucherID, + voucherStatus + )) + ) { + console.log(`Finalization still should not be triggered towards the contract for Voucher: ${voucherID}.`); + continue; + } + + let txOrder; + let receipt; + + try { + + txOrder = await voucherKernelContractExecutor.triggerFinalizeVoucher( + voucherID, + { gasLimit: config.GAS_LIMIT } + ); + + receipt = await txOrder.wait(); + } catch (e) { + hasErrors = true; + console.log( + `Error while triggering finalization of the voucher. Error: ${e}` + ); + continue; + } + let parsedEvent = await utils.findEventByName( + receipt, + "LogFinalizeVoucher", + "_tokenIdVoucher", + "_triggeredBy" + ); + + if (parsedEvent && parsedEvent[0]) { + parsedEvent[0]._tokenIdVoucher = voucherID; + const payload = [ + { + ...parsedEvent[0], + status: "FINALIZED", + }, + ]; + + console.log(`Voucher: ${voucherID}. The finalization finished.`); + + try { + await axios.patch(config.UPDATE_STATUS_URL, payload); + + console.log(`Voucher: ${voucherID}. Database updated.`); + } catch (e) { + hasErrors = true; + console.log(e); + console.log( + `Error while updating the DB related to finalization of the voucher. Error: ${e}` + ); + } + } + } + + let infoMsg = hasErrors + ? "triggerFinalizations function finished with errors" + : "triggerFinalizations function finished successfully"; + + console.info(infoMsg); +} + + async function shouldTriggerFinalization( + config, + executor, + voucherId, + voucherStatus + ) { + const currTimestamp = await utils.getCurrTimestamp(executor.provider); + const voucherValidTo = await utils.getVoucherValidTo( + config, + executor, + voucherId + ); + + const complainPeriod = await utils.getComplainPeriod(config, executor); + const cancelFaultPeriod = await utils.getCancelFaultPeriod(config, executor); + + let mark = false; + + if (utils.isStatus(voucherStatus[0], utils.IDX_COMPLAIN)) { + if (utils.isStatus(voucherStatus[0], utils.IDX_CANCEL_FAULT)) { + mark = true; + } else if ( + BN(currTimestamp).gte( + BN(voucherStatus[4]).add(cancelFaultPeriod) + ) + ) { + mark = true; + } + } else if ( + utils.isStatus(voucherStatus[0], utils.IDX_CANCEL_FAULT) && + BN(currTimestamp).gte( + BN(voucherStatus[3]).add(complainPeriod) + ) + ) { + //if COF: then final after complain period + mark = true; + } else if ( + utils.isStateRedemptionSigned(voucherStatus[0]) || + utils.isStateRefunded(voucherStatus[0]) + ) { + //if RDM/RFND NON_COMPLAIN: then final after complainPeriodStart + complainPeriod + if ( + BN(currTimestamp).gte( + BN(voucherStatus[3]).add(complainPeriod) + ) + ) { + mark = true; + } + } else if (utils.isStateExpired(voucherStatus[0])) { + //if EXP NON_COMPLAIN: then final after validTo + complainPeriod + if (BN(currTimestamp).gte(BN(voucherValidTo).add(complainPeriod))) { + mark = true; + } + } + + return mark; +} diff --git a/external/lambdas/triggerFinalizations/src/package.json b/external/lambdas/triggerFinalizations/src/package.json new file mode 100644 index 00000000..f0cafe14 --- /dev/null +++ b/external/lambdas/triggerFinalizations/src/package.json @@ -0,0 +1,15 @@ +{ + "name": "aws-lambda-functions", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "node -e \"(async () => console.log(await require('./index').handler({})))();\"" + }, + "dependencies": { + "@aws-sdk/client-s3": "^3.3.0", + "@aws-sdk/node-http-handler": "^3.3.0", + "aws-sdk": "^2.903.0", + "axios": "^0.20.0", + "ethers": "^5.0.14" + } +} diff --git a/external/lambdas/triggerFinalizations/src/utils.js b/external/lambdas/triggerFinalizations/src/utils.js new file mode 100644 index 00000000..3e0dadb6 --- /dev/null +++ b/external/lambdas/triggerFinalizations/src/utils.js @@ -0,0 +1,116 @@ +const ethers = require("ethers"); +const VoucherKernel = require("./abis/VoucherKernel.json"); + +const ONE = 1; + +const IDX_COMMIT = 7; +const IDX_REDEEM = 6; +const IDX_REFUND = 5; +const IDX_EXPIRE = 4; +const IDX_COMPLAIN = 3; +const IDX_CANCEL_FAULT = 2; +const IDX_FINAL = 1; + +async function findEventByName(txReceipt, eventName, ...eventFields) { + if (typeof txReceipt !== "object" || txReceipt === null) return; + + let eventsArr = []; + + for (const key in txReceipt.events) { + if ( + Object.prototype.hasOwnProperty.call(txReceipt.events, key) && + txReceipt.events[key].event === eventName + ) { + const event = txReceipt.events[key]; + + const resultObj = { + txHash: txReceipt.transactionHash, + }; + + for (let index = 0; index < eventFields.length; index++) { + resultObj[eventFields[index]] = event.args[ + eventFields[index] + ].toString(); + } + eventsArr.push(resultObj); + } + } + + return eventsArr; +} + +function isStatus(_status, idx) { + return (_status >> idx) & (ONE == 1); +} + +async function getComplainPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getComplainPeriod(); +} + +async function getCancelFaultPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getCancelFaultPeriod(); +} + +async function getVoucherValidTo(config, executor, voucherId) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + const promiseKey = await vk.getPromiseIdFromVoucherId(voucherId); + return (await vk.getPromiseData(promiseKey))[3].toString() +} + +async function getCurrTimestamp(provider) { + let blockNumber = await provider.getBlockNumber(); + let block = await provider.getBlock(blockNumber); + + return block.timestamp; +} + +function isStateCommitted(status) { + return status == setChange(0, IDX_COMMIT); +} + +function isStateRedemptionSigned(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REDEEM); +} + +function isStateRefunded(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REFUND); +} + +function isStateExpired(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_EXPIRE); +} + +function setChange(status, changeIdx) { + return status | (ONE << changeIdx); +} + +module.exports = { + IDX_FINAL, + IDX_EXPIRE, + IDX_COMPLAIN, + IDX_CANCEL_FAULT, + findEventByName, + isStatus, + getCurrTimestamp, + getComplainPeriod, + getCancelFaultPeriod, + getVoucherValidTo, + isStateCommitted, + isStateRedemptionSigned, + isStateRefunded, + isStateExpired, +}; diff --git a/external/lambdas/triggerFinalizations/update-fn.sh b/external/lambdas/triggerFinalizations/update-fn.sh new file mode 100644 index 00000000..ff6a7c14 --- /dev/null +++ b/external/lambdas/triggerFinalizations/update-fn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +aws lambda update-function-code --function-name "triggerFinalizationsDev" --zip-file "fileb://./src.zip" \ No newline at end of file diff --git a/external/lambdas/triggerFinalizations/zip.sh b/external/lambdas/triggerFinalizations/zip.sh new file mode 100644 index 00000000..2aeca917 --- /dev/null +++ b/external/lambdas/triggerFinalizations/zip.sh @@ -0,0 +1 @@ +zip -r src.zip src/ \ No newline at end of file diff --git a/external/lambdas/triggerWithdrawals/create-fn.sh b/external/lambdas/triggerWithdrawals/create-fn.sh new file mode 100644 index 00000000..f9d164f6 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/create-fn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +aws lambda create-function --function-name "triggerWithdrawalsDev" --runtime "nodejs14.x" --role "arn:aws:iam::237351624248:role/aws-basic-lambda-executon" --timeout 900 --handler "src/index.handler" --region "us-east-2" --zip-file "fileb://./src.zip" \ No newline at end of file diff --git a/external/lambdas/triggerWithdrawals/src/abis/Cashier.json b/external/lambdas/triggerWithdrawals/src/abis/Cashier.json new file mode 100644 index 00000000..7e665343 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/src/abis/Cashier.json @@ -0,0 +1,66623 @@ +{ + "contractName": "Cashier", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_voucherKernel", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_payment", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum Cashier.PaymentType", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogAmountDistribution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "_disasterState", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogDisasterStateSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newTokenContract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogTokenContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogWithdrawEthOnDisaster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogWithdrawTokensOnDisaster", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_payment", + "type": "uint256" + } + ], + "name": "LogWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive", + "payable": true + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "canUnpause", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "setDisasterState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawEthOnDisaster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "withdrawTokensOnDisaster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_burnedQty", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_msgSender", + "type": "address" + } + ], + "name": "withdrawDepositsSe", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_bosonRouterAddress", + "type": "address" + } + ], + "name": "setBosonRouterAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokensContractAddress", + "type": "address" + } + ], + "name": "setTokenContractAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "addEscrowAmount", + "outputs": [], + "stateMutability": "payable", + "type": "function", + "payable": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_newAmount", + "type": "uint256" + } + ], + "name": "addEscrowTokensAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "onERC721Transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenSupplyId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "onERC1155Transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getVoucherKernelAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getBosonRouterAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTokensContractAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "isDisasterStateSet", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getEscrowAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getEscrowTokensAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_voucherKernel\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_payment\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum Cashier.PaymentType\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"LogAmountDistribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newBosonRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogBosonRouterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_disasterState\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogDisasterStateSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newTokenContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogTokenContractSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogWithdrawEthOnDisaster\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogWithdrawTokensOnDisaster\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_payment\",\"type\":\"uint256\"}],\"name\":\"LogWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"addEscrowAmount\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_newAmount\",\"type\":\"uint256\"}],\"name\":\"addEscrowTokensAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"canUnpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBosonRouterAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getEscrowAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getEscrowTokensAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokensContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVoucherKernelAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isDisasterStateSet\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenSupplyId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"onERC1155Transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"onERC721Transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bosonRouterAddress\",\"type\":\"address\"}],\"name\":\"setBosonRouterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"setDisasterState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokensContractAddress\",\"type\":\"address\"}],\"name\":\"setTokenContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_burnedQty\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"withdrawDepositsSe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawEthOnDisaster\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"withdrawTokensOnDisaster\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addEscrowAmount(address)\":{\"params\":{\"_account\":\"The address of an account to update\"}},\"addEscrowTokensAmount(address,address,uint256)\":{\"params\":{\"_account\":\"The address of an account to query\",\"_newAmount\":\"New amount to be set\",\"_token\":\"The address of a token to query\"}},\"getBosonRouterAddress()\":{\"returns\":{\"_0\":\"Address of Boson Router contract\"}},\"getEscrowAmount(address)\":{\"params\":{\"_account\":\"The address of an account to query\"},\"returns\":{\"_0\":\"The balance in escrow\"}},\"getEscrowTokensAmount(address,address)\":{\"params\":{\"_account\":\"The address of an account to query\",\"_token\":\"The address of a token to query\"},\"returns\":{\"_0\":\"The balance in escrow\"}},\"getTokensContractAddress()\":{\"returns\":{\"_0\":\"Address of ERC1155ERC721 contract\"}},\"getVoucherKernelAddress()\":{\"returns\":{\"_0\":\"Address of Voucher Kernel contract\"}},\"isDisasterStateSet()\":{\"returns\":{\"_0\":\"disasterState\"}},\"onERC1155Transfer(address,address,uint256,uint256)\":{\"params\":{\"_from\":\"prev owner of the _tokenSupplyId\",\"_to\":\"nex owner of the _tokenSupplyId\",\"_tokenSupplyId\":\"_tokenSupplyId for transfer\",\"_value\":\"qty which has been transferred\"}},\"onERC721Transfer(address,address,uint256)\":{\"params\":{\"_from\":\"prev owner of the _tokenIdVoucher\",\"_to\":\"next owner of the _tokenIdVoucher\",\"_tokenIdVoucher\":\"_tokenIdVoucher that has been transferred\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setBosonRouterAddress(address)\":{\"params\":{\"_bosonRouterAddress\":\"The address of the Boson Route contract\"}},\"setTokenContractAddress(address)\":{\"params\":{\"_tokensContractAddress\":\"The address of the ERC1155ERC721 contract\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"withdraw(uint256)\":{\"details\":\"This function would be optimized a lot, here verbose for readability.\",\"params\":{\"_tokenIdVoucher\":\"ID of a voucher token (ERC-721) to try withdraw funds from\"}},\"withdrawDepositsSe(uint256,uint256,address)\":{\"params\":{\"_burnedQty\":\"burned quantity that the deposits should be withdrawn for\",\"_msgSender\":\"owner of the voucher set\",\"_tokenIdSupply\":\"an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for\"}},\"withdrawTokensOnDisaster(address)\":{\"params\":{\"token\":\"address of a token, that the caller sent the funds, while interacting with voucher or voucher-set\"}}},\"title\":\"Contract for managing funds Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addEscrowAmount(address)\":{\"notice\":\"Update the amount in escrow of an address with the new value, based on VoucherSet/Voucher interaction\"},\"addEscrowTokensAmount(address,address,uint256)\":{\"notice\":\"Update the amount in escrowTokens of an address with the new value, based on VoucherSet/Voucher interaction\"},\"canUnpause()\":{\"notice\":\"If once disaster state has been set to true, the contract could never be unpaused.\"},\"getBosonRouterAddress()\":{\"notice\":\"Get the address of Boson Router contract\"},\"getEscrowAmount(address)\":{\"notice\":\"Get the amount in escrow of an address\"},\"getEscrowTokensAmount(address,address)\":{\"notice\":\"Get the amount in escrow of an address\"},\"getTokensContractAddress()\":{\"notice\":\"Get the address of ERC1155ERC721 contract\"},\"getVoucherKernelAddress()\":{\"notice\":\"Get the address of Voucher Kernel contract\"},\"isDisasterStateSet()\":{\"notice\":\"Ensure whether or not contract has been set to disaster state \"},\"onERC1155Transfer(address,address,uint256,uint256)\":{\"notice\":\"After the transfer happens the _tokenSupplyId should be updated in the promise. Escrow funds for the seller's deposits (If in ETH) should be allocated to the new owner as well.\"},\"onERC721Transfer(address,address,uint256)\":{\"notice\":\"Hook which will be triggered when a _tokenIdVoucher will be transferred. Escrow funds should be allocated to the new owner.\"},\"pause()\":{\"notice\":\"Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function.\"},\"setBosonRouterAddress(address)\":{\"notice\":\"Set the address of the BR contract\"},\"setDisasterState()\":{\"notice\":\"Once this functions is triggered, contracts cannot be unpaused anymore Only BR contract is in control of this function.\"},\"setTokenContractAddress(address)\":{\"notice\":\"Set the address of the ERC1155ERC721 contract\"},\"unpause()\":{\"notice\":\"Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function.\"},\"withdraw(uint256)\":{\"notice\":\"Trigger withdrawals of what funds are releasable The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\"},\"withdrawDepositsSe(uint256,uint256,address)\":{\"notice\":\"External function for withdrawing deposits. Caller must be the seller of the goods, otherwise reverts.Seller triggers withdrawals of remaining deposits for a given supply, in case the voucher set is no longer in exchange.\"},\"withdrawEthOnDisaster()\":{\"notice\":\"In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrow for the address provided. Funds are sent in ETH\"},\"withdrawTokensOnDisaster(address)\":{\"notice\":\"In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrowTokens for the address provided.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/Cashier.sol\":\"Cashier\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/Cashier.sol\":{\"keccak256\":\"0x02ec249568ab75002d489075957b9092c368432b90a4f04c7f4600c6795ccb72\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://06c92b09a21b1da936cab4e0b722ce3381f289cf628b16d22be2df45a6b378aa\",\"dweb:/ipfs/Qmb47ERVVaziB4rTPyK1Xtj5Adi8Adea5ZPkfaZYYVgVYT\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol\":{\"keccak256\":\"0x867daada4cae6f8f547fc7eba2db9f8aa282228901c125e773dfd808943a235a\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://e50dc3939a48de65fd3ba74d54c20d2370adad18ddc97c8dca721839d20e0224\",\"dweb:/ipfs/QmcL6Z8wCcQfgcTQ2UH4vyJ84hYckJW7LGpN6oKg2kQKBm\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IBosonRouter.sol\":{\"keccak256\":\"0xd7e0608d454b7a6a5201d407f21f1382b2a796bb9118ea09a5f2713d29db97db\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://034bd3d0fa0b65b7248c46e4f13533940c19c5ab781cf2315b8cc4821187eba6\",\"dweb:/ipfs/QmQn9ZATUwywqi1BFDvoZFo5cNrPdwWpNvELEM5D67GLL8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol\":{\"keccak256\":\"0x9d1d5312c331d6a2abc6b40ff3fa19fa0a7803cbc78bd68540689c31e18def53\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://aec82b84697324001ce65295a830144740750470fc2e0653530720fcd68fbb4b\",\"dweb:/ipfs/QmXgkKo2MgYWY16YD4zW3c8F2Ajbyz1tsTQmRjR12G7Vuw\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://19c0dfbf7bb7744af0c03156e372d0096e0d07de8805ead7722243b8b42276a3\",\"dweb:/ipfs/QmPEFDvi6mJZ3sVii3uBs3CQzAARXPFwCKiHG5zkiCmC4V\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xbd74f587ab9b9711801baf667db1426e4a03fd2d7f15af33e0e0d0394e7cef76\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2d0913dfbfce90d170df0d496ad7596c0778518e5fa7aba6c32562522546f66b\",\"dweb:/ipfs/QmR6B8nLj2PJf5e1JWD9Nk7ErkAwkqUwadCnvE82FJr1RU\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xc77dd6233a82c7c6e3dc49da8f3456baa00ecd3ea4dfa9222002a9aebf155dcd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8e5f78a5b3e707177aa47371e008a54b83dbd28a52055d1746534502b010c21b\",\"dweb:/ipfs/Qmeqfky5DvkMZZY3RtP6kYhFD5bZrPAMVPbqkwWhoUjZ3u\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x4c5617b558186dc4b2b994b18ab9236410cd2dd1d9ad1213bbcca2e1d5321ce8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27b103fe3d550cf3717751a2c67e14008806af25baa3916b5717eeb68a2767ad\",\"dweb:/ipfs/QmS6gG9XVCx3qco7ewaSgJdcQRfZuurqxqPnKmRJ3Dj7Fg\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x1153f6dd334c01566417b8c551122450542a2b75a2bbb379d59a8c320ed6da28\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://002b4e5c26a2a069ba42486b83bf9c4b5461f3d5def32f9ef52b0aef8905d6d2\",\"dweb:/ipfs/QmPG44XDF4npiqRzzGvqJroDtUKfcR78wcreQ9bXa6guW6\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200470c3803806200470c833981810160405260208110156200003757600080fd5b5051600160009081556200004a620000d8565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001805460ff60a01b19908116909155600280546001600160a01b0319166001600160a01b039390931692909217909155600480549091169055620000dc565b3390565b61462080620000ec6000396000f3fe60806040526004361061011f5760003560e01c80631429dae81461017a57806319946845146101bd5780632a950716146101e35780632e1a7d4d1461023057806336a166f61461025a5780633f4ba83a1461026f5780635321847e146102845780635711fd77146102c3578063598e2e0c1461030c5780635c975abb14610335578063715018a61461034a5780637c7270881461035f5780638456cb59146103745780638da5cb5b1461038957806397f9e52a146103ba578063a2919f63146103cf578063ae04884e14610412578063b23d485414610427578063bd17de401461045a578063c98d9b831461048d578063d1358365146104a2578063e13f44bf146104d5578063e3f5d2d514610508578063f2fde38b1461051d57610175565b36610175576003546001600160a01b03163314610173576040805162461bcd60e51b815260206004820152600d60248201526c494e56414c49445f504159454560981b604482015290519081900360640190fd5b005b600080fd5b34801561018657600080fd5b506101736004803603606081101561019d57600080fd5b506001600160a01b03813581169160208101359091169060400135610550565b610173600480360360208110156101d357600080fd5b50356001600160a01b0316610650565b3480156101ef57600080fd5b5061021e6004803603604081101561020657600080fd5b506001600160a01b038135811691602001351661072e565b60408051918252519081900360200190f35b34801561023c57600080fd5b506101736004803603602081101561025357600080fd5b503561075b565b34801561026657600080fd5b50610173610d0d565b34801561027b57600080fd5b50610173610e1a565b34801561029057600080fd5b50610173600480360360608110156102a757600080fd5b50803590602081013590604001356001600160a01b0316610ec3565b3480156102cf57600080fd5b50610173600480360360808110156102e657600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135611272565b34801561031857600080fd5b506103216116ce565b604080519115158252519081900360200190f35b34801561034157600080fd5b506103216116de565b34801561035657600080fd5b506101736116ee565b34801561036b57600080fd5b50610173611788565b34801561038057600080fd5b50610173611918565b34801561039557600080fd5b5061039e6119bf565b604080516001600160a01b039092168252519081900360200190f35b3480156103c657600080fd5b5061039e6119ce565b3480156103db57600080fd5b50610173600480360360608110156103f257600080fd5b506001600160a01b038135811691602081013590911690604001356119dd565b34801561041e57600080fd5b506103216121ac565b34801561043357600080fd5b506101736004803603602081101561044a57600080fd5b50356001600160a01b03166121bd565b34801561046657600080fd5b506101736004803603602081101561047d57600080fd5b50356001600160a01b03166122ca565b34801561049957600080fd5b5061039e6123d7565b3480156104ae57600080fd5b5061021e600480360360208110156104c557600080fd5b50356001600160a01b03166123e6565b3480156104e157600080fd5b50610173600480360360208110156104f857600080fd5b50356001600160a01b0316612401565b34801561051457600080fd5b5061039e612621565b34801561052957600080fd5b506101736004803603602081101561054057600080fd5b50356001600160a01b0316612630565b6003546001600160a01b031661059e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b031633146105ef576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6001600160a01b0380841660009081526006602090815260408083209386168352929052205461061f9082612721565b6001600160a01b03938416600090815260066020908152604080832095909616825293909352929091209190915550565b6003546001600160a01b031661069e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b031633146106ef576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6001600160a01b0381166000908152600560205260409020546107129034612721565b6001600160a01b03909116600090815260056020526040902055565b6001600160a01b038083166000908152600660209081526040808320938516835292905220545b92915050565b600260005414156107a1576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b60026000556107ae6116de565b156107f3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6107fb614398565b8161083e576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60208082018390526002546040805163035e54d560e31b81526004810186905290516001600160a01b0390921692631af2a6a892602480840193829003018186803b15801561088c57600080fd5b505afa1580156108a0573d6000803e3d6000fd5b505050506040513d60208110156108b657600080fd5b505180825260025460408051631cf7955d60e01b81526004810193909352516001600160a01b0390911691631cf7955d916024808301926020929190829003018186803b15801561090657600080fd5b505afa15801561091a573d6000803e3d6000fd5b505050506040513d602081101561093057600080fd5b505160ff166101a082018190521580159061095457506004816101a0015160ff1611155b61099e576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b600254602082015160408051630c969ea160e21b81526004810192909252516001600160a01b039092169163325a7a849160248082019260a092909190829003018186803b1580156109ef57600080fd5b505afa158015610a03573d6000803e3d6000fd5b505050506040513d60a0811015610a1957600080fd5b5080516020808301516040938401516101c0860151901515818601529015159181019190915260ff90911690526002548251825163d887b4e760e01b8152600481019190915291516001600160a01b039091169163d887b4e7916024808301926060929190829003018186803b158015610a9257600080fd5b505afa158015610aa6573d6000803e3d6000fd5b505050506040513d6060811015610abc57600080fd5b50805160208083015160409384015160c086015260a0850152608084019190915260025483518351631f38585f60e01b8152600481019190915292516001600160a01b0390911692631f38585f926024808301939192829003018186803b158015610b2657600080fd5b505afa158015610b3a573d6000803e3d6000fd5b505050506040513d6020811015610b5057600080fd5b50516001600160a01b039081166040808401919091526002546020848101518351637baca8e760e11b815260048101919091529251919093169263f75951ce9260248082019391829003018186803b158015610bab57600080fd5b505afa158015610bbf573d6000803e3d6000fd5b505050506040513d6020811015610bd557600080fd5b50516001600160a01b031660608201526101c081015160200151610bfc57610bfc81612780565b806101c0015160400151158015610c2057506101c081015151610c20906001612813565b15610c2e57610c2e81612824565b61010081015115610c5757610c57610c446119bf565b6101008301516101a08401518451612925565b61012081015115610c8057610c808160400151826101200151836101a001518460000151612aae565b61014081015115610ca957610ca98160400151826101400151836101a001518460000151612925565b61016081015115610cd257610cd28160600151826101600151836101a001518460000151612aae565b61018081015115610cfb57610cfb8160600151826101800151836101a001518460000151612925565b610d03614398565b5050600160005550565b610d15612bf8565b6001600160a01b0316610d266119bf565b6001600160a01b031614610d6f576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b610d776116de565b610dbf576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6004805460ff60a01b1916600160a01b90811791829055604080519190920460ff161515815233602082015281517fdf38caf468609827a33cd8703b08fca23e51107a2ad8d4f7587bc0be15a2ee9e929181900390910190a1565b6003546001600160a01b0316610e68576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314610eb9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610ec1612bfc565b565b60026000541415610f09576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b60026000556003546001600160a01b0316610f5c576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314610fad576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60025460408051638810632360e01b81526004810186905290516000926001600160a01b0316916388106323916024808301926020929190829003018186803b158015610ff957600080fd5b505afa15801561100d573d6000803e3d6000fd5b505050506040513d602081101561102357600080fd5b5051905060006110338285612c9f565b60025460408051631cf7955d60e01b81526004810189905290519293506000926001600160a01b0390921691631cf7955d91602480820192602092909190829003018186803b15801561108557600080fd5b505afa158015611099573d6000803e3d6000fd5b505050506040513d60208110156110af57600080fd5b5051905060ff8116158015906110c9575060048160ff1611155b611113576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b60ff811660011480611128575060ff81166003145b1561116a576001600160a01b0384166000908152600560205260409020546111509083612cf8565b6001600160a01b0385166000908152600560205260409020555b60ff81166002148061117f575060ff81166004145b156112595760025460408051639a751bbd60e01b81526004810189905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b1580156111d057600080fd5b505afa1580156111e4573d6000803e3d6000fd5b505050506040513d60208110156111fa57600080fd5b50516001600160a01b038082166000908152600660209081526040808320938a168352929052205490915061122f9084612cf8565b6001600160a01b039182166000908152600660209081526040808320948916835293905291909120555b61126584838389612925565b5050600160005550505050565b6004546001600160a01b031633146112b6576040805162461bcd60e51b8152602060048201526002602482015261155560f21b604482015290519081900360640190fd5b60025460408051631cf7955d60e01b81526004810185905290516000926001600160a01b031691631cf7955d916024808301926020929190829003018186803b15801561130257600080fd5b505afa158015611316573d6000803e3d6000fd5b505050506040513d602081101561132c57600080fd5b5051905060008060ff831660011480611348575060ff83166003145b156114405760025460408051638810632360e01b81526004810188905290516001600160a01b0390921691638810632391602480820192602092909190829003018186803b15801561139957600080fd5b505afa1580156113ad573d6000803e3d6000fd5b505050506040513d60208110156113c357600080fd5b505191506113d18285612c9f565b6001600160a01b0388166000908152600560205260409020549091506113f79082612cf8565b6001600160a01b0380891660009081526005602052604080822093909355908816815220546114269082612721565b6001600160a01b0387166000908152600560205260409020555b60ff831660021480611455575060ff83166004145b156115f25760025460408051639a751bbd60e01b81526004810188905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b1580156114a657600080fd5b505afa1580156114ba573d6000803e3d6000fd5b505050506040513d60208110156114d057600080fd5b505160025460408051638810632360e01b8152600481018a905290519293506001600160a01b0390911691638810632391602480820192602092909190829003018186803b15801561152157600080fd5b505afa158015611535573d6000803e3d6000fd5b505050506040513d602081101561154b57600080fd5b505192506115598386612c9f565b6001600160a01b038083166000908152600660209081526040808320938d168352929052205490925061158c9083612cf8565b6001600160a01b0382811660009081526006602090815260408083208d8516845290915280822093909355908916815220546115c89083612721565b6001600160a01b039182166000908152600660209081526040808320948b16835293905291909120555b600254604080516388c2560760e01b8152600481018890526001600160a01b038981166024830152915191909216916388c2560791604480830192600092919082900301818387803b15801561164757600080fd5b505af115801561165b573d6000803e3d6000fd5b505060035460408051637ff97ac160e01b81526001600160a01b038b811660048301529151919092169350637ff97ac19250602480830192600092919082900301818387803b1580156116ad57600080fd5b505af11580156116c1573d6000803e3d6000fd5b5050505050505050505050565b600454600160a01b900460ff1690565b600154600160a01b900460ff1690565b6116f6612bf8565b6001600160a01b03166117076119bf565b6001600160a01b031614611750576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b031690600080516020614581833981519152908390a3600180546001600160a01b0319169055565b6117906116de565b6117d8576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6002600054141561181e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b6002600055600454600160a01b900460ff1661186b5760405162461bcd60e51b815260040180806020018281038252602381526020018061449d6023913960400191505060405180910390fd5b33600090815260056020526040902054806118bc576040805162461bcd60e51b815260206004820152600c60248201526b455343524f575f454d50545960a01b604482015290519081900360640190fd5b336000818152600560205260408120556118d69082612d55565b6040805182815233602082015281517fb04d37d3296a34ef094bb4da3e1025abae58c3f53fd6b638c1d0174b3a9d509b929181900390910190a1506001600055565b6003546001600160a01b0316611966576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b031633146119b7576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610ec1612e3f565b6001546001600160a01b031690565b6003546001600160a01b031690565b6004546001600160a01b03163314611a21576040805162461bcd60e51b8152602060048201526002602482015261155560f21b604482015290519081900360640190fd5b6002546040805163035e54d560e31b815260048101849052905160009283926001600160a01b0390911691631af2a6a891602480820192602092909190829003018186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b505160025460408051631cf7955d60e01b81526004810184905290519293506000926001600160a01b0390921691631cf7955d91602480820192602092909190829003018186803b158015611af057600080fd5b505afa158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b505160025460408051633eb53ba560e21b815260048101869052815193945060009384936001600160a01b03169263fad4ee949260248082019391829003018186803b158015611b6957600080fd5b505afa158015611b7d573d6000803e3d6000fd5b505050506040513d6040811015611b9357600080fd5b508051602090910151909250905060ff831660011415611c29576000611bb98383612721565b6001600160a01b038a16600090815260056020526040902054909150611bdf9082612cf8565b6001600160a01b03808b1660009081526005602052604080822093909355908a1681522054611c0e9082612721565b6001600160a01b038916600090815260056020526040902055505b60ff831660021415611da5576001600160a01b038816600090815260056020526040902054611c589083612cf8565b6001600160a01b03808a166000908152600560205260408082209390935590891681522054611c879083612721565b6001600160a01b03808916600090815260056020908152604091829020939093556002548151639a751bbd60e01b8152600481018990529151921692639a751bbd92602480840193829003018186803b158015611ce357600080fd5b505afa158015611cf7573d6000803e3d6000fd5b505050506040513d6020811015611d0d57600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d1683529290522054909550611d429082612cf8565b6001600160a01b0386811660009081526006602090815260408083208d851684529091528082209390935590891681522054611d7e9082612721565b6001600160a01b038087166000908152600660209081526040808320938c16835292905220555b60ff831660031415611f21576002546040805163e875a61360e01b81526004810187905290516001600160a01b039092169163e875a61391602480820192602092909190829003018186803b158015611dfd57600080fd5b505afa158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d1683529290522054909550611e5c9083612cf8565b6001600160a01b0386811660009081526006602090815260408083208d851684529091528082209390935590891681522054611e989083612721565b6001600160a01b0380871660009081526006602090815260408083208c85168452825280832094909455918b16815260059091522054611ed89082612cf8565b6001600160a01b03808a166000908152600560205260408082209390935590891681522054611f079082612721565b6001600160a01b0388166000908152600560205260409020555b60ff83166004141561213c576002546040805163e875a61360e01b81526004810187905290516001600160a01b039092169163e875a61391602480820192602092909190829003018186803b158015611f7957600080fd5b505afa158015611f8d573d6000803e3d6000fd5b505050506040513d6020811015611fa357600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d1683529290522054909550611fd89083612cf8565b6001600160a01b0386811660009081526006602090815260408083208d8516845290915280822093909355908916815220546120149083612721565b6001600160a01b0380871660009081526006602090815260408083208c85168452825291829020939093556002548151639a751bbd60e01b8152600481018990529151921692639a751bbd92602480840193829003018186803b15801561207a57600080fd5b505afa15801561208e573d6000803e3d6000fd5b505050506040513d60208110156120a457600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d16835292905220549095506120d99082612cf8565b6001600160a01b0386811660009081526006602090815260408083208d8516845290915280822093909355908916815220546121159082612721565b6001600160a01b038087166000908152600660209081526040808320938c16835292905220555b60035460408051637ff97ac160e01b81526001600160a01b038a8116600483015291519190921691637ff97ac191602480830192600092919082900301818387803b15801561218a57600080fd5b505af115801561219e573d6000803e3d6000fd5b505050505050505050505050565b600454600160a01b900460ff161590565b6121c5612bf8565b6001600160a01b03166121d66119bf565b6001600160a01b03161461221f576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001600160a01b038116612270576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517f7b81c5e3a8e5647e11ccd172baaaf534f02cb16cd563be7c3c70c9354215bdb19281900390910190a150565b6122d2612bf8565b6001600160a01b03166122e36119bf565b6001600160a01b03161461232c576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001600160a01b03811661237d576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b6004546001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6124096116de565b612451576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60026000541415612497576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b6002600055806001600160a01b0381166124f0576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f544f4b454e5f4144445245535360581b604482015290519081900360640190fd5b600454600160a01b900460ff166125385760405162461bcd60e51b815260040180806020018281038252602381526020018061449d6023913960400191505060405180910390fd5b6001600160a01b03821660009081526006602090815260408083203384529091529020548061259d576040805162461bcd60e51b815260206004820152600c60248201526b455343524f575f454d50545960a01b604482015290519081900360640190fd5b6001600160a01b03831660009081526006602090815260408083203380855292528220919091556125d090849083612ec8565b604080518281526001600160a01b0385166020820152338183015290517f7e5dd3919ea79fc8c93a49edf5656ab20f89df3e419fde48c90a90765f7605a69181900360600190a15050600160005550565b6002546001600160a01b031690565b612638612bf8565b6001600160a01b03166126496119bf565b6001600160a01b031614612692576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001600160a01b0381166126d75760405162461bcd60e51b81526004018080602001828103825260268152602001806144776026913960400191505060405180910390fd5b6001546040516001600160a01b0380841692169060008051602061458183398151915290600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015612779576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b6101c081015151612792906006612813565b156127a5576127a081612f1a565b612810565b6101c0810151516127b7906005612813565b806127cf57506101c0810151516127cf906004612813565b8061280257506101c0810151516127e7906002612813565b801561280257506101c081015151612800906006612813565b155b15612810576128108161316f565b50565b60ff91821691161c60019081161490565b6101c081015151612836906003612813565b1561284957612844816133af565b612872565b6101c08101515161285b906002612813565b156128695761284481613867565b61287281613ae9565b6101c081015151612884906006612813565b8061289c57506101c08101515161289c906002612813565b156128af576128aa81613cbd565b6128b8565b6128b881613e92565b60025460208201516040805163ebba1b2960e01b81526004810192909252516001600160a01b039092169163ebba1b299160248082019260009290919082900301818387803b15801561290a57600080fd5b505af115801561291e573d6000803e3d6000fd5b5050505050565b6001600160a01b038416612976576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600083116129a5576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b60ff8216600114806129ba575060ff82166003145b15612a09576129d26001600160a01b03851684612d55565b604080513381526001600160a01b038616602082015280820185905290516000805160206144c08339815191529181900360600190a15b60ff821660021480612a1e575060ff82166004145b15612aa85760025460408051639a751bbd60e01b81526004810184905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015612a6f57600080fd5b505afa158015612a83573d6000803e3d6000fd5b505050506040513d6020811015612a9957600080fd5b5051905061291e818686612ec8565b50505050565b6001600160a01b038416612aff576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60008311612b2e576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b60ff821660011480612b43575060ff82166002145b15612b9257612b5b6001600160a01b03851684612d55565b604080513381526001600160a01b038616602082015280820185905290516000805160206144c08339815191529181900360600190a15b60ff821660031480612ba7575060ff82166004145b15612aa8576002546040805163e875a61360e01b81526004810184905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015612a6f57600080fd5b3390565b612c046116de565b612c4c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612c82612bf8565b604080516001600160a01b039092168252519081900360200190a1565b600082612cae57506000610755565b82820282848281612cbb57fe5b04146127795760405162461bcd60e51b81526004018080602001828103825260218152602001806145406021913960400191505060405180910390fd5b600082821115612d4f576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b80471015612daa576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114612df5576040519150601f19603f3d011682016040523d82523d6000602084013e612dfa565b606091505b5050905080612e3a5760405162461bcd60e51b815260040180806020018281038252603a8152602001806144e0603a913960400191505060405180910390fd5b505050565b612e476116de565b15612e8c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c82612bf8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612e3a908490614066565b6101a081015160ff1660011480612f3957506101a081015160ff166002145b15612f8757608081015160608201516001600160a01b0316600090815260056020526040902054612f6991612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff1660031480612fa657506101a081015160ff166004145b156130915760025481516040805163e875a61360e01b81526004810192909252516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015612ff957600080fd5b505afa15801561300d573d6000803e3d6000fd5b505050506040513d602081101561302357600080fd5b505160808301516001600160a01b0380831660009081526006602090815260408083206060890151909416835292905220549192506130629190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60808101516101208201516130a591612721565b610120820152600254602082015160408051633aaa4a8b60e11b81526004810192909252516001600160a01b039092169163755495169160248082019260009290919082900301818387803b1580156130fd57600080fd5b505af1158015613111573d6000803e3d6000fd5b5050505080602001516000805160206145a183398151915282604001518360800151600060405180846001600160a01b0316815260200183815260200182600281111561315a57fe5b8152602001935050505060405180910390a250565b6101a081015160ff166001148061318e57506101a081015160ff166002145b156131dc57608081015160608201516001600160a01b03166000908152600560205260409020546131be91612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff16600314806131fb57506101a081015160ff166004145b156132e65760025481516040805163e875a61360e01b81526004810192909252516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b15801561324e57600080fd5b505afa158015613262573d6000803e3d6000fd5b505050506040513d602081101561327857600080fd5b505160808301516001600160a01b0380831660009081526006602090815260408083206060890151909416835292905220549192506132b79190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60808101516101608201516132fa91612721565b610160820152600254602082015160408051633aaa4a8b60e11b81526004810192909252516001600160a01b039092169163755495169160248082019260009290919082900301818387803b15801561335257600080fd5b505af1158015613366573d6000803e3d6000fd5b5050505080602001516000805160206145a183398151915282606001518360800151600060405180846001600160a01b0316815260200183815260200182600281111561315a57fe5b6101c0810151516133c1906002612813565b156136b9576101a081015160ff16600114806133e557506101a081015160ff166003145b1561342f5760a08101516040808301516001600160a01b031660009081526005602052205461341391612cf8565b6040808301516001600160a01b03166000908152600560205220555b6101a081015160ff166002148061344e57506101a081015160ff166004145b1561353757600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b1580156134a157600080fd5b505afa1580156134b5573d6000803e3d6000fd5b505050506040513d60208110156134cb57600080fd5b505160a08301516001600160a01b03808316600090815260066020908152604080832081890151909416835292905220549192506135099190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a081015160009061354a906002614117565b61018083015190915061355d9082612721565b61018083015261357d613571826002614117565b61014084015190612721565b6101408301526135b56135a9613594836002614117565b60a08501516135a39085612cf8565b90612cf8565b61010084015190612721565b610100830152602080830151606080850151604080516001600160a01b039092168252938101859052600181850152925191926000805160206145a1833981519152929081900390910190a2602082015160408301516000805160206145a183398151915290613626846002614117565b604080516001600160a01b039390931683526020830191909152600182820152519081900360600190a281602001516000805160206145a183398151915261366c6119bf565b61368961367a856002614117565b60a08701516135a39087612cf8565b604080516001600160a01b039390931683526020830191909152600182820152519081900360600190a250612810565b6101a081015160ff16600114806136d857506101a081015160ff166003145b156137265760a08101516040808301516001600160a01b031660009081526005602052205461370691612cf8565b6040808301516001600160a01b031660009081526005602052205561380a565b600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b15801561377457600080fd5b505afa158015613788573d6000803e3d6000fd5b505050506040513d602081101561379e57600080fd5b505160a08301516001600160a01b03808316600090815260066020908152604080832081890151909416835292905220549192506137dc9190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a081015161010082015161381e91612721565b61010082015260208101516000805160206145a18339815191526138406119bf565b60a0840151604080516001600160a01b03841681526020810183905260019181018261315a565b6101a081015160ff166001148061388657506101a081015160ff166003145b156138d05760a08101516040808301516001600160a01b03166000908152600560205220546138b491612cf8565b6040808301516001600160a01b03166000908152600560205220555b6101a081015160ff16600214806138ef57506101a081015160ff166004145b156139d857600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b15801561394257600080fd5b505afa158015613956573d6000803e3d6000fd5b505050506040513d602081101561396c57600080fd5b505160a08301516001600160a01b03808316600090815260066020908152604080832081890151909416835292905220549192506139aa9190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a08101516139f8906139ec906002614117565b61014083015190612721565b61014082015260a0810151613a2d90613a2190613a16906002614117565b60a084015190612cf8565b61018083015190612721565b6101808201526020810151604082015160a08301516000805160206145a18339815191529190613a5e906002614117565b604080516001600160a01b039390931683526020830191909152600182820152519081900360600190a280602001516000805160206145a18339815191528260600151613ac7613abc60028660a0015161411790919063ffffffff16565b60a086015190612cf8565b604080516001600160a01b03841681526020810183905260019181018261315a565b6101a081015160ff1660011480613b0857506101a081015160ff166003145b15613b525760a08101516040808301516001600160a01b0316600090815260056020522054613b3691612cf8565b6040808301516001600160a01b03166000908152600560205220555b6101a081015160ff1660021480613b7157506101a081015160ff166004145b15613c5a57600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015613bc457600080fd5b505afa158015613bd8573d6000803e3d6000fd5b505050506040513d6020811015613bee57600080fd5b505160a08301516001600160a01b0380831660009081526006602090815260408083208189015190941683529290522054919250613c2c9190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a0810151610140820151613c6e91612721565b8161014001818152505080602001516000805160206145a183398151915282604001518360a00151600160405180846001600160a01b0316815260200183815260200182600281111561315a57fe5b6101a081015160ff1660011480613cdc57506101a081015160ff166003145b15613d2a5760c081015160608201516001600160a01b0316600090815260056020526040902054613d0c91612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff1660021480613d4957506101a081015160ff166004145b15613e3457600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015613d9c57600080fd5b505afa158015613db0573d6000803e3d6000fd5b505050506040513d6020811015613dc657600080fd5b505160c08301516001600160a01b038083166000908152600660209081526040808320606089015190941683529290522054919250613e059190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60c0810151610180820151613e4891612721565b610180820152602080820151606083015160c0840151604080516001600160a01b038416815294850182905292936000805160206145a1833981519152936002919081018261315a565b6101a081015160ff1660011480613eb157506101a081015160ff166003145b15613eff5760c081015160608201516001600160a01b0316600090815260056020526040902054613ee191612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff1660021480613f1e57506101a081015160ff166004145b1561400957600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015613f7157600080fd5b505afa158015613f85573d6000803e3d6000fd5b505050506040513d6020811015613f9b57600080fd5b505160c08301516001600160a01b038083166000908152600660209081526040808320606089015190941683529290522054919250613fda9190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60c081015161010082015161401d91612721565b61010082015260208101516000805160206145a183398151915261403f6119bf565b60c0840151604080516001600160a01b03841681526020810183905260029181018261315a565b60606140bb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661417b9092919063ffffffff16565b805190915015612e3a578080602001905160208110156140da57600080fd5b5051612e3a5760405162461bcd60e51b815260040180806020018281038252602a8152602001806145c1602a913960400191505060405180910390fd5b600080821161416a576040805162461bcd60e51b815260206004820152601a602482015279536166654d6174683a206469766973696f6e206279207a65726f60301b604482015290519081900360640190fd5b81838161417357fe5b049392505050565b606061418a8484600085614192565b949350505050565b6060824710156141d35760405162461bcd60e51b815260040180806020018281038252602681526020018061451a6026913960400191505060405180910390fd5b6141dc856142ee565b61422d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061426c5780518252601f19909201916020918201910161424d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146142ce576040519150601f19603f3d011682016040523d82523d6000602084013e6142d3565b606091505b50915091506142e38282866142f4565b979650505050505050565b3b151590565b60608315614303575081612779565b8251156143135782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561435d578181015183820152602001614345565b50505050905090810190601f16801561438a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604051806101e00160405280600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600060ff168152602001614423614428565b905290565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e657220646964206e6f7420616c6c6f77206d616e75616c2077697468647261770ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0e6e743e535fe193128a1e1839b7c1f313bb203d9cbb58e4c955d5e9a8a8f0fc25361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122055374aac872f3dbfe21c18a44aff888d193c3a6a0e03f64c2bb41732b4b99e5d64736f6c63430007010033", + "deployedBytecode": "0x60806040526004361061011f5760003560e01c80631429dae81461017a57806319946845146101bd5780632a950716146101e35780632e1a7d4d1461023057806336a166f61461025a5780633f4ba83a1461026f5780635321847e146102845780635711fd77146102c3578063598e2e0c1461030c5780635c975abb14610335578063715018a61461034a5780637c7270881461035f5780638456cb59146103745780638da5cb5b1461038957806397f9e52a146103ba578063a2919f63146103cf578063ae04884e14610412578063b23d485414610427578063bd17de401461045a578063c98d9b831461048d578063d1358365146104a2578063e13f44bf146104d5578063e3f5d2d514610508578063f2fde38b1461051d57610175565b36610175576003546001600160a01b03163314610173576040805162461bcd60e51b815260206004820152600d60248201526c494e56414c49445f504159454560981b604482015290519081900360640190fd5b005b600080fd5b34801561018657600080fd5b506101736004803603606081101561019d57600080fd5b506001600160a01b03813581169160208101359091169060400135610550565b610173600480360360208110156101d357600080fd5b50356001600160a01b0316610650565b3480156101ef57600080fd5b5061021e6004803603604081101561020657600080fd5b506001600160a01b038135811691602001351661072e565b60408051918252519081900360200190f35b34801561023c57600080fd5b506101736004803603602081101561025357600080fd5b503561075b565b34801561026657600080fd5b50610173610d0d565b34801561027b57600080fd5b50610173610e1a565b34801561029057600080fd5b50610173600480360360608110156102a757600080fd5b50803590602081013590604001356001600160a01b0316610ec3565b3480156102cf57600080fd5b50610173600480360360808110156102e657600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135611272565b34801561031857600080fd5b506103216116ce565b604080519115158252519081900360200190f35b34801561034157600080fd5b506103216116de565b34801561035657600080fd5b506101736116ee565b34801561036b57600080fd5b50610173611788565b34801561038057600080fd5b50610173611918565b34801561039557600080fd5b5061039e6119bf565b604080516001600160a01b039092168252519081900360200190f35b3480156103c657600080fd5b5061039e6119ce565b3480156103db57600080fd5b50610173600480360360608110156103f257600080fd5b506001600160a01b038135811691602081013590911690604001356119dd565b34801561041e57600080fd5b506103216121ac565b34801561043357600080fd5b506101736004803603602081101561044a57600080fd5b50356001600160a01b03166121bd565b34801561046657600080fd5b506101736004803603602081101561047d57600080fd5b50356001600160a01b03166122ca565b34801561049957600080fd5b5061039e6123d7565b3480156104ae57600080fd5b5061021e600480360360208110156104c557600080fd5b50356001600160a01b03166123e6565b3480156104e157600080fd5b50610173600480360360208110156104f857600080fd5b50356001600160a01b0316612401565b34801561051457600080fd5b5061039e612621565b34801561052957600080fd5b506101736004803603602081101561054057600080fd5b50356001600160a01b0316612630565b6003546001600160a01b031661059e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b031633146105ef576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6001600160a01b0380841660009081526006602090815260408083209386168352929052205461061f9082612721565b6001600160a01b03938416600090815260066020908152604080832095909616825293909352929091209190915550565b6003546001600160a01b031661069e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b031633146106ef576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6001600160a01b0381166000908152600560205260409020546107129034612721565b6001600160a01b03909116600090815260056020526040902055565b6001600160a01b038083166000908152600660209081526040808320938516835292905220545b92915050565b600260005414156107a1576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b60026000556107ae6116de565b156107f3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6107fb614398565b8161083e576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60208082018390526002546040805163035e54d560e31b81526004810186905290516001600160a01b0390921692631af2a6a892602480840193829003018186803b15801561088c57600080fd5b505afa1580156108a0573d6000803e3d6000fd5b505050506040513d60208110156108b657600080fd5b505180825260025460408051631cf7955d60e01b81526004810193909352516001600160a01b0390911691631cf7955d916024808301926020929190829003018186803b15801561090657600080fd5b505afa15801561091a573d6000803e3d6000fd5b505050506040513d602081101561093057600080fd5b505160ff166101a082018190521580159061095457506004816101a0015160ff1611155b61099e576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b600254602082015160408051630c969ea160e21b81526004810192909252516001600160a01b039092169163325a7a849160248082019260a092909190829003018186803b1580156109ef57600080fd5b505afa158015610a03573d6000803e3d6000fd5b505050506040513d60a0811015610a1957600080fd5b5080516020808301516040938401516101c0860151901515818601529015159181019190915260ff90911690526002548251825163d887b4e760e01b8152600481019190915291516001600160a01b039091169163d887b4e7916024808301926060929190829003018186803b158015610a9257600080fd5b505afa158015610aa6573d6000803e3d6000fd5b505050506040513d6060811015610abc57600080fd5b50805160208083015160409384015160c086015260a0850152608084019190915260025483518351631f38585f60e01b8152600481019190915292516001600160a01b0390911692631f38585f926024808301939192829003018186803b158015610b2657600080fd5b505afa158015610b3a573d6000803e3d6000fd5b505050506040513d6020811015610b5057600080fd5b50516001600160a01b039081166040808401919091526002546020848101518351637baca8e760e11b815260048101919091529251919093169263f75951ce9260248082019391829003018186803b158015610bab57600080fd5b505afa158015610bbf573d6000803e3d6000fd5b505050506040513d6020811015610bd557600080fd5b50516001600160a01b031660608201526101c081015160200151610bfc57610bfc81612780565b806101c0015160400151158015610c2057506101c081015151610c20906001612813565b15610c2e57610c2e81612824565b61010081015115610c5757610c57610c446119bf565b6101008301516101a08401518451612925565b61012081015115610c8057610c808160400151826101200151836101a001518460000151612aae565b61014081015115610ca957610ca98160400151826101400151836101a001518460000151612925565b61016081015115610cd257610cd28160600151826101600151836101a001518460000151612aae565b61018081015115610cfb57610cfb8160600151826101800151836101a001518460000151612925565b610d03614398565b5050600160005550565b610d15612bf8565b6001600160a01b0316610d266119bf565b6001600160a01b031614610d6f576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b610d776116de565b610dbf576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6004805460ff60a01b1916600160a01b90811791829055604080519190920460ff161515815233602082015281517fdf38caf468609827a33cd8703b08fca23e51107a2ad8d4f7587bc0be15a2ee9e929181900390910190a1565b6003546001600160a01b0316610e68576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314610eb9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610ec1612bfc565b565b60026000541415610f09576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b60026000556003546001600160a01b0316610f5c576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314610fad576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60025460408051638810632360e01b81526004810186905290516000926001600160a01b0316916388106323916024808301926020929190829003018186803b158015610ff957600080fd5b505afa15801561100d573d6000803e3d6000fd5b505050506040513d602081101561102357600080fd5b5051905060006110338285612c9f565b60025460408051631cf7955d60e01b81526004810189905290519293506000926001600160a01b0390921691631cf7955d91602480820192602092909190829003018186803b15801561108557600080fd5b505afa158015611099573d6000803e3d6000fd5b505050506040513d60208110156110af57600080fd5b5051905060ff8116158015906110c9575060048160ff1611155b611113576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b60ff811660011480611128575060ff81166003145b1561116a576001600160a01b0384166000908152600560205260409020546111509083612cf8565b6001600160a01b0385166000908152600560205260409020555b60ff81166002148061117f575060ff81166004145b156112595760025460408051639a751bbd60e01b81526004810189905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b1580156111d057600080fd5b505afa1580156111e4573d6000803e3d6000fd5b505050506040513d60208110156111fa57600080fd5b50516001600160a01b038082166000908152600660209081526040808320938a168352929052205490915061122f9084612cf8565b6001600160a01b039182166000908152600660209081526040808320948916835293905291909120555b61126584838389612925565b5050600160005550505050565b6004546001600160a01b031633146112b6576040805162461bcd60e51b8152602060048201526002602482015261155560f21b604482015290519081900360640190fd5b60025460408051631cf7955d60e01b81526004810185905290516000926001600160a01b031691631cf7955d916024808301926020929190829003018186803b15801561130257600080fd5b505afa158015611316573d6000803e3d6000fd5b505050506040513d602081101561132c57600080fd5b5051905060008060ff831660011480611348575060ff83166003145b156114405760025460408051638810632360e01b81526004810188905290516001600160a01b0390921691638810632391602480820192602092909190829003018186803b15801561139957600080fd5b505afa1580156113ad573d6000803e3d6000fd5b505050506040513d60208110156113c357600080fd5b505191506113d18285612c9f565b6001600160a01b0388166000908152600560205260409020549091506113f79082612cf8565b6001600160a01b0380891660009081526005602052604080822093909355908816815220546114269082612721565b6001600160a01b0387166000908152600560205260409020555b60ff831660021480611455575060ff83166004145b156115f25760025460408051639a751bbd60e01b81526004810188905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b1580156114a657600080fd5b505afa1580156114ba573d6000803e3d6000fd5b505050506040513d60208110156114d057600080fd5b505160025460408051638810632360e01b8152600481018a905290519293506001600160a01b0390911691638810632391602480820192602092909190829003018186803b15801561152157600080fd5b505afa158015611535573d6000803e3d6000fd5b505050506040513d602081101561154b57600080fd5b505192506115598386612c9f565b6001600160a01b038083166000908152600660209081526040808320938d168352929052205490925061158c9083612cf8565b6001600160a01b0382811660009081526006602090815260408083208d8516845290915280822093909355908916815220546115c89083612721565b6001600160a01b039182166000908152600660209081526040808320948b16835293905291909120555b600254604080516388c2560760e01b8152600481018890526001600160a01b038981166024830152915191909216916388c2560791604480830192600092919082900301818387803b15801561164757600080fd5b505af115801561165b573d6000803e3d6000fd5b505060035460408051637ff97ac160e01b81526001600160a01b038b811660048301529151919092169350637ff97ac19250602480830192600092919082900301818387803b1580156116ad57600080fd5b505af11580156116c1573d6000803e3d6000fd5b5050505050505050505050565b600454600160a01b900460ff1690565b600154600160a01b900460ff1690565b6116f6612bf8565b6001600160a01b03166117076119bf565b6001600160a01b031614611750576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001546040516000916001600160a01b031690600080516020614581833981519152908390a3600180546001600160a01b0319169055565b6117906116de565b6117d8576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6002600054141561181e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b6002600055600454600160a01b900460ff1661186b5760405162461bcd60e51b815260040180806020018281038252602381526020018061449d6023913960400191505060405180910390fd5b33600090815260056020526040902054806118bc576040805162461bcd60e51b815260206004820152600c60248201526b455343524f575f454d50545960a01b604482015290519081900360640190fd5b336000818152600560205260408120556118d69082612d55565b6040805182815233602082015281517fb04d37d3296a34ef094bb4da3e1025abae58c3f53fd6b638c1d0174b3a9d509b929181900390910190a1506001600055565b6003546001600160a01b0316611966576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b031633146119b7576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610ec1612e3f565b6001546001600160a01b031690565b6003546001600160a01b031690565b6004546001600160a01b03163314611a21576040805162461bcd60e51b8152602060048201526002602482015261155560f21b604482015290519081900360640190fd5b6002546040805163035e54d560e31b815260048101849052905160009283926001600160a01b0390911691631af2a6a891602480820192602092909190829003018186803b158015611a7257600080fd5b505afa158015611a86573d6000803e3d6000fd5b505050506040513d6020811015611a9c57600080fd5b505160025460408051631cf7955d60e01b81526004810184905290519293506000926001600160a01b0390921691631cf7955d91602480820192602092909190829003018186803b158015611af057600080fd5b505afa158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b505160025460408051633eb53ba560e21b815260048101869052815193945060009384936001600160a01b03169263fad4ee949260248082019391829003018186803b158015611b6957600080fd5b505afa158015611b7d573d6000803e3d6000fd5b505050506040513d6040811015611b9357600080fd5b508051602090910151909250905060ff831660011415611c29576000611bb98383612721565b6001600160a01b038a16600090815260056020526040902054909150611bdf9082612cf8565b6001600160a01b03808b1660009081526005602052604080822093909355908a1681522054611c0e9082612721565b6001600160a01b038916600090815260056020526040902055505b60ff831660021415611da5576001600160a01b038816600090815260056020526040902054611c589083612cf8565b6001600160a01b03808a166000908152600560205260408082209390935590891681522054611c879083612721565b6001600160a01b03808916600090815260056020908152604091829020939093556002548151639a751bbd60e01b8152600481018990529151921692639a751bbd92602480840193829003018186803b158015611ce357600080fd5b505afa158015611cf7573d6000803e3d6000fd5b505050506040513d6020811015611d0d57600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d1683529290522054909550611d429082612cf8565b6001600160a01b0386811660009081526006602090815260408083208d851684529091528082209390935590891681522054611d7e9082612721565b6001600160a01b038087166000908152600660209081526040808320938c16835292905220555b60ff831660031415611f21576002546040805163e875a61360e01b81526004810187905290516001600160a01b039092169163e875a61391602480820192602092909190829003018186803b158015611dfd57600080fd5b505afa158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d1683529290522054909550611e5c9083612cf8565b6001600160a01b0386811660009081526006602090815260408083208d851684529091528082209390935590891681522054611e989083612721565b6001600160a01b0380871660009081526006602090815260408083208c85168452825280832094909455918b16815260059091522054611ed89082612cf8565b6001600160a01b03808a166000908152600560205260408082209390935590891681522054611f079082612721565b6001600160a01b0388166000908152600560205260409020555b60ff83166004141561213c576002546040805163e875a61360e01b81526004810187905290516001600160a01b039092169163e875a61391602480820192602092909190829003018186803b158015611f7957600080fd5b505afa158015611f8d573d6000803e3d6000fd5b505050506040513d6020811015611fa357600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d1683529290522054909550611fd89083612cf8565b6001600160a01b0386811660009081526006602090815260408083208d8516845290915280822093909355908916815220546120149083612721565b6001600160a01b0380871660009081526006602090815260408083208c85168452825291829020939093556002548151639a751bbd60e01b8152600481018990529151921692639a751bbd92602480840193829003018186803b15801561207a57600080fd5b505afa15801561208e573d6000803e3d6000fd5b505050506040513d60208110156120a457600080fd5b50516001600160a01b038082166000908152600660209081526040808320938d16835292905220549095506120d99082612cf8565b6001600160a01b0386811660009081526006602090815260408083208d8516845290915280822093909355908916815220546121159082612721565b6001600160a01b038087166000908152600660209081526040808320938c16835292905220555b60035460408051637ff97ac160e01b81526001600160a01b038a8116600483015291519190921691637ff97ac191602480830192600092919082900301818387803b15801561218a57600080fd5b505af115801561219e573d6000803e3d6000fd5b505050505050505050505050565b600454600160a01b900460ff161590565b6121c5612bf8565b6001600160a01b03166121d66119bf565b6001600160a01b03161461221f576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001600160a01b038116612270576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517f7b81c5e3a8e5647e11ccd172baaaf534f02cb16cd563be7c3c70c9354215bdb19281900390910190a150565b6122d2612bf8565b6001600160a01b03166122e36119bf565b6001600160a01b03161461232c576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001600160a01b03811661237d576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b6004546001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6124096116de565b612451576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60026000541415612497576040805162461bcd60e51b815260206004820152601f6024820152600080516020614457833981519152604482015290519081900360640190fd5b6002600055806001600160a01b0381166124f0576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f544f4b454e5f4144445245535360581b604482015290519081900360640190fd5b600454600160a01b900460ff166125385760405162461bcd60e51b815260040180806020018281038252602381526020018061449d6023913960400191505060405180910390fd5b6001600160a01b03821660009081526006602090815260408083203384529091529020548061259d576040805162461bcd60e51b815260206004820152600c60248201526b455343524f575f454d50545960a01b604482015290519081900360640190fd5b6001600160a01b03831660009081526006602090815260408083203380855292528220919091556125d090849083612ec8565b604080518281526001600160a01b0385166020820152338183015290517f7e5dd3919ea79fc8c93a49edf5656ab20f89df3e419fde48c90a90765f7605a69181900360600190a15050600160005550565b6002546001600160a01b031690565b612638612bf8565b6001600160a01b03166126496119bf565b6001600160a01b031614612692576040805162461bcd60e51b81526020600482018190526024820152600080516020614561833981519152604482015290519081900360640190fd5b6001600160a01b0381166126d75760405162461bcd60e51b81526004018080602001828103825260268152602001806144776026913960400191505060405180910390fd5b6001546040516001600160a01b0380841692169060008051602061458183398151915290600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600082820183811015612779576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b6101c081015151612792906006612813565b156127a5576127a081612f1a565b612810565b6101c0810151516127b7906005612813565b806127cf57506101c0810151516127cf906004612813565b8061280257506101c0810151516127e7906002612813565b801561280257506101c081015151612800906006612813565b155b15612810576128108161316f565b50565b60ff91821691161c60019081161490565b6101c081015151612836906003612813565b1561284957612844816133af565b612872565b6101c08101515161285b906002612813565b156128695761284481613867565b61287281613ae9565b6101c081015151612884906006612813565b8061289c57506101c08101515161289c906002612813565b156128af576128aa81613cbd565b6128b8565b6128b881613e92565b60025460208201516040805163ebba1b2960e01b81526004810192909252516001600160a01b039092169163ebba1b299160248082019260009290919082900301818387803b15801561290a57600080fd5b505af115801561291e573d6000803e3d6000fd5b5050505050565b6001600160a01b038416612976576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600083116129a5576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b60ff8216600114806129ba575060ff82166003145b15612a09576129d26001600160a01b03851684612d55565b604080513381526001600160a01b038616602082015280820185905290516000805160206144c08339815191529181900360600190a15b60ff821660021480612a1e575060ff82166004145b15612aa85760025460408051639a751bbd60e01b81526004810184905290516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015612a6f57600080fd5b505afa158015612a83573d6000803e3d6000fd5b505050506040513d6020811015612a9957600080fd5b5051905061291e818686612ec8565b50505050565b6001600160a01b038416612aff576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60008311612b2e576040805162461bcd60e51b8152602060048201526000602482015290519081900360640190fd5b60ff821660011480612b43575060ff82166002145b15612b9257612b5b6001600160a01b03851684612d55565b604080513381526001600160a01b038616602082015280820185905290516000805160206144c08339815191529181900360600190a15b60ff821660031480612ba7575060ff82166004145b15612aa8576002546040805163e875a61360e01b81526004810184905290516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015612a6f57600080fd5b3390565b612c046116de565b612c4c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612c82612bf8565b604080516001600160a01b039092168252519081900360200190a1565b600082612cae57506000610755565b82820282848281612cbb57fe5b04146127795760405162461bcd60e51b81526004018080602001828103825260218152602001806145406021913960400191505060405180910390fd5b600082821115612d4f576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b80471015612daa576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114612df5576040519150601f19603f3d011682016040523d82523d6000602084013e612dfa565b606091505b5050905080612e3a5760405162461bcd60e51b815260040180806020018281038252603a8152602001806144e0603a913960400191505060405180910390fd5b505050565b612e476116de565b15612e8c576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c82612bf8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612e3a908490614066565b6101a081015160ff1660011480612f3957506101a081015160ff166002145b15612f8757608081015160608201516001600160a01b0316600090815260056020526040902054612f6991612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff1660031480612fa657506101a081015160ff166004145b156130915760025481516040805163e875a61360e01b81526004810192909252516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b158015612ff957600080fd5b505afa15801561300d573d6000803e3d6000fd5b505050506040513d602081101561302357600080fd5b505160808301516001600160a01b0380831660009081526006602090815260408083206060890151909416835292905220549192506130629190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60808101516101208201516130a591612721565b610120820152600254602082015160408051633aaa4a8b60e11b81526004810192909252516001600160a01b039092169163755495169160248082019260009290919082900301818387803b1580156130fd57600080fd5b505af1158015613111573d6000803e3d6000fd5b5050505080602001516000805160206145a183398151915282604001518360800151600060405180846001600160a01b0316815260200183815260200182600281111561315a57fe5b8152602001935050505060405180910390a250565b6101a081015160ff166001148061318e57506101a081015160ff166002145b156131dc57608081015160608201516001600160a01b03166000908152600560205260409020546131be91612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff16600314806131fb57506101a081015160ff166004145b156132e65760025481516040805163e875a61360e01b81526004810192909252516000926001600160a01b03169163e875a613916024808301926020929190829003018186803b15801561324e57600080fd5b505afa158015613262573d6000803e3d6000fd5b505050506040513d602081101561327857600080fd5b505160808301516001600160a01b0380831660009081526006602090815260408083206060890151909416835292905220549192506132b79190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60808101516101608201516132fa91612721565b610160820152600254602082015160408051633aaa4a8b60e11b81526004810192909252516001600160a01b039092169163755495169160248082019260009290919082900301818387803b15801561335257600080fd5b505af1158015613366573d6000803e3d6000fd5b5050505080602001516000805160206145a183398151915282606001518360800151600060405180846001600160a01b0316815260200183815260200182600281111561315a57fe5b6101c0810151516133c1906002612813565b156136b9576101a081015160ff16600114806133e557506101a081015160ff166003145b1561342f5760a08101516040808301516001600160a01b031660009081526005602052205461341391612cf8565b6040808301516001600160a01b03166000908152600560205220555b6101a081015160ff166002148061344e57506101a081015160ff166004145b1561353757600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b1580156134a157600080fd5b505afa1580156134b5573d6000803e3d6000fd5b505050506040513d60208110156134cb57600080fd5b505160a08301516001600160a01b03808316600090815260066020908152604080832081890151909416835292905220549192506135099190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a081015160009061354a906002614117565b61018083015190915061355d9082612721565b61018083015261357d613571826002614117565b61014084015190612721565b6101408301526135b56135a9613594836002614117565b60a08501516135a39085612cf8565b90612cf8565b61010084015190612721565b610100830152602080830151606080850151604080516001600160a01b039092168252938101859052600181850152925191926000805160206145a1833981519152929081900390910190a2602082015160408301516000805160206145a183398151915290613626846002614117565b604080516001600160a01b039390931683526020830191909152600182820152519081900360600190a281602001516000805160206145a183398151915261366c6119bf565b61368961367a856002614117565b60a08701516135a39087612cf8565b604080516001600160a01b039390931683526020830191909152600182820152519081900360600190a250612810565b6101a081015160ff16600114806136d857506101a081015160ff166003145b156137265760a08101516040808301516001600160a01b031660009081526005602052205461370691612cf8565b6040808301516001600160a01b031660009081526005602052205561380a565b600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b15801561377457600080fd5b505afa158015613788573d6000803e3d6000fd5b505050506040513d602081101561379e57600080fd5b505160a08301516001600160a01b03808316600090815260066020908152604080832081890151909416835292905220549192506137dc9190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a081015161010082015161381e91612721565b61010082015260208101516000805160206145a18339815191526138406119bf565b60a0840151604080516001600160a01b03841681526020810183905260019181018261315a565b6101a081015160ff166001148061388657506101a081015160ff166003145b156138d05760a08101516040808301516001600160a01b03166000908152600560205220546138b491612cf8565b6040808301516001600160a01b03166000908152600560205220555b6101a081015160ff16600214806138ef57506101a081015160ff166004145b156139d857600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b15801561394257600080fd5b505afa158015613956573d6000803e3d6000fd5b505050506040513d602081101561396c57600080fd5b505160a08301516001600160a01b03808316600090815260066020908152604080832081890151909416835292905220549192506139aa9190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a08101516139f8906139ec906002614117565b61014083015190612721565b61014082015260a0810151613a2d90613a2190613a16906002614117565b60a084015190612cf8565b61018083015190612721565b6101808201526020810151604082015160a08301516000805160206145a18339815191529190613a5e906002614117565b604080516001600160a01b039390931683526020830191909152600182820152519081900360600190a280602001516000805160206145a18339815191528260600151613ac7613abc60028660a0015161411790919063ffffffff16565b60a086015190612cf8565b604080516001600160a01b03841681526020810183905260019181018261315a565b6101a081015160ff1660011480613b0857506101a081015160ff166003145b15613b525760a08101516040808301516001600160a01b0316600090815260056020522054613b3691612cf8565b6040808301516001600160a01b03166000908152600560205220555b6101a081015160ff1660021480613b7157506101a081015160ff166004145b15613c5a57600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015613bc457600080fd5b505afa158015613bd8573d6000803e3d6000fd5b505050506040513d6020811015613bee57600080fd5b505160a08301516001600160a01b0380831660009081526006602090815260408083208189015190941683529290522054919250613c2c9190612cf8565b6001600160a01b03918216600090815260066020908152604080832086820151909516835293905291909120555b60a0810151610140820151613c6e91612721565b8161014001818152505080602001516000805160206145a183398151915282604001518360a00151600160405180846001600160a01b0316815260200183815260200182600281111561315a57fe5b6101a081015160ff1660011480613cdc57506101a081015160ff166003145b15613d2a5760c081015160608201516001600160a01b0316600090815260056020526040902054613d0c91612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff1660021480613d4957506101a081015160ff166004145b15613e3457600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015613d9c57600080fd5b505afa158015613db0573d6000803e3d6000fd5b505050506040513d6020811015613dc657600080fd5b505160c08301516001600160a01b038083166000908152600660209081526040808320606089015190941683529290522054919250613e059190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60c0810151610180820151613e4891612721565b610180820152602080820151606083015160c0840151604080516001600160a01b038416815294850182905292936000805160206145a1833981519152936002919081018261315a565b6101a081015160ff1660011480613eb157506101a081015160ff166003145b15613eff5760c081015160608201516001600160a01b0316600090815260056020526040902054613ee191612cf8565b60608201516001600160a01b03166000908152600560205260409020555b6101a081015160ff1660021480613f1e57506101a081015160ff166004145b1561400957600254815160408051639a751bbd60e01b81526004810192909252516000926001600160a01b031691639a751bbd916024808301926020929190829003018186803b158015613f7157600080fd5b505afa158015613f85573d6000803e3d6000fd5b505050506040513d6020811015613f9b57600080fd5b505160c08301516001600160a01b038083166000908152600660209081526040808320606089015190941683529290522054919250613fda9190612cf8565b6001600160a01b0391821660009081526006602090815260408083206060870151909516835293905291909120555b60c081015161010082015161401d91612721565b61010082015260208101516000805160206145a183398151915261403f6119bf565b60c0840151604080516001600160a01b03841681526020810183905260029181018261315a565b60606140bb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661417b9092919063ffffffff16565b805190915015612e3a578080602001905160208110156140da57600080fd5b5051612e3a5760405162461bcd60e51b815260040180806020018281038252602a8152602001806145c1602a913960400191505060405180910390fd5b600080821161416a576040805162461bcd60e51b815260206004820152601a602482015279536166654d6174683a206469766973696f6e206279207a65726f60301b604482015290519081900360640190fd5b81838161417357fe5b049392505050565b606061418a8484600085614192565b949350505050565b6060824710156141d35760405162461bcd60e51b815260040180806020018281038252602681526020018061451a6026913960400191505060405180910390fd5b6141dc856142ee565b61422d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061426c5780518252601f19909201916020918201910161424d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146142ce576040519150601f19603f3d011682016040523d82523d6000602084013e6142d3565b606091505b50915091506142e38282866142f4565b979650505050505050565b3b151590565b60608315614303575081612779565b8251156143135782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561435d578181015183820152602001614345565b50505050905090810190601f16801561438a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604051806101e00160405280600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600060ff168152602001614423614428565b905290565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e657220646964206e6f7420616c6c6f77206d616e75616c2077697468647261770ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0e6e743e535fe193128a1e1839b7c1f313bb203d9cbb58e4c955d5e9a8a8f0fc25361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122055374aac872f3dbfe21c18a44aff888d193c3a6a0e03f64c2bb41732b4b99e5d64736f6c63430007010033", + "sourceMap": "789:41200:1:-:0;;;3124:117;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3124:117:1;1637:1:30;1743:7;:22;;;887:12:22;:10;:12::i;:::-;909:6;:18;;-1:-1:-1;;;;;;909:18:22;-1:-1:-1;;;;;909:18:22;;;;;;;;942:43;;909:18;;-1:-1:-1;909:18:22;-1:-1:-1;;942:43:22;;-1:-1:-1;;942:43:22;-1:-1:-1;918:7:29;:15;;-1:-1:-1;;;;918:15:29;;;;;;3171:13:1;:30;;-1:-1:-1;;;;;;3171:30:1;-1:-1:-1;;;;;3171:30:1;;;;;;;;;;;3212:13;:21;;;;;;;789:41200;;598:104:27;685:10;598:104;:::o;789:41200:1:-;;;;;;;", + "deployedSourceMap": "789:41200:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39933:18;;-1:-1:-1;;;;;39933:18:1;39919:10;:32;39911:58;;;;;-1:-1:-1;;;39911:58:1;;;;;;;;;;;;-1:-1:-1;;;39911:58:1;;;;;;;;;;;;;;;789:41200;;;;;33768:251;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;33768:251:1;;;;;;;;;;;;;;;;;:::i;33261:194::-;;;;;;;;;;;;;;;;-1:-1:-1;33261:194:1;-1:-1:-1;;;;;33261:194:1;;:::i;41783:203::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;41783:203:1;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;6057:3763;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6057:3763:1;;:::i;4138:154::-;;;;;;;;;;;;;:::i;3662:81::-;;;;;;;;;;;;;:::i;27457:1361::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27457:1361:1;;;;;;;;;;;-1:-1:-1;;;;;27457:1361:1;;:::i;38012:1769::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;38012:1769:1;;;;;;;;;;;;;;;;;;;;;;:::i;41079:106::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1035:84:29;;;;;;;;;;;;;:::i;1700:145:22:-;;;;;;;;;;;;;:::i;4483:371:1:-;;;;;;;;;;;;;:::i;3423:77::-;;;;;;;;;;;;;:::i;1068:85:22:-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1068:85:22;;;;;;;;;;;;;;40480:162:1;;;;;;;;;;;;;:::i;34366:3211::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34366:3211:1;;;;;;;;;;;;;;;;;:::i;3868:100::-;;;;;;;;;;;;;:::i;32617:437::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32617:437:1;-1:-1:-1;;;;;32617:437:1;;:::i;32032:415::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32032:415:1;-1:-1:-1;;;;;32032:415:1;;:::i;40776:168::-;;;;;;;;;;;;;:::i;41373:167::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41373:167:1;-1:-1:-1;;;;;41373:167:1;;:::i;5148:513::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5148:513:1;-1:-1:-1;;;;;5148:513:1;;:::i;40189:159::-;;;;;;;;;;;;;:::i;1994:240:22:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1994:240:22;-1:-1:-1;;;;;1994:240:22;;:::i;33768:251:1:-;2404:18;;-1:-1:-1;;;;;2404:18:1;2396:59;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;;;;2579:18;;-1:-1:-1;;;;;2579:18:1;2565:10;:32;2557:60;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;33965:20:1;;::::1;;::::0;;;:12:::1;:20;::::0;;;;;;;:30;;::::1;::::0;;;;;;;:46:::1;::::0;34000:10;33965:34:::1;:46::i;:::-;-1:-1:-1::0;;;;;33931:20:1;;::::1;;::::0;;;:12:::1;:20;::::0;;;;;;;:30;;;::::1;::::0;;;;;;;;;;:80;;;;-1:-1:-1;33768:251:1:o;33261:194::-;2404:18;;-1:-1:-1;;;;;2404:18:1;2396:59;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;;;;2579:18;;-1:-1:-1;;;;;2579:18:1;2565:10;:32;2557:60;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;33416:16:1;::::1;;::::0;;;:6:::1;:16;::::0;;;;;:31:::1;::::0;33437:9:::1;33416:20;:31::i;:::-;-1:-1:-1::0;;;;;33397:16:1;;::::1;;::::0;;;:6:::1;:16;::::0;;;;:50;33261:194::o;41783:203::-;-1:-1:-1;;;;;41948:20:1;;;41916:7;41948:20;;;:12;:20;;;;;;;;:30;;;;;;;;;;41783:203;;;;;:::o;6057:3763::-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;::::1;;6197:36:1::2;;:::i;:::-;6254:20:::0;6246:47:::2;;;::::0;;-1:-1:-1;;;6246:47:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;6246:47:1;;;;;;;;;;;;;::::2;;6396:29;::::0;;::::2;:47:::0;;;6500:13:::2;::::0;6485:97:::2;::::0;;-1:-1:-1;;;6485:97:1;;::::2;::::0;::::2;::::0;;;;;-1:-1:-1;;;;;6500:13:1;;::::2;::::0;6485:66:::2;::::0;:97;;;;;;;;;;6500:13;6485:97;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;6485:97:1;6454:128;;;6639:13:::2;::::0;6624:97:::2;::::0;;-1:-1:-1;;;6624:97:1;;::::2;::::0;::::2;::::0;;;;;-1:-1:-1;;;;;6639:13:1;;::::2;::::0;6624:67:::2;::::0;:97;;;;;6485::::2;::::0;6624;;;;;;;6639:13;6624:97;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;6624:97:1;6593:128:::2;;:28;::::0;::::2;:128:::0;;;6756:32;;;;:86:::2;;;6841:1;6809:14;:28;;;:33;;;;6756:86;6734:158;;;::::0;;-1:-1:-1;;;6734:158:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;6734:158:1;;;;;;;;;;;;;::::2;;7114:13;::::0;7160:29:::2;::::0;::::2;::::0;7099:101:::2;::::0;;-1:-1:-1;;;7099:101:1;;::::2;::::0;::::2;::::0;;;;;-1:-1:-1;;;;;7114:13:1;;::::2;::::0;7099:46:::2;::::0;:101;;;;;::::2;::::0;;;;;;;;;7114:13;7099:101;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7099:101:1;;::::2;::::0;;::::2;::::0;;;;;;6920:25:::2;::::0;::::2;::::0;6905:295;::::2;;7025:44:::0;;::::2;6905:295:::0;;::::2;;6967:43:::0;;::::2;6905:295:::0;;;;::::2;::::0;;::::2;::::0;;7355:13:::2;::::0;7398:28;;7340:97;;-1:-1:-1;;;7340:97:1;;::::2;::::0;::::2;::::0;;;;;;-1:-1:-1;;;;;7355:13:1;;::::2;::::0;7340:43:::2;::::0;:97;;;;;7099:101;;7340:97;;;;;;;7355:13;7340:97;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7340:97:1;;::::2;::::0;;::::2;::::0;;;;;;7302:24:::2;::::0;::::2;7213:224:::0;7263:24:::2;::::0;::::2;7213:224:::0;7228:20:::2;::::0;::::2;7213:224:::0;;;;7511:13:::2;::::0;7560:28;;7496:107;;-1:-1:-1;;;7496:107:1;;::::2;::::0;::::2;::::0;;;;;;-1:-1:-1;;;;;7511:13:1;;::::2;::::0;7496:45:::2;::::0;:107;;;;;7340:97;;7496:107;;;;;7511:13;7496:107;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7496:107:1;-1:-1:-1;;;;;7450:164:1;;::::2;:21;::::0;;::::2;:164:::0;;;;7686:13:::2;::::0;7496:107:::2;7736:29:::0;;::::2;::::0;7671:109;;-1:-1:-1;;;7671:109:1;;::::2;::::0;::::2;::::0;;;;;;7686:13;;;::::2;::::0;7671:46:::2;::::0;:109;;;;;;;;;;;7686:13;7671:109;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7671:109:1;-1:-1:-1;;;;;7625:166:1::2;:21;::::0;::::2;:166:::0;7939:25:::2;::::0;::::2;::::0;7671:109:::2;7939:43;::::0;7934:108:::2;;7999:31;8015:14;7999:15;:31::i;:::-;8161:14;:25;;;:44;;;8160:45;:115;;;;-1:-1:-1::0;8231:25:1::2;::::0;::::2;::::0;:32;8222:53:::2;::::0;532:1:5::2;8222:8:1;:53::i;:::-;8142:203;;;8302:31;8318:14;8302:15;:31::i;:::-;8361:27;::::0;::::2;::::0;:31;8357:262:::2;;8409:198;8445:7;:5;:7::i;:::-;8471:27;::::0;::::2;::::0;8517:28:::2;::::0;::::2;::::0;8564;;8409:17:::2;:198::i;:::-;8635:27;::::0;::::2;::::0;:31;8631:276:::2;;8683:212;8719:14;:21;;;8759:14;:27;;;8805:14;:28;;;8852:14;:28;;;8683:17;:212::i;:::-;8923:29;::::0;::::2;::::0;:33;8919:280:::2;;8973:214;9009:14;:21;;;9049:14;:29;;;9097:14;:28;;;9144:14;:28;;;8973:17;:214::i;:::-;9215:27;::::0;::::2;::::0;:31;9211:276:::2;;9263:212;9299:14;:21;;;9339:14;:27;;;9385:14;:28;;;9432:14;:28;;;9263:17;:212::i;:::-;9503:29;::::0;::::2;::::0;:33;9499:280:::2;;9553:214;9589:14;:21;;;9629:14;:29;;;9677:14;:28;;;9724:14;:28;;;9553:17;:214::i;:::-;9791:21;;:::i;:::-;-1:-1:-1::0;;1637:1:30;2563:7;:22;-1:-1:-1;6057:3763:1:o;4138:154::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1614:8:29::1;:6;:8::i;:::-;1606:41;;;::::0;;-1:-1:-1;;;1606:41:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;::::1;;4207:13:1::2;:20:::0;;-1:-1:-1;;;;4207:20:1::2;-1:-1:-1::0;;;4207:20:1;;::::2;::::0;;;;4238:46:::2;::::0;;4258:13;;;::::2;4207:20;4258:13;4238:46;;::::0;;4273:10:::2;4238:46;::::0;::::2;::::0;;;::::2;::::0;;;;;;;;;::::2;4138:154::o:0;3662:81::-;2404:18;;-1:-1:-1;;;;;2404:18:1;2396:59;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;;;;2579:18;;-1:-1:-1;;;;;2579:18:1;2565:10;:32;2557:60;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;;;;3725:10:::1;:8;:10::i;:::-;3662:81::o:0;27457:1361::-;1680:1:30;2260:7;;:19;;2252:63;;;;;-1:-1:-1;;;2252:63:30;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;;;1680:1;2390:7;:18;2404::1::1;::::0;-1:-1:-1;;;;;2404:18:1::1;2396:59;;;::::0;;-1:-1:-1;;;2396:59:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;;::::1;;2579:18;::::0;-1:-1:-1;;;;;2579:18:1::1;2565:10;:32;2557:60;;;::::0;;-1:-1:-1;;;2557:60:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;;::::1;;27694:13:::2;::::0;27679:62:::2;::::0;;-1:-1:-1;;;27679:62:1;;::::2;::::0;::::2;::::0;;;;;27648:15:::2;::::0;-1:-1:-1;;;;;27694:13:1::2;::::0;27679:46:::2;::::0;:62;;;;;::::2;::::0;;;;;;;;27694:13;27679:62;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;27679:62:1;;-1:-1:-1;27754:21:1::2;27778:23;27679:62:::0;27790:10;27778:11:::2;:23::i;:::-;27864:13;::::0;27849:101:::2;::::0;;-1:-1:-1;;;27849:101:1;;::::2;::::0;::::2;::::0;;;;;27754:47;;-1:-1:-1;27814:19:1::2;::::0;-1:-1:-1;;;;;27864:13:1;;::::2;::::0;27849:53:::2;::::0;:101;;;;;::::2;::::0;;;;;;;;;27864:13;27849:101;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;27849:101:1;;-1:-1:-1;27985:17:1::2;::::0;::::2;::::0;;;;:39:::2;;;28023:1;28006:13;:18;;;;27985:39;27963:111;;;::::0;;-1:-1:-1;;;27963:111:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;27963:111:1;;;;;;;;;;;;;::::2;;28091:23;::::0;::::2;944:1:5;28091:23:1;::::0;:50:::2;;-1:-1:-1::0;28118:23:1::2;::::0;::::2;1026:1:5;28118:23:1;28091:50;28087:141;;;-1:-1:-1::0;;;;;28179:18:1;::::2;;::::0;;;:6:::2;:18;::::0;;;;;:37:::2;::::0;28202:13;28179:22:::2;:37::i;:::-;-1:-1:-1::0;;;;;28158:18:1;::::2;;::::0;;;:6:::2;:18;::::0;;;;:58;28087:141:::2;28244:23;::::0;::::2;985:1:5;28244:23:1;::::0;:50:::2;;-1:-1:-1::0;28271:23:1::2;::::0;::::2;1067:1:5;28271:23:1;28244:50;28240:420;;;28374:13;::::0;28359:108:::2;::::0;;-1:-1:-1;;;28359:108:1;;::::2;::::0;::::2;::::0;;;;;28311:28:::2;::::0;-1:-1:-1;;;;;28374:13:1::2;::::0;28359:52:::2;::::0;:108;;;;;::::2;::::0;;;;;;;;28374:13;28359:108;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;28359:108:1;-1:-1:-1;;;;;28533:66:1;;::::2;;::::0;;;:12:::2;28359:108;28533:66:::0;;;;;;;:78;;::::2;::::0;;;;;;;28359:108;;-1:-1:-1;28533:115:1::2;::::0;28634:13;28533:100:::2;:115::i;:::-;-1:-1:-1::0;;;;;28484:34:1;;::::2;;::::0;;;:12:::2;:34;::::0;;;;;;;:46;;::::2;::::0;;;;;;;;;:164;28240:420:::2;28672:138;28704:10;28729:13;28757;28785:14;28672:17;:138::i;:::-;-1:-1:-1::0;;1637:1:30;2563:7;:22;-1:-1:-1;;;;27457:1361:1:o;38012:1769::-;3038:21;;-1:-1:-1;;;;;3038:21:1;3024:10;:35;3016:50;;;;;-1:-1:-1;;;3016:50:1;;;;;;;;;;;;-1:-1:-1;;;3016:50:1;;;;;;;;;;;;;;;38246:13:::1;::::0;38231:101:::1;::::0;;-1:-1:-1;;;38231:101:1;;::::1;::::0;::::1;::::0;;;;;38198:17:::1;::::0;-1:-1:-1;;;;;38246:13:1::1;::::0;38231:53:::1;::::0;:101;;;;;::::1;::::0;;;;;;;;38246:13;38231:101;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;38231:101:1;;-1:-1:-1;38345:17:1::1;::::0;38409:21:::1;::::0;::::1;944:1:5;38409:21:1;::::0;:46:::1;;-1:-1:-1::0;38434:21:1::1;::::0;::::1;1026:1:5;38434:21:1;38409:46;38405:428;;;38499:13;::::0;38484:94:::1;::::0;;-1:-1:-1;;;38484:94:1;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;;;;;38499:13:1;;::::1;::::0;38484:46:::1;::::0;:94;;;;;::::1;::::0;;;;;;;;;38499:13;38484:94;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;38484:94:1;;-1:-1:-1;38607:21:1::1;38484:94:::0;38621:6;38607:13:::1;:21::i;:::-;-1:-1:-1::0;;;;;38734:13:1;::::1;;::::0;;;:6:::1;:13;::::0;;;;;38593:35;;-1:-1:-1;38734:30:1::1;::::0;38593:35;38734:17:::1;:30::i;:::-;-1:-1:-1::0;;;;;38718:13:1;;::::1;;::::0;;;:6:::1;:13;::::0;;;;;:46;;;;38793:11;;::::1;::::0;;;;:28:::1;::::0;38809:11;38793:15:::1;:28::i;:::-;-1:-1:-1::0;;;;;38779:11:1;::::1;;::::0;;;:6:::1;:11;::::0;;;;:42;38405:428:::1;38849:21;::::0;::::1;985:1:5;38849:21:1;::::0;:46:::1;;-1:-1:-1::0;38874:21:1::1;::::0;::::1;1067:1:5;38874:21:1;38849:46;38845:730;;;38974:13;::::0;38959:108:::1;::::0;;-1:-1:-1;;;38959:108:1;;::::1;::::0;::::1;::::0;;;;;38912:27:::1;::::0;-1:-1:-1;;;;;38974:13:1::1;::::0;38959:52:::1;::::0;:108;;;;;::::1;::::0;;;;;;;;38974:13;38959:108;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;38959:108:1;39111:13:::1;::::0;39096:94:::1;::::0;;-1:-1:-1;;;39096:94:1;;::::1;::::0;::::1;::::0;;;;;38959:108;;-1:-1:-1;;;;;;39111:13:1;;::::1;::::0;39096:46:::1;::::0;:94;;;;;38959:108:::1;::::0;39096:94;;;;;;;;39111:13;39096:94;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;39096:94:1;;-1:-1:-1;39219:21:1::1;39096:94:::0;39233:6;39219:13:::1;:21::i;:::-;-1:-1:-1::0;;;;;39395:33:1;;::::1;;::::0;;;:12:::1;:33;::::0;;;;;;;:40;;::::1;::::0;;;;;;;39205:35;;-1:-1:-1;39395:57:1::1;::::0;39205:35;39395:44:::1;:57::i;:::-;-1:-1:-1::0;;;;;39352:33:1;;::::1;;::::0;;;:12:::1;:33;::::0;;;;;;;:40;;::::1;::::0;;;;;;;;:100;;;;39508:38;;::::1;::::0;;;;:55:::1;::::0;39551:11;39508:42:::1;:55::i;:::-;-1:-1:-1::0;;;;;39467:33:1;;::::1;;::::0;;;:12:::1;:33;::::0;;;;;;;:38;;::::1;::::0;;;;;;;;;:96;38845:730:::1;39602:13;::::0;39587:113:::1;::::0;;-1:-1:-1;;;39587:113:1;;::::1;::::0;::::1;::::0;;;-1:-1:-1;;;;;39587:113:1;;::::1;::::0;;;;;;39602:13;;;::::1;::::0;39587:55:::1;::::0;:113;;;;;39602:13:::1;::::0;39587:113;;;;;;;39602:13;;39587:113;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;39726:18:1::1;::::0;39713:60:::1;::::0;;-1:-1:-1;;;39713:60:1;;-1:-1:-1;;;;;39713:60:1;;::::1;;::::0;::::1;::::0;;;39726:18;;;::::1;::::0;-1:-1:-1;39713:55:1::1;::::0;-1:-1:-1;39713:60:1;;;;;39726:18:::1;::::0;39713:60;;;;;;;39726:18;;39713:60;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;3107:1;;;38012:1769:::0;;;;:::o;41079:106::-;41164:13;;-1:-1:-1;;;41164:13:1;;;;;41079:106::o;1035:84:29:-;1105:7;;-1:-1:-1;;;1105:7:29;;;;;1035:84::o;1700:145:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1790:6:::1;::::0;1769:40:::1;::::0;1806:1:::1;::::0;-1:-1:-1;;;;;1790:6:22::1;::::0;-1:-1:-1;;;;;;;;;;;1769:40:22;1806:1;;1769:40:::1;1819:6;:19:::0;;-1:-1:-1;;;;;;1819:19:22::1;::::0;;1700:145::o;4483:371:1:-;1614:8:29;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;1680:1:30::1;2260:7;;:19;;2252:63;;;::::0;;-1:-1:-1;;;2252:63:30;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;::::1;;1680:1;2390:7;:18:::0;4568:13:1::2;::::0;-1:-1:-1;;;4568:13:1;::::2;;;4560:61;;;;-1:-1:-1::0;;;4560:61:1::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4658:10;4634:14;4651:18:::0;;;:6:::2;:18;::::0;;;;;4690:10;4682:35:::2;;;::::0;;-1:-1:-1;;;4682:35:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;4682:35:1;;;;;;;;;;;;;::::2;;4735:10;4749:1;4728:18:::0;;;:6:::2;:18;::::0;;;;:22;4761:28:::2;::::0;4782:6;4761:20:::2;:28::i;:::-;4802:44;::::0;;;;;4835:10:::2;4802:44;::::0;::::2;::::0;;;::::2;::::0;;;;;;;;;::::2;-1:-1:-1::0;1637:1:30::1;2563:7;:22:::0;4483:371:1:o;3423:77::-;2404:18;;-1:-1:-1;;;;;2404:18:1;2396:59;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;-1:-1:-1;;;2396:59:1;;;;;;;;;;;;;;;2579:18;;-1:-1:-1;;;;;2579:18:1;2565:10;:32;2557:60;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;-1:-1:-1;;;2557:60:1;;;;;;;;;;;;;;;3484:8:::1;:6;:8::i;1068:85:22:-:0;1140:6;;-1:-1:-1;;;;;1140:6:22;1068:85;:::o;40480:162:1:-;40616:18;;-1:-1:-1;;;;;40616:18:1;40480:162;:::o;34366:3211::-;3038:21;;-1:-1:-1;;;;;3038:21:1;3024:10;:35;3016:50;;;;;-1:-1:-1;;;3016:50:1;;;;;;;;;;;;-1:-1:-1;;;3016:50:1;;;;;;;;;;;;;;;34612:13:::1;::::0;34597:101:::1;::::0;;-1:-1:-1;;;34597:101:1;;::::1;::::0;::::1;::::0;;;;;34527:20:::1;::::0;;;-1:-1:-1;;;;;34612:13:1;;::::1;::::0;34597:52:::1;::::0;:101;;;;;::::1;::::0;;;;;;;;;34612:13;34597:101;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;34597:101:1;34759:13:::1;::::0;34744:100:::1;::::0;;-1:-1:-1;;;34744:100:1;;::::1;::::0;::::1;::::0;;;;;34597:101;;-1:-1:-1;34711:17:1::1;::::0;-1:-1:-1;;;;;34759:13:1;;::::1;::::0;34744:53:::1;::::0;:100;;;;;34597:101:::1;::::0;34744:100;;;;;;;;34759:13;34744:100;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;34744:100:1;34922:13:::1;::::0;34907:63:::1;::::0;;-1:-1:-1;;;34907:63:1;;::::1;::::0;::::1;::::0;;;;;34744:100;;-1:-1:-1;34858:13:1::1;::::0;;;-1:-1:-1;;;;;34922:13:1::1;::::0;34907:48:::1;::::0;:63;;;;;;;;;;;34922:13;34907:63;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;34907:63:1;;::::1;::::0;;::::1;::::0;;;-1:-1:-1;34907:63:1;-1:-1:-1;34987:21:1::1;::::0;::::1;944:1:5;34987:21:1;34983:289;;;35025:19;35047:20;:5:::0;35057:9;35047::::1;:20::i;:::-;-1:-1:-1::0;;;;;35173:13:1;::::1;;::::0;;;:6:::1;:13;::::0;;;;;35025:42;;-1:-1:-1;35173:30:1::1;::::0;35025:42;35173:17:::1;:30::i;:::-;-1:-1:-1::0;;;;;35157:13:1;;::::1;;::::0;;;:6:::1;:13;::::0;;;;;:46;;;;35232:11;;::::1;::::0;;;;:28:::1;::::0;35248:11;35232:15:::1;:28::i;:::-;-1:-1:-1::0;;;;;35218:11:1;::::1;;::::0;;;:6:::1;:11;::::0;;;;:42;-1:-1:-1;34983:289:1::1;35290:21;::::0;::::1;985:1:5;35290:21:1;35286:652;;;-1:-1:-1::0;;;;;35427:13:1;::::1;;::::0;;;:6:::1;:13;::::0;;;;;:24:::1;::::0;35445:5;35427:17:::1;:24::i;:::-;-1:-1:-1::0;;;;;35411:13:1;;::::1;;::::0;;;:6:::1;:13;::::0;;;;;:40;;;;35480:11;;::::1;::::0;;;;:22:::1;::::0;35496:5;35480:15:::1;:22::i;:::-;-1:-1:-1::0;;;;;35466:11:1;;::::1;;::::0;;;:6:::1;:11;::::0;;;;;;;;:36;;;;35549:13:::1;::::0;35534:99;;-1:-1:-1;;;35534:99:1;;::::1;::::0;::::1;::::0;;;;;35549:13;::::1;::::0;35534:52:::1;::::0;:99;;;;;;;;;;35549:13;35534:99;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;35534:99:1;-1:-1:-1;;;;;35781:26:1;;::::1;;::::0;;;:12:::1;35534:99;35781:26:::0;;;;;;;:33;;::::1;::::0;;;;;;;35534:99;;-1:-1:-1;35781:48:1::1;::::0;35819:9;35781:37:::1;:48::i;:::-;-1:-1:-1::0;;;;;35745:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:33;;::::1;::::0;;;;;;;;:84;;;;35878:31;;::::1;::::0;;;;:46:::1;::::0;35914:9;35878:35:::1;:46::i;:::-;-1:-1:-1::0;;;;;35844:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:31;;::::1;::::0;;;;;;:80;35286:652:::1;35954:21;::::0;::::1;1026:1:5;35954:21:1;35950:657;;;36022:13;::::0;36007:97:::1;::::0;;-1:-1:-1;;;36007:97:1;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;;;;;36022:13:1;;::::1;::::0;36007:50:::1;::::0;:97;;;;;::::1;::::0;;;;;;;;;36022:13;36007:97;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;36007:97:1;-1:-1:-1;;;;;36261:26:1;;::::1;;::::0;;;:12:::1;36007:97;36261:26:::0;;;;;;;:33;;::::1;::::0;;;;;;;36007:97;;-1:-1:-1;36261:44:1::1;::::0;36299:5;36261:37:::1;:44::i;:::-;-1:-1:-1::0;;;;;36225:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:33;;::::1;::::0;;;;;;;;:80;;;;36354:31;;::::1;::::0;;;;:42:::1;::::0;36390:5;36354:35:::1;:42::i;:::-;-1:-1:-1::0;;;;;36320:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:31;;::::1;::::0;;;;;;;:76;;;;36512:13;;::::1;::::0;;:6:::1;:13:::0;;;;;:28:::1;::::0;36530:9;36512:17:::1;:28::i;:::-;-1:-1:-1::0;;;;;36496:13:1;;::::1;;::::0;;;:6:::1;:13;::::0;;;;;:44;;;;36569:11;;::::1;::::0;;;;:26:::1;::::0;36585:9;36569:15:::1;:26::i;:::-;-1:-1:-1::0;;;;;36555:11:1;::::1;;::::0;;;:6:::1;:11;::::0;;;;:40;35950:657:::1;36623:21;::::0;::::1;1067:1:5;36623:21:1;36619:875;;;36691:13;::::0;36676:97:::1;::::0;;-1:-1:-1;;;36676:97:1;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;;;;;36691:13:1;;::::1;::::0;36676:50:::1;::::0;:97;;;;;::::1;::::0;;;;;;;;;36691:13;36676:97;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;36676:97:1;-1:-1:-1;;;;;36922:26:1;;::::1;;::::0;;;:12:::1;36676:97;36922:26:::0;;;;;;;:33;;::::1;::::0;;;;;;;36676:97;;-1:-1:-1;36922:44:1::1;::::0;36960:5;36922:37:::1;:44::i;:::-;-1:-1:-1::0;;;;;36886:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:33;;::::1;::::0;;;;;;;;:80;;;;37015:31;;::::1;::::0;;;;:42:::1;::::0;37051:5;37015:35:::1;:42::i;:::-;-1:-1:-1::0;;;;;36981:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:31;;::::1;::::0;;;;;;;;:76;;;;37104:13:::1;::::0;37089:99;;-1:-1:-1;;;37089:99:1;;::::1;::::0;::::1;::::0;;;;;37104:13;::::1;::::0;37089:52:::1;::::0;:99;;;;;;;;;;37104:13;37089:99;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;37089:99:1;-1:-1:-1;;;;;37337:26:1;;::::1;;::::0;;;:12:::1;37089:99;37337:26:::0;;;;;;;:33;;::::1;::::0;;;;;;;37089:99;;-1:-1:-1;37337:48:1::1;::::0;37375:9;37337:37:::1;:48::i;:::-;-1:-1:-1::0;;;;;37301:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:33;;::::1;::::0;;;;;;;;:84;;;;37434:31;;::::1;::::0;;;;:46:::1;::::0;37470:9;37434:35:::1;:46::i;:::-;-1:-1:-1::0;;;;;37400:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:31;;::::1;::::0;;;;;;:80;36619:875:::1;37522:18;::::0;37509:60:::1;::::0;;-1:-1:-1;;;37509:60:1;;-1:-1:-1;;;;;37509:60:1;;::::1;;::::0;::::1;::::0;;;37522:18;;;::::1;::::0;37509:55:::1;::::0;:60;;;;;37522:18:::1;::::0;37509:60;;;;;;;37522:18;;37509:60;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;3107:1;;;;;34366:3211:::0;;;:::o;3868:100::-;3947:13;;-1:-1:-1;;;3947:13:1;;;;3946:14;;3868:100::o;32617:437::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;32768:36:1;::::1;32760:68;;;::::0;;-1:-1:-1;;;32760:68:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;32760:68:1;;;;;;;;;;;;;::::1;;32929:21;:46:::0;;-1:-1:-1;;;;;;32929:46:1::1;-1:-1:-1::0;;;;;32929:46:1;::::1;::::0;;::::1;::::0;;;32991:55:::1;::::0;;;;;33035:10:::1;32991:55;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;32617:437:::0;:::o;32032:415::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;32171:33:1;::::1;32163:65;;;::::0;;-1:-1:-1;;;32163:65:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;32163:65:1;;;;;;;;;;;;;::::1;;32331:18;:40:::0;;-1:-1:-1;;;;;;32331:40:1::1;-1:-1:-1::0;;;;;32331:40:1;::::1;::::0;;::::1;::::0;;;32389:50:::1;::::0;;;;;32428:10:::1;32389:50;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;32032:415:::0;:::o;40776:168::-;40915:21;;-1:-1:-1;;;;;40915:21:1;40776:168;:::o;41373:167::-;-1:-1:-1;;;;;41516:16:1;41484:7;41516:16;;;:6;:16;;;;;;;41373:167::o;5148:513::-;1614:8:29;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;1680:1:30::1;2260:7;;:19;;2252:63;;;::::0;;-1:-1:-1;;;2252:63:30;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;;;;;;;;;2252:63:30;;;;;;;;;;;;;::::1;;1680:1;2390:7;:18:::0;5281:5:1;-1:-1:-1;;;;;2795:26:1;::::2;2787:60;;;::::0;;-1:-1:-1;;;2787:60:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;2787:60:1;;;;;;;;;;;;;::::2;;5312:13:::3;::::0;-1:-1:-1;;;5312:13:1;::::3;;;5304:61;;;;-1:-1:-1::0;;;5304:61:1::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;5395:19:1;::::3;5378:14;5395:19:::0;;;:12:::3;:19;::::0;;;;;;;5415:10:::3;5395:31:::0;;;;;;;;5445:10;5437:35:::3;;;::::0;;-1:-1:-1;;;5437:35:1;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;5437:35:1;;;;;;;;;;;;;::::3;;-1:-1:-1::0;;;;;5483:19:1;::::3;5517:1;5483:19:::0;;;:12:::3;:19;::::0;;;;;;;5503:10:::3;5483:31:::0;;;;;;;:35;;;;5531:57:::3;::::0;5496:5;;5581:6;5531:22:::3;:57::i;:::-;5599:54;::::0;;;;;-1:-1:-1;;;;;5599:54:1;::::3;;::::0;::::3;::::0;5642:10:::3;5599:54:::0;;;;;;::::3;::::0;;;;;;;::::3;-1:-1:-1::0;;1637:1:30::1;2563:7;:22:::0;-1:-1:-1;5148:513:1:o;40189:159::-;40327:13;;-1:-1:-1;;;;;40327:13:1;40189:159;:::o;1994:240:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;2082:22:22;::::1;2074:73;;;;-1:-1:-1::0;;;2074:73:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:6;::::0;2162:38:::1;::::0;-1:-1:-1;;;;;2162:38:22;;::::1;::::0;2183:6:::1;::::0;-1:-1:-1;;;;;;;;;;;2162:38:22;2183:6:::1;::::0;2162:38:::1;2210:6;:17:::0;;-1:-1:-1;;;;;;2210:17:22::1;-1:-1:-1::0;;;;;2210:17:22;;;::::1;::::0;;;::::1;::::0;;1994:240::o;2682:175:23:-;2740:7;2771:5;;;2794:6;;;;2786:46;;;;;-1:-1:-1;;;2786:46:23;;;;;;;;;;;;-1:-1:-1;;;2786:46:23;;;;;;;;;;;;;;;2849:1;2682:175;-1:-1:-1;;;2682:175:23:o;10186:595:1:-;10282:25;;;;:32;10273:54;;300:1:5;10273:8:1;:54::i;:::-;10269:505;;;10344:38;10367:14;10344:22;:38::i;:::-;10269:505;;;10427:25;;;;:32;10418:54;;345:1:5;10418:8:1;:54::i;:::-;:125;;;-1:-1:-1;10498:25:1;;;;:32;10489:54;;390:1:5;10489:8:1;:54::i;:::-;10418:280;;;-1:-1:-1;10570:25:1;;;;:32;10561:60;;488:1:5;10561:8:1;:60::i;:::-;:136;;;;-1:-1:-1;10652:25:1;;;;:32;10643:54;;300:1:5;10643:8:1;:54::i;:::-;10642:55;10561:136;10400:374;;;10725:37;10747:14;10725:21;:37::i;:::-;10186:595;:::o;3510:128:5:-;3603:15;;;;;;;210:1;3602:23;;;:28;;3510:128::o;14637:1185:1:-;14761:25;;;;:32;14752:56;;437:1:5;14752:8:1;:56::i;:::-;14748:517;;;14856:55;14896:14;14856:39;:55::i;:::-;14748:517;;;14957:25;;;;:32;14948:60;;488:1:5;14948:8:1;:60::i;:::-;14944:310;;;15064:53;15102:14;15064:37;:53::i;14944:310::-;15195:43;15223:14;15195:27;:43::i;:::-;15333:25;;;;:32;15324:54;;300:1:5;15324:8:1;:54::i;:::-;:131;;;-1:-1:-1;15404:25:1;;;;:32;15395:60;;488:1:5;15395:8:1;:60::i;:::-;15306:392;;;15515:43;15543:14;15515:27;:43::i;:::-;15306:392;;;15622:64;15671:14;15622:48;:64::i;:::-;15725:13;;15774:29;;;;15710:104;;;-1:-1:-1;;;15710:104:1;;;;;;;;;;-1:-1:-1;;;;;15725:13:1;;;;15710:49;;:104;;;;;15725:13;;15710:104;;;;;;;;15725:13;;15710:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14637:1185;:::o;30906:972::-;-1:-1:-1;;;;;31087:24:1;;31079:56;;;;;-1:-1:-1;;;31079:56:1;;;;;;;;;;;;-1:-1:-1;;;31079:56:1;;;;;;;;;;;;;;;31254:1;31244:7;:11;31236:24;;;;;-1:-1:-1;;;31236:24:1;;;;;;;;;;;;;;;;;;;;;;;31277;;;944:1:5;31277:24:1;;:52;;-1:-1:-1;31305:24:1;;;1026:1:5;31305:24:1;31277:52;31273:189;;;31346:38;-1:-1:-1;;;;;31346:29:1;;31376:7;31346:29;:38::i;:::-;31404:46;;;31418:10;31404:46;;-1:-1:-1;;;;;31404:46:1;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;31404:46:1;;;;;;;;31273:189;31478:24;;;985:1:5;31478:24:1;;:52;;-1:-1:-1;31506:24:1;;;1067:1:5;31506:24:1;31478:52;31474:397;;;31610:13;;31595:108;;;-1:-1:-1;;;31595:108:1;;;;;;;;;;31547:28;;-1:-1:-1;;;;;31610:13:1;;31595:52;;:108;;;;;;;;;;;;;;31610:13;31595:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31595:108:1;;-1:-1:-1;31720:139:1;31595:108;31808:10;31837:7;31720:22;:139::i;31474:397::-;30906:972;;;;:::o;29513:964::-;-1:-1:-1;;;;;29694:24:1;;29686:56;;;;;-1:-1:-1;;;29686:56:1;;;;;;;;;;;;-1:-1:-1;;;29686:56:1;;;;;;;;;;;;;;;29861:1;29851:7;:11;29843:24;;;;;-1:-1:-1;;;29843:24:1;;;;;;;;;;;;;;;;;;;;;;;29884;;;944:1:5;29884:24:1;;:52;;-1:-1:-1;29912:24:1;;;985:1:5;29912:24:1;29884:52;29880:189;;;29953:38;-1:-1:-1;;;;;29953:29:1;;29983:7;29953:29;:38::i;:::-;30011:46;;;30025:10;30011:46;;-1:-1:-1;;;;;30011:46:1;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;30011:46:1;;;;;;;;29880:189;30085:24;;;1026:1:5;30085:24:1;;:52;;-1:-1:-1;30113:24:1;;;1067:1:5;30113:24:1;30085:52;30081:389;;;30214:13;;30199:106;;;-1:-1:-1;;;30199:106:1;;;;;;;;;;30154:25;;-1:-1:-1;;;;;30214:13:1;;30199:50;;:106;;;;;;;;;;;;;;30214:13;30199:106;;;;;;;;;;598:104:27;685:10;598:104;:::o;2047:117:29:-;1614:8;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;2105:7:::1;:15:::0;;-1:-1:-1;;;;2105:15:29::1;::::0;;2135:22:::1;2144:12;:10;:12::i;:::-;2135:22;::::0;;-1:-1:-1;;;;;2135:22:29;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2047:117::o:0;3530:215:23:-;3588:7;3611:6;3607:20;;-1:-1:-1;3626:1:23;3619:8;;3607:20;3649:5;;;3653:1;3649;:5;:1;3672:5;;;;;:10;3664:56;;;;-1:-1:-1;;;3664:56:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3128:155;3186:7;3218:1;3213;:6;;3205:49;;;;;-1:-1:-1;;;3205:49:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3271:5:23;;;3128:155::o;2048:391:26:-;2162:6;2137:21;:31;;2129:73;;;;;-1:-1:-1;;;2129:73:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;2309:35;;2291:12;;-1:-1:-1;;;;;2309:14:26;;;2332:6;;2291:12;2309:35;2291:12;2309:35;2332:6;2309:14;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2290:54;;;2362:7;2354:78;;;;-1:-1:-1;;;2354:78:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2048:391;;;:::o;1800:115:29:-;1349:8;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;1869:4:::1;1859:14:::0;;-1:-1:-1;;;;1859:14:29::1;-1:-1:-1::0;;;1859:14:29::1;::::0;;1888:20:::1;1895:12;:10;:12::i;696:175:25:-:0;805:58;;;-1:-1:-1;;;;;805:58:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;805:58:25;-1:-1:-1;;;805:58:25;;;778:86;;798:5;;778:19;:86::i;11078:1353:1:-;11200:28;;;;:38;;944:1:5;11200:38:1;;:93;;-1:-1:-1;11255:28:1;;;;:38;;985:1:5;11255:38:1;11200:93;11182:269;;;11404:20;;;;11359:21;;;;-1:-1:-1;;;;;11352:29:1;;;;;:6;:29;;;;;;:87;;:33;:87::i;:::-;11327:21;;;;-1:-1:-1;;;;;11320:29:1;;;;;:6;:29;;;;;:119;11182:269;11479:28;;;;:38;;1026:1:5;11479:38:1;;:93;;-1:-1:-1;11534:28:1;;;;:38;;1067:1:5;11534:38:1;11479:93;11461:533;;;11659:13;;11717:28;;11644:120;;;-1:-1:-1;;;11644:120:1;;;;;;;;;;11599:25;;-1:-1:-1;;;;;11659:13:1;;11644:50;;:120;;;;;;;;;;;;;;11659:13;11644:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11644:120:1;11947:20;;;;-1:-1:-1;;;;;11870:31:1;;;;;;;:12;11644:120;11870:31;;;;;;;11902:21;;;;11870:54;;;;;;;;;;11644:120;;-1:-1:-1;11870:112:1;;:54;:58;:112::i;:::-;-1:-1:-1;;;;;11781:31:1;;;;;;;:12;:31;;;;;;;;11831:21;;;;11781:86;;;;;;;;;;;;:201;11461:533;12082:20;;;;12036:27;;;;:77;;:31;:77::i;:::-;12006:27;;;:107;12141:13;;12189:29;;;;12126:103;;;-1:-1:-1;;;12126:103:1;;;;;;;;;;-1:-1:-1;;;;;12141:13:1;;;;12126:48;;:103;;;;;12141:13;;12126:103;;;;;;;;12141:13;;12126:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12278:14;:29;;;-1:-1:-1;;;;;;;;;;;12322:14:1;:21;;;12358:14;:20;;;12393:19;12242:181;;;;-1:-1:-1;;;;;12242:181:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11078:1353;:::o;12728:1354::-;12849:28;;;;:38;;944:1:5;12849:38:1;;:93;;-1:-1:-1;12904:28:1;;;;:38;;985:1:5;12904:38:1;12849:93;12831:269;;;13053:20;;;;13008:21;;;;-1:-1:-1;;;;;13001:29:1;;;;;:6;:29;;;;;;:87;;:33;:87::i;:::-;12976:21;;;;-1:-1:-1;;;;;12969:29:1;;;;;:6;:29;;;;;:119;12831:269;13130:28;;;;:38;;1026:1:5;13130:38:1;;:93;;-1:-1:-1;13185:28:1;;;;:38;;1067:1:5;13185:38:1;13130:93;13112:533;;;13310:13;;13368:28;;13295:120;;;-1:-1:-1;;;13295:120:1;;;;;;;;;;13250:25;;-1:-1:-1;;;;;13310:13:1;;13295:50;;:120;;;;;;;;;;;;;;13310:13;13295:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13295:120:1;13598:20;;;;-1:-1:-1;;;;;13521:31:1;;;;;;;:12;13295:120;13521:31;;;;;;;13553:21;;;;13521:54;;;;;;;;;;13295:120;;-1:-1:-1;13521:112:1;;:54;:58;:112::i;:::-;-1:-1:-1;;;;;13432:31:1;;;;;;;:12;:31;;;;;;;;13482:21;;;;13432:86;;;;;;;;;;;;:201;13112:533;13733:20;;;;13687:27;;;;:77;;:31;:77::i;:::-;13657:27;;;:107;13792:13;;13840:29;;;;13777:103;;;-1:-1:-1;;;13777:103:1;;;;;;;;;;-1:-1:-1;;;;;13792:13:1;;;;13777:48;;:103;;;;;13792:13;;13777:103;;;;;;;;13792:13;;13777:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13929:14;:29;;;-1:-1:-1;;;;;;;;;;;13973:14:1;:21;;;14009:14;:20;;;14044:19;13893:181;;;;-1:-1:-1;;;;;13893:181:1;;;;;;;;;;;;;;;;;;16152:3738;16288:25;;;;:32;16279:60;;488:1:5;16279:8:1;:60::i;:::-;16275:3608;;;16425:28;;;;:38;;944:1:5;16425:38:1;;:97;;-1:-1:-1;16484:28:1;;;;:38;;1026:1:5;16484:38:1;16425:97;16403:283;;;16645:24;;;;16596:21;;;;;-1:-1:-1;;;;;16589:29:1;;;;;:6;:29;;;;:81;;:55;:81::i;:::-;16564:21;;;;;-1:-1:-1;;;;;16557:29:1;;;;;:6;:29;;;:113;16403:283;16724:28;;;;:38;;985:1:5;16724:38:1;;:97;;-1:-1:-1;16783:28:1;;;;:38;;1067:1:5;16783:38:1;16724:97;16702:582;;;16923:13;;16987:28;;16908:130;;;-1:-1:-1;;;16908:130:1;;;;;;;;;;16856:28;;-1:-1:-1;;;;;16923:13:1;;16908:52;;:130;;;;;;;;;;;;;;16923:13;16908:130;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16908:130:1;17243:24;;;;-1:-1:-1;;;;;17159:34:1;;;;;;;:12;16908:130;17159:34;;;;;;;17194:21;;;;17159:57;;;;;;;;;;16908:130;;-1:-1:-1;17159:109:1;;:57;:83;:109::i;:::-;-1:-1:-1;;;;;17059:34:1;;;;;;;:12;:34;;;;;;;;17116:21;;;;17059:97;;;;;;;;;;;;:209;16702:582;17320:24;;;;17300:17;;17320:47;;1583:1;17320:28;:47::i;:::-;17414:29;;;;17300:67;;-1:-1:-1;17414:76:1;;17300:67;17414:33;:76::i;:::-;17382:29;;;:108;17560:99;17612:32;:9;1583:1;17612:13;:32::i;:::-;17560:29;;;;;:33;:99::i;:::-;17528:29;;;:131;17730:184;17780:119;17848:32;:9;1583:1;17848:13;:32::i;:::-;17781:24;;;;:39;;17810:9;17781:28;:39::i;:::-;17780:45;;:119::i;:::-;17730:27;;;;;:31;:184::i;:::-;17700:27;;;:214;17991:29;;;;;18039:21;;;;;17951:197;;;-1:-1:-1;;;;;17951:197:1;;;;;;;;;;;18107:26;17951:197;;;;;;17991:29;;-1:-1:-1;;;;;;;;;;;17951:197:1;;;;;;;;;;18203:29;;;;18251:21;;;;-1:-1:-1;;;;;;;;;;;18163:220:1;18291:32;:9;1583:1;18291:13;:32::i;:::-;18163:220;;;-1:-1:-1;;;;;18163:220:1;;;;;;;;;;;;;18342:26;18163:220;;;;;;;;;;;;;18438:14;:29;;;-1:-1:-1;;;;;;;;;;;18486:7:1;:5;:7::i;:::-;18512:119;18580:32;:9;1583:1;18580:13;:32::i;:::-;18513:24;;;;:39;;18542:9;18513:28;:39::i;18512:119::-;18398:293;;;-1:-1:-1;;;;;18398:293:1;;;;;;;;;;;;;18650:26;18398:293;;;;;;;;;;;;;-1:-1:-1;16275:3608:1;;;18807:28;;;;:38;;944:1:5;18807:38:1;;:97;;-1:-1:-1;18866:28:1;;;;:38;;1026:1:5;18866:38:1;18807:97;18785:736;;;19027:24;;;;18978:21;;;;;-1:-1:-1;;;;;18971:29:1;;;;;:6;:29;;;;:81;;:55;:81::i;:::-;18946:21;;;;;-1:-1:-1;;;;;18939:29:1;;;;;:6;:29;;;:113;18785:736;;;19160:13;;19224:28;;19145:130;;;-1:-1:-1;;;19145:130:1;;;;;;;;;;19093:28;;-1:-1:-1;;;;;19160:13:1;;19145:52;;:130;;;;;;;;;;;;;;19160:13;19145:130;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19145:130:1;19480:24;;;;-1:-1:-1;;;;;19396:34:1;;;;;;;:12;19145:130;19396:34;;;;;;;19431:21;;;;19396:57;;;;;;;;;;19145:130;;-1:-1:-1;19396:109:1;;:57;:83;:109::i;:::-;-1:-1:-1;;;;;19296:34:1;;;;;;;:12;:34;;;;;;;;19353:21;;;;19296:97;;;;;;;;;;;;:209;18785:736;19617:24;;;;19567:27;;;;:89;;:31;:89::i;:::-;19537:27;;;:119;19713:29;;;;-1:-1:-1;;;;;;;;;;;19761:7:1;:5;:7::i;:::-;19787:24;;;;19673:198;;;-1:-1:-1;;;;;19673:198:1;;;;;;;;;;19830:26;;19673:198;;19830:26;19673:198;;20233:1843;20372:28;;;;:38;;944:1:5;20372:38:1;;:93;;-1:-1:-1;20427:28:1;;;;:38;;1026:1:5;20427:38:1;20372:93;20354:273;;;20576:24;;;;20531:21;;;;;-1:-1:-1;;;;;20524:29:1;;;;;:6;:29;;;;:91;;:33;:91::i;:::-;20499:21;;;;;-1:-1:-1;;;;;20492:29:1;;;;;:6;:29;;;:123;20354:273;20657:28;;;;:38;;985:1:5;20657:38:1;;:93;;-1:-1:-1;20712:28:1;;;;:38;;1067:1:5;20712:38:1;20657:93;20639:548;;;20840:13;;20900:28;;20825:122;;;-1:-1:-1;;;20825:122:1;;;;;;;;;;20777:28;;-1:-1:-1;;;;;20840:13:1;;20825:52;;:122;;;;;;;;;;;;;;20840:13;20825:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20825:122:1;21136:24;;;;-1:-1:-1;;;;;21056:34:1;;;;;;;:12;20825:122;21056:34;;;;;;;21091:21;;;;21056:57;;;;;;;;;;20825:122;;-1:-1:-1;21056:119:1;;:57;:61;:119::i;:::-;-1:-1:-1;;;;;20964:34:1;;;;;;;:12;:34;;;;;;;;21017:21;;;;20964:89;;;;;;;;;;;;:211;20639:548;21279:24;;;;21231:106;;21279:47;;1583:1;21279:28;:47::i;:::-;21231:29;;;;;:33;:106::i;:::-;21199:29;;;:138;21477:24;;;;21382:168;;21430:109;;21477:47;;1583:1;21477:28;:47::i;:::-;21430:24;;;;;:28;:109::i;:::-;21382:29;;;;;:33;:168::i;:::-;21350:29;;;:200;21599:29;;;;21643:21;;;;21679:24;;;;-1:-1:-1;;;;;;;;;;;21563:215:1;21643:21;21679:47;;1583:1;21679:28;:47::i;:::-;21563:215;;;-1:-1:-1;;;;;21563:215:1;;;;;;;;;;;;;21741:26;21563:215;;;;;;;;;;;;;21827:14;:29;;;-1:-1:-1;;;;;;;;;;;21871:14:1;:21;;;21907:109;21954:47;1583:1;21954:14;:24;;;:28;;:47;;;;:::i;:::-;21907:24;;;;;:28;:109::i;:::-;21791:277;;;-1:-1:-1;;;;;21791:277:1;;;;;;;;;;22031:26;;21791:277;;22031:26;21791:277;;22398:1282;22525:28;;;;:38;;944:1:5;22525:38:1;;:93;;-1:-1:-1;22580:28:1;;;;:38;;1026:1:5;22580:38:1;22525:93;22507:273;;;22729:24;;;;22684:21;;;;;-1:-1:-1;;;;;22677:29:1;;;;;:6;:29;;;;:91;;:33;:91::i;:::-;22652:21;;;;;-1:-1:-1;;;;;22645:29:1;;;;;:6;:29;;;:123;22507:273;22810:28;;;;:38;;985:1:5;22810:38:1;;:93;;-1:-1:-1;22865:28:1;;;;:38;;1067:1:5;22865:38:1;22810:93;22792:548;;;22993:13;;23053:28;;22978:122;;;-1:-1:-1;;;22978:122:1;;;;;;;;;;22930:28;;-1:-1:-1;;;;;22993:13:1;;22978:52;;:122;;;;;;;;;;;;;;22993:13;22978:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22978:122:1;23289:24;;;;-1:-1:-1;;;;;23209:34:1;;;;;;;:12;22978:122;23209:34;;;;;;;23244:21;;;;23209:57;;;;;;;;;;22978:122;;-1:-1:-1;23209:119:1;;:57;:61;:119::i;:::-;-1:-1:-1;;;;;23117:34:1;;;;;;;:12;:34;;;;;;;;23170:21;;;;23117:89;;;;;;;;;;;;:211;22792:548;23432:24;;;;23384:29;;;;:83;;:33;:83::i;:::-;23352:14;:29;;:115;;;;;23516:14;:29;;;-1:-1:-1;;;;;;;;;;;23560:14:1;:21;;;23596:14;:24;;;23635:26;23480:192;;;;-1:-1:-1;;;;;23480:192:1;;;;;;;;;;;;;;;;;;24017:1281;24144:28;;;;:38;;944:1:5;24144:38:1;;:93;;-1:-1:-1;24199:28:1;;;;:38;;1026:1:5;24199:38:1;24144:93;24126:273;;;24348:24;;;;24303:21;;;;-1:-1:-1;;;;;24296:29:1;;;;;:6;:29;;;;;;:91;;:33;:91::i;:::-;24271:21;;;;-1:-1:-1;;;;;24264:29:1;;;;;:6;:29;;;;;:123;24126:273;24429:28;;;;:38;;985:1:5;24429:38:1;;:93;;-1:-1:-1;24484:28:1;;;;:38;;1067:1:5;24484:38:1;24429:93;24411:548;;;24612:13;;24672:28;;24597:122;;;-1:-1:-1;;;24597:122:1;;;;;;;;;;24549:28;;-1:-1:-1;;;;;24612:13:1;;24597:52;;:122;;;;;;;;;;;;;;24612:13;24597:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;24597:122:1;24908:24;;;;-1:-1:-1;;;;;24828:34:1;;;;;;;:12;24597:122;24828:34;;;;;;;24863:21;;;;24828:57;;;;;;;;;;24597:122;;-1:-1:-1;24828:119:1;;:57;:61;:119::i;:::-;-1:-1:-1;;;;;24736:34:1;;;;;;;:12;:34;;;;;;;;24789:21;;;;24736:89;;;;;;;;;;;;:211;24411:548;25051:24;;;;25003:29;;;;:83;;:33;:83::i;:::-;24971:29;;;:115;25135:29;;;;;25179:21;;;;25215:24;;;;25099:191;;;-1:-1:-1;;;;;25099:191:1;;;;;;;;;;25135:29;;-1:-1:-1;;;;;;;;;;;25099:191:1;25254:25;;25099:191;;;25254:25;25099:191;;25635:1286;25785:28;;;;:38;;944:1:5;25785:38:1;;:93;;-1:-1:-1;25840:28:1;;;;:38;;1026:1:5;25840:38:1;25785:93;25767:273;;;25989:24;;;;25944:21;;;;-1:-1:-1;;;;;25937:29:1;;;;;:6;:29;;;;;;:91;;:33;:91::i;:::-;25912:21;;;;-1:-1:-1;;;;;25905:29:1;;;;;:6;:29;;;;;:123;25767:273;26070:28;;;;:38;;985:1:5;26070:38:1;;:93;;-1:-1:-1;26125:28:1;;;;:38;;1067:1:5;26125:38:1;26070:93;26052:548;;;26253:13;;26313:28;;26238:122;;;-1:-1:-1;;;26238:122:1;;;;;;;;;;26190:28;;-1:-1:-1;;;;;26253:13:1;;26238:52;;:122;;;;;;;;;;;;;;26253:13;26238:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26238:122:1;26549:24;;;;-1:-1:-1;;;;;26469:34:1;;;;;;;:12;26238:122;26469:34;;;;;;;26504:21;;;;26469:57;;;;;;;;;;26238:122;;-1:-1:-1;26469:119:1;;:57;:61;:119::i;:::-;-1:-1:-1;;;;;26377:34:1;;;;;;;:12;:34;;;;;;;;26430:21;;;;26377:89;;;;;;;;;;;;:211;26052:548;26688:24;;;;26642:27;;;;:81;;:31;:81::i;:::-;26612:27;;;:111;26772:29;;;;-1:-1:-1;;;;;;;;;;;26816:7:1;:5;:7::i;:::-;26838:24;;;;26736:177;;;-1:-1:-1;;;;;26736:177:1;;;;;;;;;;26877:25;;26736:177;;26877:25;26736:177;;2959:751:25;3378:23;3404:69;3432:4;3404:69;;;;;;;;;;;;;;;;;3412:5;-1:-1:-1;;;;;3404:27:25;;;:69;;;;;:::i;:::-;3487:17;;3378:95;;-1:-1:-1;3487:21:25;3483:221;;3627:10;3616:30;;;;;;;;;;;;;;;-1:-1:-1;3616:30:25;3608:85;;;;-1:-1:-1;;;3608:85:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4209:150:23;4267:7;4298:1;4294;:5;4286:44;;;;;-1:-1:-1;;;4286:44:23;;;;;;;;;;;;-1:-1:-1;;;4286:44:23;;;;;;;;;;;;;;;4351:1;4347;:5;;;;;;;4209:150;-1:-1:-1;;;4209:150:23:o;3573:193:26:-;3676:12;3707:52;3729:6;3737:4;3743:1;3746:12;3707:21;:52::i;:::-;3700:59;3573:193;-1:-1:-1;;;;3573:193:26:o;4600:523::-;4727:12;4784:5;4759:21;:30;;4751:81;;;;-1:-1:-1;;;4751:81:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4850:18;4861:6;4850:10;:18::i;:::-;4842:60;;;;;-1:-1:-1;;;4842:60:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;4973:12;4987:23;5014:6;-1:-1:-1;;;;;5014:11:26;5034:5;5042:4;5014:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5014:33:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4972:75;;;;5064:52;5082:7;5091:10;5103:12;5064:17;:52::i;:::-;5057:59;4600:523;-1:-1:-1;;;;;;;4600:523:26:o;718:413::-;1078:20;1116:8;;;718:413::o;7083:725::-;7198:12;7226:7;7222:580;;;-1:-1:-1;7256:10:26;7249:17;;7222:580;7367:17;;:21;7363:429;;7625:10;7619:17;7685:15;7672:10;7668:2;7664:19;7657:44;7574:145;7764:12;7757:20;;-1:-1:-1;;;7757:20:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./interfaces/ICashier.sol\";\r\nimport \"./interfaces/IBosonRouter.sol\";\r\nimport \"./UsingHelpers.sol\";\r\n\r\n/**\r\n * @title Contract for managing funds\r\n * Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/\r\n */\r\ncontract Cashier is ICashier, UsingHelpers, ReentrancyGuard, Ownable, Pausable {\r\n using SafeERC20 for IERC20;\r\n using Address for address payable;\r\n using SafeMath for uint256;\r\n\r\n address private voucherKernel;\r\n address private bosonRouterAddress;\r\n address private tokensContractAddress;\r\n bool private disasterState;\r\n\r\n enum PaymentType {PAYMENT, DEPOSIT_SELLER, DEPOSIT_BUYER}\r\n\r\n mapping(address => uint256) private escrow; // both types of deposits AND payments >> can be released token-by-token if checks pass\r\n // slashedDepositPool can be obtained through getEscrowAmount(poolAddress)\r\n mapping(address => mapping(address => uint256)) private escrowTokens; //token address => mgsSender => amount\r\n\r\n uint256 internal constant CANCELFAULT_SPLIT = 2; //for POC purposes, this is hardcoded; e.g. each party gets depositSe / 2\r\n\r\n event LogBosonRouterSet(address _newBosonRouter, address _triggeredBy);\r\n\r\n event LogTokenContractSet(address _newTokenContract, address _triggeredBy);\r\n\r\n event LogWithdrawal(address _caller, address _payee, uint256 _payment);\r\n\r\n event LogAmountDistribution(\r\n uint256 indexed _tokenIdVoucher,\r\n address _to,\r\n uint256 _payment,\r\n PaymentType _type\r\n );\r\n\r\n event LogDisasterStateSet(bool _disasterState, address _triggeredBy);\r\n event LogWithdrawEthOnDisaster(uint256 _amount, address _triggeredBy);\r\n event LogWithdrawTokensOnDisaster(\r\n uint256 _amount,\r\n address _tokenAddress,\r\n address _triggeredBy\r\n );\r\n\r\n modifier onlyFromRouter() {\r\n require(bosonRouterAddress != address(0), \"UNSPECIFIED_BR\"); // hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == bosonRouterAddress, \"UNAUTHORIZED_BR\"); // hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier notZeroAddress(address tokenAddress) {\r\n require(tokenAddress != address(0), \"INVALID_TOKEN_ADDRESS\");\r\n _;\r\n }\r\n\r\n /**\r\n * @notice The only caller must be tokensContractAddress, otherwise reverts.\r\n */\r\n modifier onlyTokensContract() {\r\n require(msg.sender == tokensContractAddress, \"UT\"); // Unauthorized token address\r\n _;\r\n }\r\n\r\n constructor(address _voucherKernel) {\r\n voucherKernel = _voucherKernel;\r\n disasterState = false;\r\n }\r\n\r\n /**\r\n * @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\r\n * Only BR contract is in control of this function.\r\n */\r\n function pause() external override onlyFromRouter {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @notice Unpause the process of interaction with voucherID's (ERC-721).\r\n * Only BR contract is in control of this function.\r\n */\r\n function unpause() external override onlyFromRouter {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @notice If once disaster state has been set to true, the contract could never be unpaused.\r\n */\r\n function canUnpause() external view override returns (bool) {\r\n return !disasterState;\r\n }\r\n\r\n /**\r\n * @notice Once this functions is triggered, contracts cannot be unpaused anymore\r\n * Only BR contract is in control of this function.\r\n */\r\n function setDisasterState() external onlyOwner whenPaused {\r\n disasterState = true;\r\n LogDisasterStateSet(disasterState, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrow for the address provided. Funds are sent in ETH\r\n */\r\n function withdrawEthOnDisaster() external whenPaused nonReentrant {\r\n require(disasterState, \"Owner did not allow manual withdraw\");\r\n\r\n uint256 amount = escrow[msg.sender];\r\n\r\n require(amount > 0, \"ESCROW_EMPTY\");\r\n escrow[msg.sender] = 0;\r\n msg.sender.sendValue(amount);\r\n\r\n LogWithdrawEthOnDisaster(amount, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrowTokens for the address provided.\r\n * @param token address of a token, that the caller sent the funds, while interacting with voucher or voucher-set\r\n */\r\n function withdrawTokensOnDisaster(address token)\r\n external\r\n whenPaused\r\n nonReentrant\r\n notZeroAddress(token)\r\n {\r\n require(disasterState, \"Owner did not allow manual withdraw\");\r\n\r\n uint256 amount = escrowTokens[token][msg.sender];\r\n require(amount > 0, \"ESCROW_EMPTY\");\r\n escrowTokens[token][msg.sender] = 0;\r\n\r\n SafeERC20.safeTransfer(IERC20(token), msg.sender, amount);\r\n LogWithdrawTokensOnDisaster(amount, token, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Trigger withdrawals of what funds are releasable\r\n * The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\r\n * @dev This function would be optimized a lot, here verbose for readability.\r\n * @param _tokenIdVoucher ID of a voucher token (ERC-721) to try withdraw funds from\r\n */\r\n function withdraw(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n nonReentrant\r\n whenNotPaused\r\n {\r\n VoucherDetails memory voucherDetails;\r\n\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n voucherDetails.tokenIdVoucher = _tokenIdVoucher;\r\n voucherDetails.tokenIdSupply = IVoucherKernel(voucherKernel)\r\n .getIdSupplyFromVoucher(voucherDetails.tokenIdVoucher);\r\n voucherDetails.paymentMethod = IVoucherKernel(voucherKernel)\r\n .getVoucherPaymentMethod(voucherDetails.tokenIdSupply);\r\n\r\n require(\r\n voucherDetails.paymentMethod > 0 &&\r\n voucherDetails.paymentMethod <= 4,\r\n \"INVALID PAYMENT METHOD\"\r\n );\r\n\r\n (\r\n voucherDetails.currStatus.status,\r\n voucherDetails.currStatus.isPaymentReleased,\r\n voucherDetails.currStatus.isDepositsReleased,\r\n ,\r\n ) = IVoucherKernel(voucherKernel).getVoucherStatus(\r\n voucherDetails.tokenIdVoucher\r\n );\r\n\r\n (\r\n voucherDetails.price,\r\n voucherDetails.depositSe,\r\n voucherDetails.depositBu\r\n ) = IVoucherKernel(voucherKernel).getOrderCosts(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n voucherDetails.issuer = payable(\r\n IVoucherKernel(voucherKernel).getSupplyHolder(\r\n voucherDetails.tokenIdSupply\r\n )\r\n );\r\n voucherDetails.holder = payable(\r\n IVoucherKernel(voucherKernel).getVoucherHolder(\r\n voucherDetails.tokenIdVoucher\r\n )\r\n );\r\n\r\n //process the RELEASE OF PAYMENTS - only depends on the redeemed/not-redeemed, a voucher need not be in the final status\r\n if (!voucherDetails.currStatus.isPaymentReleased) {\r\n releasePayments(voucherDetails);\r\n }\r\n\r\n //process the RELEASE OF DEPOSITS - only when vouchers are in the FINAL status\r\n if (\r\n !voucherDetails.currStatus.isDepositsReleased &&\r\n isStatus(voucherDetails.currStatus.status, IDX_FINAL)\r\n ) {\r\n releaseDeposits(voucherDetails);\r\n }\r\n\r\n if (voucherDetails.deposit2pool > 0) {\r\n _withdrawDeposits(\r\n owner(),\r\n voucherDetails.deposit2pool,\r\n voucherDetails.paymentMethod,\r\n voucherDetails.tokenIdSupply\r\n );\r\n }\r\n\r\n if (voucherDetails.price2issuer > 0) {\r\n _withdrawPayments(\r\n voucherDetails.issuer,\r\n voucherDetails.price2issuer,\r\n voucherDetails.paymentMethod,\r\n voucherDetails.tokenIdSupply\r\n );\r\n }\r\n\r\n if (voucherDetails.deposit2issuer > 0) {\r\n _withdrawDeposits(\r\n voucherDetails.issuer,\r\n voucherDetails.deposit2issuer,\r\n voucherDetails.paymentMethod,\r\n voucherDetails.tokenIdSupply\r\n );\r\n }\r\n\r\n if (voucherDetails.price2holder > 0) {\r\n _withdrawPayments(\r\n voucherDetails.holder,\r\n voucherDetails.price2holder,\r\n voucherDetails.paymentMethod,\r\n voucherDetails.tokenIdSupply\r\n );\r\n }\r\n\r\n if (voucherDetails.deposit2holder > 0) {\r\n _withdrawDeposits(\r\n voucherDetails.holder,\r\n voucherDetails.deposit2holder,\r\n voucherDetails.paymentMethod,\r\n voucherDetails.tokenIdSupply\r\n );\r\n }\r\n\r\n delete voucherDetails;\r\n }\r\n\r\n /**\r\n * @notice Release of payments, for a voucher which payments had not been released already.\r\n * Based on the voucher status(e.g. redeemed, refunded, etc), the voucher price will be sent to either buyer or seller.\r\n * @param voucherDetails keeps all required information of the voucher which the payment should be released for.\r\n */\r\n function releasePayments(VoucherDetails memory voucherDetails) internal {\r\n if (isStatus(voucherDetails.currStatus.status, IDX_REDEEM)) {\r\n releasePaymentToSeller(voucherDetails);\r\n } else if (\r\n isStatus(voucherDetails.currStatus.status, IDX_REFUND) ||\r\n isStatus(voucherDetails.currStatus.status, IDX_EXPIRE) ||\r\n (isStatus(voucherDetails.currStatus.status, IDX_CANCEL_FAULT) &&\r\n !isStatus(voucherDetails.currStatus.status, IDX_REDEEM))\r\n ) {\r\n releasePaymentToBuyer(voucherDetails);\r\n }\r\n }\r\n\r\n /**\r\n * @notice Following function `releasePayments`, if certain conditions for the voucher status are met, the voucher price will be sent to the seller\r\n * @param voucherDetails keeps all required information of the voucher which the payment should be released for.\r\n */\r\n function releasePaymentToSeller(VoucherDetails memory voucherDetails)\r\n internal\r\n {\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == ETHTKN\r\n ) {\r\n escrow[voucherDetails.holder] = escrow[voucherDetails.holder].sub(\r\n voucherDetails.price\r\n );\r\n }\r\n if (\r\n voucherDetails.paymentMethod == TKNETH ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenPrice =\r\n IVoucherKernel(voucherKernel).getVoucherPriceToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenPrice][\r\n voucherDetails.holder\r\n ] = escrowTokens[addressTokenPrice][voucherDetails.holder].sub(\r\n voucherDetails.price\r\n );\r\n }\r\n\r\n voucherDetails.price2issuer = voucherDetails.price2issuer.add(\r\n voucherDetails.price\r\n );\r\n\r\n IVoucherKernel(voucherKernel).setPaymentReleased(\r\n voucherDetails.tokenIdVoucher\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.issuer,\r\n voucherDetails.price,\r\n PaymentType.PAYMENT\r\n );\r\n }\r\n\r\n /**\r\n * @notice Following function `releasePayments`, if certain conditions for the voucher status are met, the voucher price will be sent to the buyer\r\n * @param voucherDetails keeps all required information of the voucher, which the payment should be released for.\r\n */\r\n function releasePaymentToBuyer(VoucherDetails memory voucherDetails)\r\n internal\r\n {\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == ETHTKN\r\n ) {\r\n escrow[voucherDetails.holder] = escrow[voucherDetails.holder].sub(\r\n voucherDetails.price\r\n );\r\n }\r\n\r\n if (\r\n voucherDetails.paymentMethod == TKNETH ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenPrice =\r\n IVoucherKernel(voucherKernel).getVoucherPriceToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenPrice][\r\n voucherDetails.holder\r\n ] = escrowTokens[addressTokenPrice][voucherDetails.holder].sub(\r\n voucherDetails.price\r\n );\r\n }\r\n\r\n voucherDetails.price2holder = voucherDetails.price2holder.add(\r\n voucherDetails.price\r\n );\r\n\r\n IVoucherKernel(voucherKernel).setPaymentReleased(\r\n voucherDetails.tokenIdVoucher\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.holder,\r\n voucherDetails.price,\r\n PaymentType.PAYMENT\r\n );\r\n }\r\n\r\n /**\r\n * @notice Release of deposits, for a voucher which deposits had not been released already, and had been marked as `finalized`\r\n * Based on the voucher status(e.g. complained, redeemed, refunded, etc), the voucher deposits will be sent to either buyer, seller, or pool owner.\r\n * Depending on the payment type (e.g ETH, or Token) escrow funds will be held in the `escrow` || escrowTokens mappings\r\n * @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\r\n */\r\n function releaseDeposits(VoucherDetails memory voucherDetails) internal {\r\n //first, depositSe\r\n if (isStatus(voucherDetails.currStatus.status, IDX_COMPLAIN)) {\r\n //slash depositSe\r\n distributeIssuerDepositOnHolderComplain(voucherDetails);\r\n } else {\r\n if (isStatus(voucherDetails.currStatus.status, IDX_CANCEL_FAULT)) {\r\n //slash depositSe\r\n distributeIssuerDepositOnIssuerCancel(voucherDetails);\r\n } else {\r\n //release depositSe\r\n distributeFullIssuerDeposit(voucherDetails);\r\n }\r\n }\r\n\r\n //second, depositBu\r\n if (\r\n isStatus(voucherDetails.currStatus.status, IDX_REDEEM) ||\r\n isStatus(voucherDetails.currStatus.status, IDX_CANCEL_FAULT)\r\n ) {\r\n //release depositBu\r\n distributeFullHolderDeposit(voucherDetails);\r\n } else {\r\n //slash depositBu\r\n distributeHolderDepositOnNotRedeemedNotCancelled(voucherDetails);\r\n }\r\n\r\n IVoucherKernel(voucherKernel).setDepositsReleased(\r\n voucherDetails.tokenIdVoucher\r\n );\r\n }\r\n\r\n /**\r\n * @notice Following function `releaseDeposits` this function will be triggered if a voucher had been complained by the buyer.\r\n * Also checks if the voucher had been cancelled\r\n * @param voucherDetails keeps all required information of the voucher which the payment should be released for.\r\n */\r\n function distributeIssuerDepositOnHolderComplain(\r\n VoucherDetails memory voucherDetails\r\n ) internal {\r\n if (isStatus(voucherDetails.currStatus.status, IDX_CANCEL_FAULT)) {\r\n //appease the conflict three-ways\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == TKNETH\r\n ) {\r\n escrow[voucherDetails.issuer] = escrow[voucherDetails.issuer]\r\n .sub(voucherDetails.depositSe);\r\n }\r\n\r\n if (\r\n voucherDetails.paymentMethod == ETHTKN ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][\r\n voucherDetails.issuer\r\n ] = escrowTokens[addressTokenDeposits][voucherDetails.issuer]\r\n .sub(voucherDetails.depositSe);\r\n }\r\n\r\n uint256 tFraction = voucherDetails.depositSe.div(CANCELFAULT_SPLIT);\r\n voucherDetails.deposit2holder = voucherDetails.deposit2holder.add(\r\n tFraction\r\n ); //Bu gets, say, a half\r\n voucherDetails.deposit2issuer = voucherDetails.deposit2issuer.add(\r\n tFraction.div(CANCELFAULT_SPLIT)\r\n ); //Se gets, say, a quarter\r\n voucherDetails.deposit2pool = voucherDetails.deposit2pool.add(\r\n (voucherDetails.depositSe.sub(tFraction)).sub(\r\n tFraction.div(CANCELFAULT_SPLIT)\r\n )\r\n ); //slashing the rest\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.holder,\r\n tFraction,\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.issuer,\r\n tFraction.div(CANCELFAULT_SPLIT),\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n owner(),\r\n (voucherDetails.depositSe.sub(tFraction)).sub(\r\n tFraction.div(CANCELFAULT_SPLIT)\r\n ),\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n\r\n tFraction = 0;\r\n } else {\r\n //slash depositSe\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == TKNETH\r\n ) {\r\n escrow[voucherDetails.issuer] = escrow[voucherDetails.issuer]\r\n .sub(voucherDetails.depositSe);\r\n } else {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][\r\n voucherDetails.issuer\r\n ] = escrowTokens[addressTokenDeposits][voucherDetails.issuer]\r\n .sub(voucherDetails.depositSe);\r\n }\r\n\r\n voucherDetails.deposit2pool = voucherDetails.deposit2pool.add(\r\n voucherDetails.depositSe\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n owner(),\r\n voucherDetails.depositSe,\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @notice Following function `releaseDeposits` this function will be triggered if a voucher had been cancelled by the seller.\r\n * Will be triggered if the voucher had not been complained.\r\n * @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\r\n */\r\n function distributeIssuerDepositOnIssuerCancel(\r\n VoucherDetails memory voucherDetails\r\n ) internal {\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == TKNETH\r\n ) {\r\n escrow[voucherDetails.issuer] = escrow[voucherDetails.issuer].sub(\r\n voucherDetails.depositSe\r\n );\r\n }\r\n\r\n if (\r\n voucherDetails.paymentMethod == ETHTKN ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][\r\n voucherDetails.issuer\r\n ] = escrowTokens[addressTokenDeposits][voucherDetails.issuer].sub(\r\n voucherDetails.depositSe\r\n );\r\n }\r\n\r\n voucherDetails.deposit2issuer = voucherDetails.deposit2issuer.add(\r\n voucherDetails.depositSe.div(CANCELFAULT_SPLIT)\r\n );\r\n\r\n voucherDetails.deposit2holder = voucherDetails.deposit2holder.add(\r\n voucherDetails.depositSe.sub(\r\n voucherDetails.depositSe.div(CANCELFAULT_SPLIT)\r\n )\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.issuer,\r\n voucherDetails.depositSe.div(CANCELFAULT_SPLIT),\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.holder,\r\n voucherDetails.depositSe.sub(\r\n voucherDetails.depositSe.div(CANCELFAULT_SPLIT)\r\n ),\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n }\r\n\r\n /**\r\n * @notice Following function `releaseDeposits` this function will be triggered if no complain, nor cancel had been made.\r\n * All seller deposit is returned to seller.\r\n * @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\r\n */\r\n function distributeFullIssuerDeposit(VoucherDetails memory voucherDetails)\r\n internal\r\n {\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == TKNETH\r\n ) {\r\n escrow[voucherDetails.issuer] = escrow[voucherDetails.issuer].sub(\r\n voucherDetails.depositSe\r\n );\r\n }\r\n\r\n if (\r\n voucherDetails.paymentMethod == ETHTKN ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][\r\n voucherDetails.issuer\r\n ] = escrowTokens[addressTokenDeposits][voucherDetails.issuer].sub(\r\n voucherDetails.depositSe\r\n );\r\n }\r\n\r\n voucherDetails.deposit2issuer = voucherDetails.deposit2issuer.add(\r\n voucherDetails.depositSe\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.issuer,\r\n voucherDetails.depositSe,\r\n PaymentType.DEPOSIT_SELLER\r\n );\r\n }\r\n\r\n /**\r\n * @notice Following function `releaseDeposits` this function will be triggered if voucher had been redeemed, or the seller had cancelled.\r\n * All buyer deposit is returned to buyer.\r\n * @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\r\n */\r\n function distributeFullHolderDeposit(VoucherDetails memory voucherDetails)\r\n internal\r\n {\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == TKNETH\r\n ) {\r\n escrow[voucherDetails.holder] = escrow[voucherDetails.holder].sub(\r\n voucherDetails.depositBu\r\n );\r\n }\r\n\r\n if (\r\n voucherDetails.paymentMethod == ETHTKN ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][\r\n voucherDetails.holder\r\n ] = escrowTokens[addressTokenDeposits][voucherDetails.holder].sub(\r\n voucherDetails.depositBu\r\n );\r\n }\r\n\r\n voucherDetails.deposit2holder = voucherDetails.deposit2holder.add(\r\n voucherDetails.depositBu\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n voucherDetails.holder,\r\n voucherDetails.depositBu,\r\n PaymentType.DEPOSIT_BUYER\r\n );\r\n }\r\n\r\n /**\r\n * @notice Following function `releaseDeposits` this function will be triggered if voucher had not been redeemed or cancelled after finalization.\r\n * @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\r\n * All buyer deposit goes to Boson.\r\n */\r\n function distributeHolderDepositOnNotRedeemedNotCancelled(\r\n VoucherDetails memory voucherDetails\r\n ) internal {\r\n if (\r\n voucherDetails.paymentMethod == ETHETH ||\r\n voucherDetails.paymentMethod == TKNETH\r\n ) {\r\n escrow[voucherDetails.holder] = escrow[voucherDetails.holder].sub(\r\n voucherDetails.depositBu\r\n );\r\n }\r\n\r\n if (\r\n voucherDetails.paymentMethod == ETHTKN ||\r\n voucherDetails.paymentMethod == TKNTKN\r\n ) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n voucherDetails.tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][\r\n voucherDetails.holder\r\n ] = escrowTokens[addressTokenDeposits][voucherDetails.holder].sub(\r\n voucherDetails.depositBu\r\n );\r\n }\r\n\r\n voucherDetails.deposit2pool = voucherDetails.deposit2pool.add(\r\n voucherDetails.depositBu\r\n );\r\n\r\n LogAmountDistribution(\r\n voucherDetails.tokenIdVoucher,\r\n owner(),\r\n voucherDetails.depositBu,\r\n PaymentType.DEPOSIT_BUYER\r\n );\r\n }\r\n\r\n /**\r\n * @notice External function for withdrawing deposits. Caller must be the seller of the goods, otherwise reverts.\r\n * @notice Seller triggers withdrawals of remaining deposits for a given supply, in case the voucher set is no longer in exchange.\r\n * @param _tokenIdSupply an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for\r\n * @param _burnedQty burned quantity that the deposits should be withdrawn for\r\n * @param _msgSender owner of the voucher set\r\n */\r\n function withdrawDepositsSe(\r\n uint256 _tokenIdSupply,\r\n uint256 _burnedQty,\r\n address payable _msgSender\r\n ) external override nonReentrant onlyFromRouter {\r\n uint256 deposit =\r\n IVoucherKernel(voucherKernel).getSellerDeposit(_tokenIdSupply);\r\n\r\n uint256 depositAmount = deposit.mul(_burnedQty);\r\n\r\n uint8 paymentMethod =\r\n IVoucherKernel(voucherKernel).getVoucherPaymentMethod(\r\n _tokenIdSupply\r\n );\r\n\r\n require(\r\n paymentMethod > 0 && paymentMethod <= 4,\r\n \"INVALID PAYMENT METHOD\"\r\n );\r\n\r\n if (paymentMethod == ETHETH || paymentMethod == TKNETH) {\r\n escrow[_msgSender] = escrow[_msgSender].sub(depositAmount);\r\n }\r\n\r\n if (paymentMethod == ETHTKN || paymentMethod == TKNTKN) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n _tokenIdSupply\r\n );\r\n\r\n escrowTokens[addressTokenDeposits][_msgSender] = escrowTokens[\r\n addressTokenDeposits\r\n ][_msgSender]\r\n .sub(depositAmount);\r\n }\r\n\r\n _withdrawDeposits(\r\n _msgSender,\r\n depositAmount,\r\n paymentMethod,\r\n _tokenIdSupply\r\n );\r\n }\r\n\r\n /**\r\n * @notice Internal function for withdrawing payments.\r\n * As unbelievable as it is, neither .send() nor .transfer() are now secure to use due to EIP-1884\r\n * So now transferring funds via the last remaining option: .call()\r\n * See https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/\r\n * @param _recipient address of the account receiving funds from the escrow\r\n * @param _amount amount to be released from escrow\r\n * @param _paymentMethod payment method that should be used to determine, how to do the payouts\r\n * @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\r\n */\r\n function _withdrawPayments(\r\n address _recipient,\r\n uint256 _amount,\r\n uint8 _paymentMethod,\r\n uint256 _tokenIdSupply\r\n ) internal {\r\n require(_recipient != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(_amount > 0, \"\");\r\n\r\n if (_paymentMethod == ETHETH || _paymentMethod == ETHTKN) {\r\n payable(_recipient).sendValue(_amount);\r\n emit LogWithdrawal(msg.sender, _recipient, _amount);\r\n }\r\n\r\n if (_paymentMethod == TKNETH || _paymentMethod == TKNTKN) {\r\n address addressTokenPrice =\r\n IVoucherKernel(voucherKernel).getVoucherPriceToken(\r\n _tokenIdSupply\r\n );\r\n\r\n SafeERC20.safeTransfer(\r\n IERC20(addressTokenPrice),\r\n _recipient,\r\n _amount\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @notice Internal function for withdrawing deposits.\r\n * @param _recipient address of the account receiving funds from the escrow\r\n * @param _amount amount to be released from escrow\r\n * @param _paymentMethod payment method that should be used to determine, how to do the payouts\r\n * @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\r\n */\r\n function _withdrawDeposits(\r\n address _recipient,\r\n uint256 _amount,\r\n uint8 _paymentMethod,\r\n uint256 _tokenIdSupply\r\n ) internal {\r\n require(_recipient != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(_amount > 0, \"\");\r\n\r\n if (_paymentMethod == ETHETH || _paymentMethod == TKNETH) {\r\n payable(_recipient).sendValue(_amount);\r\n emit LogWithdrawal(msg.sender, _recipient, _amount);\r\n }\r\n\r\n if (_paymentMethod == ETHTKN || _paymentMethod == TKNTKN) {\r\n address addressTokenDeposits =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n _tokenIdSupply\r\n );\r\n\r\n SafeERC20.safeTransfer(\r\n IERC20(addressTokenDeposits),\r\n _recipient,\r\n _amount\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @notice Set the address of the BR contract\r\n * @param _bosonRouterAddress The address of the Boson Route contract\r\n */\r\n function setBosonRouterAddress(address _bosonRouterAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n require(_bosonRouterAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n bosonRouterAddress = _bosonRouterAddress;\r\n\r\n emit LogBosonRouterSet(_bosonRouterAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the address of the ERC1155ERC721 contract\r\n * @param _tokensContractAddress The address of the ERC1155ERC721 contract\r\n */\r\n function setTokenContractAddress(address _tokensContractAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n \r\n require(_tokensContractAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n tokensContractAddress = _tokensContractAddress;\r\n emit LogTokenContractSet(_tokensContractAddress, msg.sender);\r\n }\r\n\r\n\r\n /**\r\n * @notice Update the amount in escrow of an address with the new value, based on VoucherSet/Voucher interaction\r\n * @param _account The address of an account to update\r\n */\r\n function addEscrowAmount(address _account)\r\n external\r\n override\r\n payable\r\n onlyFromRouter\r\n {\r\n escrow[_account] = escrow[_account].add(msg.value);\r\n }\r\n\r\n /**\r\n * @notice Update the amount in escrowTokens of an address with the new value, based on VoucherSet/Voucher interaction\r\n * @param _token The address of a token to query\r\n * @param _account The address of an account to query\r\n * @param _newAmount New amount to be set\r\n */\r\n function addEscrowTokensAmount(\r\n address _token,\r\n address _account,\r\n uint256 _newAmount\r\n ) external override onlyFromRouter {\r\n escrowTokens[_token][_account] = escrowTokens[_token][_account].add(_newAmount);\r\n }\r\n\r\n /**\r\n * @notice Hook which will be triggered when a _tokenIdVoucher will be transferred. Escrow funds should be allocated to the new owner.\r\n * @param _from prev owner of the _tokenIdVoucher\r\n * @param _to next owner of the _tokenIdVoucher\r\n * @param _tokenIdVoucher _tokenIdVoucher that has been transferred\r\n */\r\n function onERC721Transfer(\r\n address _from,\r\n address _to,\r\n uint256 _tokenIdVoucher\r\n ) external override onlyTokensContract {\r\n address tokenAddress;\r\n\r\n uint256 tokenSupplyId =\r\n IVoucherKernel(voucherKernel).getIdSupplyFromVoucher(\r\n _tokenIdVoucher\r\n );\r\n\r\n uint8 paymentType =\r\n IVoucherKernel(voucherKernel).getVoucherPaymentMethod(\r\n tokenSupplyId\r\n );\r\n\r\n (uint256 price, uint256 depositBu) =\r\n IVoucherKernel(voucherKernel).getBuyerOrderCosts(tokenSupplyId);\r\n\r\n if (paymentType == ETHETH) {\r\n uint256 totalAmount = price.add(depositBu);\r\n\r\n //Reduce _from escrow amount and increase _to escrow amount\r\n escrow[_from] = escrow[_from].sub(totalAmount);\r\n escrow[_to] = escrow[_to].add(totalAmount);\r\n }\r\n\r\n\r\n if (paymentType == ETHTKN) {\r\n\r\n //Reduce _from escrow amount and increase _to escrow amount - price\r\n escrow[_from] = escrow[_from].sub(price);\r\n escrow[_to] = escrow[_to].add(price);\r\n\r\n tokenAddress = IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n tokenSupplyId\r\n );\r\n\r\n //Reduce _from escrow token amount and increase _to escrow token amount - deposit\r\n escrowTokens[tokenAddress][_from] = escrowTokens[tokenAddress][_from].sub(depositBu);\r\n escrowTokens[tokenAddress][_to] = escrowTokens[tokenAddress][_to].add(depositBu);\r\n\r\n }\r\n\r\n if (paymentType == TKNETH) {\r\n tokenAddress = IVoucherKernel(voucherKernel).getVoucherPriceToken(\r\n tokenSupplyId\r\n );\r\n \r\n\r\n //Reduce _from escrow token amount and increase _to escrow token amount - price \r\n escrowTokens[tokenAddress][_from] = escrowTokens[tokenAddress][_from].sub(price);\r\n escrowTokens[tokenAddress][_to] = escrowTokens[tokenAddress][_to].add(price);\r\n\r\n //Reduce _from escrow amount and increase _to escrow amount - deposit\r\n escrow[_from] = escrow[_from].sub(depositBu);\r\n escrow[_to] = escrow[_to].add(depositBu);\r\n }\r\n\r\n if (paymentType == TKNTKN) {\r\n tokenAddress = IVoucherKernel(voucherKernel).getVoucherPriceToken(\r\n tokenSupplyId\r\n );\r\n\r\n\r\n //Reduce _from escrow token amount and increase _to escrow token amount - price \r\n escrowTokens[tokenAddress][_from] = escrowTokens[tokenAddress][_from].sub(price);\r\n escrowTokens[tokenAddress][_to] = escrowTokens[tokenAddress][_to].add(price);\r\n\r\n tokenAddress = IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n tokenSupplyId\r\n );\r\n\r\n //Reduce _from escrow token amount and increase _to escrow token amount - deposit \r\n escrowTokens[tokenAddress][_from] = escrowTokens[tokenAddress][_from].sub(depositBu);\r\n escrowTokens[tokenAddress][_to] = escrowTokens[tokenAddress][_to].add(depositBu);\r\n\r\n }\r\n \r\n IBosonRouter(bosonRouterAddress).incrementCorrelationId(_to);\r\n }\r\n\r\n /**\r\n * @notice After the transfer happens the _tokenSupplyId should be updated in the promise. Escrow funds for the seller's deposits (If in ETH) should be allocated to the new owner as well.\r\n * @param _from prev owner of the _tokenSupplyId\r\n * @param _to nex owner of the _tokenSupplyId\r\n * @param _tokenSupplyId _tokenSupplyId for transfer\r\n * @param _value qty which has been transferred\r\n */\r\n function onERC1155Transfer(\r\n address _from,\r\n address _to,\r\n uint256 _tokenSupplyId,\r\n uint256 _value\r\n ) external override onlyTokensContract {\r\n uint8 paymentType =\r\n IVoucherKernel(voucherKernel).getVoucherPaymentMethod(\r\n _tokenSupplyId\r\n );\r\n\r\n uint256 depositSe;\r\n uint256 totalAmount;\r\n\r\n if (paymentType == ETHETH || paymentType == TKNETH) {\r\n depositSe = IVoucherKernel(voucherKernel).getSellerDeposit(\r\n _tokenSupplyId\r\n );\r\n totalAmount = depositSe.mul(_value);\r\n\r\n //Reduce _from escrow amount and increase _to escrow amount\r\n escrow[_from] = escrow[_from].sub(totalAmount);\r\n escrow[_to] = escrow[_to].add(totalAmount);\r\n }\r\n\r\n if (paymentType == ETHTKN || paymentType == TKNTKN) {\r\n address tokenDepositAddress =\r\n IVoucherKernel(voucherKernel).getVoucherDepositToken(\r\n _tokenSupplyId\r\n );\r\n\r\n depositSe = IVoucherKernel(voucherKernel).getSellerDeposit(\r\n _tokenSupplyId\r\n );\r\n totalAmount = depositSe.mul(_value);\r\n\r\n //Reduce _from escrow token amount and increase _to escrow token amount - deposit\r\n escrowTokens[tokenDepositAddress][_from] = escrowTokens[tokenDepositAddress][_from].sub(totalAmount);\r\n escrowTokens[tokenDepositAddress][_to] = escrowTokens[tokenDepositAddress][_to].add(totalAmount);\r\n }\r\n\r\n IVoucherKernel(voucherKernel).setSupplyHolderOnTransfer(\r\n _tokenSupplyId,\r\n _to\r\n );\r\n\r\n IBosonRouter(bosonRouterAddress).incrementCorrelationId(_to);\r\n }\r\n\r\n /**\r\n * @notice Only accept ETH via fallback from the BR Contract\r\n */\r\n receive() external payable {\r\n require(msg.sender == bosonRouterAddress, \"INVALID_PAYEE\");\r\n }\r\n\r\n // // // // // // // //\r\n // GETTERS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Get the address of Voucher Kernel contract\r\n * @return Address of Voucher Kernel contract\r\n */\r\n function getVoucherKernelAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return voucherKernel;\r\n }\r\n\r\n /**\r\n * @notice Get the address of Boson Router contract\r\n * @return Address of Boson Router contract\r\n */\r\n function getBosonRouterAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return bosonRouterAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the address of ERC1155ERC721 contract\r\n * @return Address of ERC1155ERC721 contract\r\n */\r\n function getTokensContractAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return tokensContractAddress;\r\n }\r\n\r\n /**\r\n * @notice Ensure whether or not contract has been set to disaster state \r\n * @return disasterState\r\n */\r\n function isDisasterStateSet() external view override returns(bool) {\r\n return disasterState;\r\n }\r\n\r\n /**\r\n * @notice Get the amount in escrow of an address\r\n * @param _account The address of an account to query\r\n * @return The balance in escrow\r\n */\r\n function getEscrowAmount(address _account)\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return escrow[_account];\r\n }\r\n\r\n /**\r\n * @notice Get the amount in escrow of an address\r\n * @param _token The address of a token to query\r\n * @param _account The address of an account to query\r\n * @return The balance in escrow\r\n */\r\n function getEscrowTokensAmount(address _token, address _account)\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return escrowTokens[_token][_account];\r\n }\r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/Cashier.sol", + "ast": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/Cashier.sol", + "exportedSymbols": { + "Cashier": [ + 4105 + ] + }, + "id": 4106, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1596, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "47:22:1" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 1597, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 13734, + "src": "73:59:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "id": 1598, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12791, + "src": "134:59:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 1599, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12500, + "src": "195:51:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 1600, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12145, + "src": "248:52:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 1601, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 13694, + "src": "302:52:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 1602, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 13087, + "src": "356:51:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 1603, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12578, + "src": "409:56:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 1604, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 9644, + "src": "467:41:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol", + "file": "./interfaces/ICashier.sol", + "id": 1605, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 8785, + "src": "510:35:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IBosonRouter.sol", + "file": "./interfaces/IBosonRouter.sol", + "id": 1606, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 8661, + "src": "547:39:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 1607, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 6141, + "src": "588:28:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1609, + "name": "ICashier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8784, + "src": "809:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1610, + "nodeType": "InheritanceSpecifier", + "src": "809:8:1" + }, + { + "baseName": { + "id": 1611, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "819:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 1612, + "nodeType": "InheritanceSpecifier", + "src": "819:12:1" + }, + { + "baseName": { + "id": 1613, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13733, + "src": "833:15:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$13733", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 1614, + "nodeType": "InheritanceSpecifier", + "src": "833:15:1" + }, + { + "baseName": { + "id": 1615, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "850:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 1616, + "nodeType": "InheritanceSpecifier", + "src": "850:7:1" + }, + { + "baseName": { + "id": 1617, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "859:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 1618, + "nodeType": "InheritanceSpecifier", + "src": "859:8:1" + } + ], + "contractDependencies": [ + 6140, + 8784, + 12144, + 13109, + 13693, + 13733 + ], + "contractKind": "contract", + "documentation": { + "id": 1608, + "nodeType": "StructuredDocumentation", + "src": "620:167:1", + "text": " @title Contract for managing funds\n Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/" + }, + "fullyImplemented": true, + "id": 4105, + "linearizedBaseContracts": [ + 4105, + 13693, + 12144, + 13109, + 13733, + 6140, + 8784 + ], + "name": "Cashier", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1621, + "libraryName": { + "id": 1619, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12790, + "src": "881:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$12790", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "875:27:1", + "typeName": { + "id": 1620, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12577, + "src": "895:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + } + }, + { + "id": 1624, + "libraryName": { + "id": 1622, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "914:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "908:34:1", + "typeName": { + "id": 1623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "926:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + }, + { + "id": 1627, + "libraryName": { + "id": 1625, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "954:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "948:27:1", + "typeName": { + "id": 1626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "967:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 1629, + "mutability": "mutable", + "name": "voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "983:29:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1628, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "983:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1631, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1019:34:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1019:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1633, + "mutability": "mutable", + "name": "tokensContractAddress", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1060:37:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1632, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1060:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1635, + "mutability": "mutable", + "name": "disasterState", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1104:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1634, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1104:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "private" + }, + { + "canonicalName": "Cashier.PaymentType", + "id": 1639, + "members": [ + { + "id": 1636, + "name": "PAYMENT", + "nodeType": "EnumValue", + "src": "1157:7:1" + }, + { + "id": 1637, + "name": "DEPOSIT_SELLER", + "nodeType": "EnumValue", + "src": "1166:14:1" + }, + { + "id": 1638, + "name": "DEPOSIT_BUYER", + "nodeType": "EnumValue", + "src": "1182:13:1" + } + ], + "name": "PaymentType", + "nodeType": "EnumDefinition", + "src": "1139:57:1" + }, + { + "constant": false, + "id": 1643, + "mutability": "mutable", + "name": "escrow", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1204:42:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1642, + "keyType": { + "id": 1640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1212:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1204:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1641, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1223:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1649, + "mutability": "mutable", + "name": "escrowTokens", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1421:68:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 1648, + "keyType": { + "id": 1644, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1429:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1421:47:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 1647, + "keyType": { + "id": 1645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1448:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1440:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1646, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1459:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 1652, + "mutability": "constant", + "name": "CANCELFAULT_SPLIT", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1537:47:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1537:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "32", + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1583:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "internal" + }, + { + "anonymous": false, + "id": 1658, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 1657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1654, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1691:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1653, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1691:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1656, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1716:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1655, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1716:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1690:47:1" + }, + "src": "1667:71:1" + }, + { + "anonymous": false, + "id": 1664, + "name": "LogTokenContractSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 1663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1660, + "indexed": false, + "mutability": "mutable", + "name": "_newTokenContract", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1772:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1772:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1662, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1799:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1799:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1771:49:1" + }, + "src": "1746:75:1" + }, + { + "anonymous": false, + "id": 1672, + "name": "LogWithdrawal", + "nodeType": "EventDefinition", + "parameters": { + "id": 1671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1666, + "indexed": false, + "mutability": "mutable", + "name": "_caller", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "1849:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1665, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1849:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1668, + "indexed": false, + "mutability": "mutable", + "name": "_payee", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "1866:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1667, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1866:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1670, + "indexed": false, + "mutability": "mutable", + "name": "_payment", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "1882:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1882:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1848:51:1" + }, + "src": "1829:71:1" + }, + { + "anonymous": false, + "id": 1682, + "name": "LogAmountDistribution", + "nodeType": "EventDefinition", + "parameters": { + "id": 1681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "1946:31:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1946:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1676, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "1988:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1675, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1678, + "indexed": false, + "mutability": "mutable", + "name": "_payment", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "2010:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1680, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "2037:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + }, + "typeName": { + "id": 1679, + "name": "PaymentType", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1639, + "src": "2037:11:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + }, + "visibility": "internal" + } + ], + "src": "1935:126:1" + }, + "src": "1908:154:1" + }, + { + "anonymous": false, + "id": 1688, + "name": "LogDisasterStateSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 1687, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1684, + "indexed": false, + "mutability": "mutable", + "name": "_disasterState", + "nodeType": "VariableDeclaration", + "scope": 1688, + "src": "2096:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2096:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1686, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1688, + "src": "2117:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1685, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2117:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2095:43:1" + }, + "src": "2070:69:1" + }, + { + "anonymous": false, + "id": 1694, + "name": "LogWithdrawEthOnDisaster", + "nodeType": "EventDefinition", + "parameters": { + "id": 1693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1690, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "2176:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2176:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "2193:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1691, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2193:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2175:39:1" + }, + "src": "2145:70:1" + }, + { + "anonymous": false, + "id": 1702, + "name": "LogWithdrawTokensOnDisaster", + "nodeType": "EventDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1696, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "2265:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1695, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2265:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1698, + "indexed": false, + "mutability": "mutable", + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "2291:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2291:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1700, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "2323:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2323:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2254:96:1" + }, + "src": "2221:130:1" + }, + { + "body": { + "id": 1723, + "nodeType": "Block", + "src": "2385:337:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1705, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "2404:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2434:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2426:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2426:7:1", + "typeDescriptions": {} + } + }, + "id": 1709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2426:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2404:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 1711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2438:16:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 1704, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2396:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2396:59:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1713, + "nodeType": "ExpressionStatement", + "src": "2396:59:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1715, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2565:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2565:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1717, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "2579:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2565:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 1719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2599:17:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 1714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2557:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1721, + "nodeType": "ExpressionStatement", + "src": "2557:60:1" + }, + { + "id": 1722, + "nodeType": "PlaceholderStatement", + "src": "2713:1:1" + } + ] + }, + "id": 1724, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1703, + "nodeType": "ParameterList", + "parameters": [], + "src": "2382:2:1" + }, + "src": "2359:363:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1739, + "nodeType": "Block", + "src": "2776:91:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1729, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1726, + "src": "2795:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2819:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2811:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2811:7:1", + "typeDescriptions": {} + } + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2811:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2795:26:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f544f4b454e5f41444452455353", + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:23:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0bf8b111ec96677a725e54d2bf034db3cecae98926c9d489195a44f6b469681c", + "typeString": "literal_string \"INVALID_TOKEN_ADDRESS\"" + }, + "value": "INVALID_TOKEN_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0bf8b111ec96677a725e54d2bf034db3cecae98926c9d489195a44f6b469681c", + "typeString": "literal_string \"INVALID_TOKEN_ADDRESS\"" + } + ], + "id": 1728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2787:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2787:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1737, + "nodeType": "ExpressionStatement", + "src": "2787:60:1" + }, + { + "id": 1738, + "nodeType": "PlaceholderStatement", + "src": "2858:1:1" + } + ] + }, + "id": 1740, + "name": "notZeroAddress", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1726, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1740, + "src": "2754:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1725, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2754:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2753:22:1" + }, + "src": "2730:137:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1752, + "nodeType": "Block", + "src": "3005:111:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1744, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3024:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3024:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1746, + "name": "tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1633, + "src": "3038:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3024:35:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5554", + "id": 1748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3061:4:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cb49966919293454db3772b6c52b360dd4d2d010b3500935254740dec7a645da", + "typeString": "literal_string \"UT\"" + }, + "value": "UT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cb49966919293454db3772b6c52b360dd4d2d010b3500935254740dec7a645da", + "typeString": "literal_string \"UT\"" + } + ], + "id": 1743, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3016:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3016:50:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1750, + "nodeType": "ExpressionStatement", + "src": "3016:50:1" + }, + { + "id": 1751, + "nodeType": "PlaceholderStatement", + "src": "3107:1:1" + } + ] + }, + "documentation": { + "id": 1741, + "nodeType": "StructuredDocumentation", + "src": "2875:94:1", + "text": " @notice The only caller must be tokensContractAddress, otherwise reverts." + }, + "id": 1753, + "name": "onlyTokensContract", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1742, + "nodeType": "ParameterList", + "parameters": [], + "src": "3002:2:1" + }, + "src": "2975:141:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1766, + "nodeType": "Block", + "src": "3160:81:1", + "statements": [ + { + "expression": { + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1758, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "3171:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1759, + "name": "_voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1755, + "src": "3187:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3171:30:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1761, + "nodeType": "ExpressionStatement", + "src": "3171:30:1" + }, + { + "expression": { + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1762, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "3212:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3228:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3212:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1765, + "nodeType": "ExpressionStatement", + "src": "3212:21:1" + } + ] + }, + "id": 1767, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1755, + "mutability": "mutable", + "name": "_voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 1767, + "src": "3136:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1754, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3136:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3135:24:1" + }, + "returnParameters": { + "id": 1757, + "nodeType": "ParameterList", + "parameters": [], + "src": "3160:0:1" + }, + "scope": 4105, + "src": "3124:117:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8666 + ], + "body": { + "id": 1777, + "nodeType": "Block", + "src": "3473:27:1", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1774, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "3484:6:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:8:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1776, + "nodeType": "ExpressionStatement", + "src": "3484:8:1" + } + ] + }, + "documentation": { + "id": 1768, + "nodeType": "StructuredDocumentation", + "src": "3249:168:1", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 1778, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1772, + "modifierName": { + "id": 1771, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "3458:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3458:14:1" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1770, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3449:8:1" + }, + "parameters": { + "id": 1769, + "nodeType": "ParameterList", + "parameters": [], + "src": "3437:2:1" + }, + "returnParameters": { + "id": 1773, + "nodeType": "ParameterList", + "parameters": [], + "src": "3473:0:1" + }, + "scope": 4105, + "src": "3423:77:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8670 + ], + "body": { + "id": 1788, + "nodeType": "Block", + "src": "3714:29:1", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1785, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "3725:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3725:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1787, + "nodeType": "ExpressionStatement", + "src": "3725:10:1" + } + ] + }, + "documentation": { + "id": 1779, + "nodeType": "StructuredDocumentation", + "src": "3508:148:1", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 1789, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1783, + "modifierName": { + "id": 1782, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "3699:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3699:14:1" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1781, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3690:8:1" + }, + "parameters": { + "id": 1780, + "nodeType": "ParameterList", + "parameters": [], + "src": "3678:2:1" + }, + "returnParameters": { + "id": 1784, + "nodeType": "ParameterList", + "parameters": [], + "src": "3714:0:1" + }, + "scope": 4105, + "src": "3662:81:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8675 + ], + "body": { + "id": 1799, + "nodeType": "Block", + "src": "3928:40:1", + "statements": [ + { + "expression": { + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3946:14:1", + "subExpression": { + "id": 1796, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "3947:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1795, + "id": 1798, + "nodeType": "Return", + "src": "3939:21:1" + } + ] + }, + "documentation": { + "id": 1790, + "nodeType": "StructuredDocumentation", + "src": "3751:111:1", + "text": " @notice If once disaster state has been set to true, the contract could never be unpaused." + }, + "functionSelector": "ae04884e", + "id": 1800, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "canUnpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1792, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3904:8:1" + }, + "parameters": { + "id": 1791, + "nodeType": "ParameterList", + "parameters": [], + "src": "3887:2:1" + }, + "returnParameters": { + "id": 1795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1800, + "src": "3922:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1793, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3922:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3921:6:1" + }, + "scope": 4105, + "src": "3868:100:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1818, + "nodeType": "Block", + "src": "4196:96:1", + "statements": [ + { + "expression": { + "id": 1810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1808, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "4207:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4223:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "4207:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1811, + "nodeType": "ExpressionStatement", + "src": "4207:20:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1813, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "4258:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "id": 1814, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4273:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4273:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1812, + "name": "LogDisasterStateSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1688, + "src": "4238:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bool_$_t_address_$returns$__$", + "typeString": "function (bool,address)" + } + }, + "id": 1816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4238:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1817, + "nodeType": "ExpressionStatement", + "src": "4238:46:1" + } + ] + }, + "documentation": { + "id": 1801, + "nodeType": "StructuredDocumentation", + "src": "3976:156:1", + "text": " @notice Once this functions is triggered, contracts cannot be unpaused anymore\n Only BR contract is in control of this function." + }, + "functionSelector": "36a166f6", + "id": 1819, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1804, + "modifierName": { + "id": 1803, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "4175:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4175:9:1" + }, + { + "id": 1806, + "modifierName": { + "id": 1805, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "4185:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4185:10:1" + } + ], + "name": "setDisasterState", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1802, + "nodeType": "ParameterList", + "parameters": [], + "src": "4163:2:1" + }, + "returnParameters": { + "id": 1807, + "nodeType": "ParameterList", + "parameters": [], + "src": "4196:0:1" + }, + "scope": 4105, + "src": "4138:154:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1867, + "nodeType": "Block", + "src": "4549:305:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1828, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "4568:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f776e657220646964206e6f7420616c6c6f77206d616e75616c207769746864726177", + "id": 1829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4583:37:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + }, + "value": "Owner did not allow manual withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + } + ], + "id": 1827, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4560:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4560:61:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1831, + "nodeType": "ExpressionStatement", + "src": "4560:61:1" + }, + { + "assignments": [ + 1833 + ], + "declarations": [ + { + "constant": false, + "id": 1833, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "4634:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1832, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4634:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1838, + "initialValue": { + "baseExpression": { + "id": 1834, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "4651:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1837, + "indexExpression": { + "expression": { + "id": 1835, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4658:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4658:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4651:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4634:35:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1840, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4690:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4699:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4690:10:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "455343524f575f454d505459", + "id": 1843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4702:14:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + }, + "value": "ESCROW_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + } + ], + "id": 1839, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4682:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4682:35:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1845, + "nodeType": "ExpressionStatement", + "src": "4682:35:1" + }, + { + "expression": { + "id": 1851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1846, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "4728:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1849, + "indexExpression": { + "expression": { + "id": 1847, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4735:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4735:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4728:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4749:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4728:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1852, + "nodeType": "ExpressionStatement", + "src": "4728:22:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1858, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4782:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 1853, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4761:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4761:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sendValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 12844, + "src": "4761:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 1859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4761:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1860, + "nodeType": "ExpressionStatement", + "src": "4761:28:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1862, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4827:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1863, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4835:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4835:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1861, + "name": "LogWithdrawEthOnDisaster", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1694, + "src": "4802:24:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 1865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4802:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1866, + "nodeType": "ExpressionStatement", + "src": "4802:44:1" + } + ] + }, + "documentation": { + "id": 1820, + "nodeType": "StructuredDocumentation", + "src": "4300:177:1", + "text": " @notice In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrow for the address provided. Funds are sent in ETH" + }, + "functionSelector": "7c727088", + "id": 1868, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1823, + "modifierName": { + "id": 1822, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "4525:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4525:10:1" + }, + { + "id": 1825, + "modifierName": { + "id": 1824, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "4536:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4536:12:1" + } + ], + "name": "withdrawEthOnDisaster", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [], + "src": "4513:2:1" + }, + "returnParameters": { + "id": 1826, + "nodeType": "ParameterList", + "parameters": [], + "src": "4549:0:1" + }, + "scope": 4105, + "src": "4483:371:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1929, + "nodeType": "Block", + "src": "5293:368:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1882, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "5312:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f776e657220646964206e6f7420616c6c6f77206d616e75616c207769746864726177", + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5327:37:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + }, + "value": "Owner did not allow manual withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + } + ], + "id": 1881, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5304:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5304:61:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1885, + "nodeType": "ExpressionStatement", + "src": "5304:61:1" + }, + { + "assignments": [ + 1887 + ], + "declarations": [ + { + "constant": false, + "id": 1887, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1929, + "src": "5378:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1886, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5378:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1894, + "initialValue": { + "baseExpression": { + "baseExpression": { + "id": 1888, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "5395:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1890, + "indexExpression": { + "id": 1889, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5408:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5395:19:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1893, + "indexExpression": { + "expression": { + "id": 1891, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5415:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5415:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5395:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5378:48:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1896, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "5445:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5454:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5445:10:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "455343524f575f454d505459", + "id": 1899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5457:14:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + }, + "value": "ESCROW_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + } + ], + "id": 1895, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5437:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5437:35:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1901, + "nodeType": "ExpressionStatement", + "src": "5437:35:1" + }, + { + "expression": { + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 1902, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "5483:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1906, + "indexExpression": { + "id": 1903, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5496:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5483:19:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1907, + "indexExpression": { + "expression": { + "id": 1904, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5503:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5503:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5483:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 1908, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5517:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5483:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1910, + "nodeType": "ExpressionStatement", + "src": "5483:35:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 1915, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5561:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1914, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "5554:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$12577_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5554:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + }, + { + "expression": { + "id": 1917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5569:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5569:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "5581:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1911, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12790, + "src": "5531:9:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeERC20_$12790_$", + "typeString": "type(library SafeERC20)" + } + }, + "id": 1913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 12611, + "src": "5531:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12577_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 1920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:57:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1921, + "nodeType": "ExpressionStatement", + "src": "5531:57:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1923, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "5627:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1924, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5635:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1925, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5642:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5642:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1922, + "name": "LogWithdrawTokensOnDisaster", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1702, + "src": "5599:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address)" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5599:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1928, + "nodeType": "ExpressionStatement", + "src": "5599:54:1" + } + ] + }, + "documentation": { + "id": 1869, + "nodeType": "StructuredDocumentation", + "src": "4862:280:1", + "text": " @notice In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrowTokens for the address provided.\n @param token address of a token, that the caller sent the funds, while interacting with voucher or voucher-set" + }, + "functionSelector": "e13f44bf", + "id": 1930, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1874, + "modifierName": { + "id": 1873, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "5224:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5224:10:1" + }, + { + "id": 1876, + "modifierName": { + "id": 1875, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "5244:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5244:12:1" + }, + { + "arguments": [ + { + "id": 1878, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5281:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1879, + "modifierName": { + "id": 1877, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1740, + "src": "5266:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5266:21:1" + } + ], + "name": "withdrawTokensOnDisaster", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1930, + "src": "5182:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5182:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5181:15:1" + }, + "returnParameters": { + "id": 1880, + "nodeType": "ParameterList", + "parameters": [], + "src": "5293:0:1" + }, + "scope": 4105, + "src": "5148:513:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8681 + ], + "body": { + "id": 2177, + "nodeType": "Block", + "src": "6186:3634:1", + "statements": [ + { + "assignments": [ + 1942 + ], + "declarations": [ + { + "constant": false, + "id": 1942, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2177, + "src": "6197:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 1941, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "6197:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "id": 1943, + "nodeType": "VariableDeclarationStatement", + "src": "6197:36:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1945, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1933, + "src": "6254:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6273:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6254:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 1948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6276:16:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 1944, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6246:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6246:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1950, + "nodeType": "ExpressionStatement", + "src": "6246:47:1" + }, + { + "expression": { + "id": 1955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 1951, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6396:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1953, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "6396:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1954, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1933, + "src": "6428:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6396:47:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1956, + "nodeType": "ExpressionStatement", + "src": "6396:47:1" + }, + { + "expression": { + "id": 1967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 1957, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6454:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1959, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "6454:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 1964, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6552:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1965, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "6552:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1961, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "6500:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1960, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "6485:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6485:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getIdSupplyFromVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 9488, + "src": "6485:66:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure external returns (uint256)" + } + }, + "id": 1966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6485:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6454:128:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1968, + "nodeType": "ExpressionStatement", + "src": "6454:128:1" + }, + { + "expression": { + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 1969, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6593:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "6593:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 1976, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6692:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "6692:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1973, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "6639:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1972, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "6624:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6624:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "6624:67:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6624:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6593:128:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 1980, + "nodeType": "ExpressionStatement", + "src": "6593:128:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1982, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6756:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1983, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "6756:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1984, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6787:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6756:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1986, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6809:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1987, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "6809:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 1988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6841:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "6809:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6756:86:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 1991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6857:24:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 1981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6734:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6734:158:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1993, + "nodeType": "ExpressionStatement", + "src": "6734:158:1" + }, + { + "expression": { + "id": 2013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "expression": { + "expression": { + "id": 1994, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6920:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1997, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "6920:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 1998, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "6920:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "expression": { + "id": 1999, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6967:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2000, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "6967:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2001, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "6967:43:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "expression": { + "id": 2002, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7025:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2003, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "7025:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2004, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "7025:44:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + null, + null + ], + "id": 2005, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "6905:191:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$__$__$", + "typeString": "tuple(uint8,bool,bool,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2010, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7160:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2011, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "7160:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2007, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7114:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2006, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7099:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7099:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 9542, + "src": "7099:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint8,bool,bool,uint256,uint256)" + } + }, + "id": 2012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7099:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "src": "6905:295:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2014, + "nodeType": "ExpressionStatement", + "src": "6905:295:1" + }, + { + "expression": { + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "expression": { + "id": 2015, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7228:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "7228:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2018, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7263:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "7263:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2020, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7302:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2021, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "7302:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2022, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7213:124:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2027, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7398:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "7398:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2024, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7355:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2023, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7340:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7340:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9508, + "src": "7340:43:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" + } + }, + "id": 2029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7340:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "src": "7213:224:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2031, + "nodeType": "ExpressionStatement", + "src": "7213:224:1" + }, + { + "expression": { + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2032, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7450:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2034, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "7450:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 2041, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7560:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2042, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "7560:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2038, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7511:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2037, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7496:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSupplyHolder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9550, + "src": "7496:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:107:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7474:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2035, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7474:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 2044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:140:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7450:164:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2046, + "nodeType": "ExpressionStatement", + "src": "7450:164:1" + }, + { + "expression": { + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2047, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7625:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2049, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "7625:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 2056, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7736:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "7736:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2053, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7686:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2052, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7671:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7671:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherHolder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9558, + "src": "7671:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7671:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7649:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2050, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7649:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7649:142:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7625:166:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2061, + "nodeType": "ExpressionStatement", + "src": "7625:166:1" + }, + { + "condition": { + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7938:44:1", + "subExpression": { + "expression": { + "expression": { + "id": 2062, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7939:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2063, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "7939:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "7939:43:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2071, + "nodeType": "IfStatement", + "src": "7934:108:1", + "trueBody": { + "id": 2070, + "nodeType": "Block", + "src": "7984:58:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2067, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8015:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2066, + "name": "releasePayments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2232, + "src": "7999:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7999:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2069, + "nodeType": "ExpressionStatement", + "src": "7999:31:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8160:45:1", + "subExpression": { + "expression": { + "expression": { + "id": 2072, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8161:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2073, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "8161:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "8161:44:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2077, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8231:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "8231:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "8231:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2080, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "8265:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2076, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "8222:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8222:53:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8160:115:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2088, + "nodeType": "IfStatement", + "src": "8142:203:1", + "trueBody": { + "id": 2087, + "nodeType": "Block", + "src": "8287:58:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2084, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8318:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2083, + "name": "releaseDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2503, + "src": "8302:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8302:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2086, + "nodeType": "ExpressionStatement", + "src": "8302:31:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2089, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8361:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "8361:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8391:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8361:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2105, + "nodeType": "IfStatement", + "src": "8357:262:1", + "trueBody": { + "id": 2104, + "nodeType": "Block", + "src": "8394:225:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2094, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "8445:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8445:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2096, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8471:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "8471:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2098, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8517:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2099, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "8517:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2100, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8564:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "8564:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2093, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "8409:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8409:198:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2103, + "nodeType": "ExpressionStatement", + "src": "8409:198:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2106, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8635:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "8635:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8665:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8635:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2122, + "nodeType": "IfStatement", + "src": "8631:276:1", + "trueBody": { + "id": 2121, + "nodeType": "Block", + "src": "8668:239:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2111, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8719:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "8719:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2113, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8759:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2114, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "8759:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2115, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8805:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "8805:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2117, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8852:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "8852:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2110, + "name": "_withdrawPayments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3367, + "src": "8683:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8683:212:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2120, + "nodeType": "ExpressionStatement", + "src": "8683:212:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2123, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8923:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "8923:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8955:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8923:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2139, + "nodeType": "IfStatement", + "src": "8919:280:1", + "trueBody": { + "id": 2138, + "nodeType": "Block", + "src": "8958:241:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2128, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9009:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2129, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "9009:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2130, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9049:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "9049:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2132, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9097:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "9097:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2134, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9144:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "9144:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2127, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "8973:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8973:214:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2137, + "nodeType": "ExpressionStatement", + "src": "8973:214:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2140, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9215:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2141, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "9215:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9245:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9215:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2156, + "nodeType": "IfStatement", + "src": "9211:276:1", + "trueBody": { + "id": 2155, + "nodeType": "Block", + "src": "9248:239:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2145, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9299:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2146, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "9299:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2147, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9339:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "9339:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2149, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9385:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "9385:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2151, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9432:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "9432:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2144, + "name": "_withdrawPayments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3367, + "src": "9263:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9263:212:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "9263:212:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2157, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9503:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "9503:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9535:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9503:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2173, + "nodeType": "IfStatement", + "src": "9499:280:1", + "trueBody": { + "id": 2172, + "nodeType": "Block", + "src": "9538:241:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2162, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9589:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2163, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "9589:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2164, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9629:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "9629:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2166, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9677:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "9677:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2168, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9724:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "9724:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2161, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "9553:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9553:214:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "9553:214:1" + } + ] + } + }, + { + "expression": { + "id": 2175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "9791:21:1", + "subExpression": { + "id": 2174, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9798:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2176, + "nodeType": "ExpressionStatement", + "src": "9791:21:1" + } + ] + }, + "documentation": { + "id": 1931, + "nodeType": "StructuredDocumentation", + "src": "5669:382:1", + "text": " @notice Trigger withdrawals of what funds are releasable\n The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\n @dev This function would be optimized a lot, here verbose for readability.\n @param _tokenIdVoucher ID of a voucher token (ERC-721) to try withdraw funds from" + }, + "functionSelector": "2e1a7d4d", + "id": 2178, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1937, + "modifierName": { + "id": 1936, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "6145:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6145:12:1" + }, + { + "id": 1939, + "modifierName": { + "id": 1938, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "6167:13:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6167:13:1" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1935, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6127:8:1" + }, + "parameters": { + "id": 1934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1933, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 2178, + "src": "6075:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6075:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6074:25:1" + }, + "returnParameters": { + "id": 1940, + "nodeType": "ParameterList", + "parameters": [], + "src": "6186:0:1" + }, + "scope": 4105, + "src": "6057:3763:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2231, + "nodeType": "Block", + "src": "10258:523:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2185, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10282:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2186, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10282:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10282:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2188, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "10316:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2184, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10273:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10273:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2196, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10427:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10427:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2198, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10427:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2199, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "10461:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2195, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10418:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10418:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2202, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10498:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10498:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2204, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10498:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2205, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "10532:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2201, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10489:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10489:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10418:125:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2209, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10570:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10570:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10570:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2212, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "10604:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2208, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10561:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10561:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 2220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10642:55:1", + "subExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2215, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10652:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2216, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10652:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2217, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10652:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2218, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "10686:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2214, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10643:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10561:136:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2222, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10560:138:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10418:280:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2229, + "nodeType": "IfStatement", + "src": "10400:374:1", + "trueBody": { + "id": 2228, + "nodeType": "Block", + "src": "10710:64:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2225, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10747:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2224, + "name": "releasePaymentToBuyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2434, + "src": "10725:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10725:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2227, + "nodeType": "ExpressionStatement", + "src": "10725:37:1" + } + ] + } + }, + "id": 2230, + "nodeType": "IfStatement", + "src": "10269:505:1", + "trueBody": { + "id": 2194, + "nodeType": "Block", + "src": "10329:65:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2191, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10367:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2190, + "name": "releasePaymentToSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2333, + "src": "10344:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10344:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2193, + "nodeType": "ExpressionStatement", + "src": "10344:38:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 2179, + "nodeType": "StructuredDocumentation", + "src": "9828:352:1", + "text": " @notice Release of payments, for a voucher which payments had not been released already.\n Based on the voucher status(e.g. redeemed, refunded, etc), the voucher price will be sent to either buyer or seller.\n @param voucherDetails keeps all required information of the voucher which the payment should be released for." + }, + "id": 2232, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releasePayments", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2181, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2232, + "src": "10211:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2180, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "10211:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "10210:38:1" + }, + "returnParameters": { + "id": 2183, + "nodeType": "ParameterList", + "parameters": [], + "src": "10258:0:1" + }, + "scope": 4105, + "src": "10186:595:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2332, + "nodeType": "Block", + "src": "11171:1260:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2238, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11200:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11200:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2240, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "11232:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11200:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2242, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11255:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11255:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2244, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "11287:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11255:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11200:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2262, + "nodeType": "IfStatement", + "src": "11182:269:1", + "trueBody": { + "id": 2261, + "nodeType": "Block", + "src": "11305:146:1", + "statements": [ + { + "expression": { + "id": 2259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2247, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "11320:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2250, + "indexExpression": { + "expression": { + "id": 2248, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11327:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11327:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11320:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2256, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11404:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "11404:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2251, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "11352:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2254, + "indexExpression": { + "expression": { + "id": 2252, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11359:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2253, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11359:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11352:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "11352:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11352:87:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11320:119:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2260, + "nodeType": "ExpressionStatement", + "src": "11320:119:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2263, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11479:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11479:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2265, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "11511:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11479:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2267, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11534:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11534:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2269, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "11566:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11534:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11479:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2301, + "nodeType": "IfStatement", + "src": "11461:533:1", + "trueBody": { + "id": 2300, + "nodeType": "Block", + "src": "11584:410:1", + "statements": [ + { + "assignments": [ + 2273 + ], + "declarations": [ + { + "constant": false, + "id": 2273, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 2300, + "src": "11599:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11599:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2281, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2278, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11717:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2279, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "11717:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2275, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "11659:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2274, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "11644:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11644:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "11644:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11644:120:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11599:165:1" + }, + { + "expression": { + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2282, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "11781:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2286, + "indexExpression": { + "id": 2283, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2273, + "src": "11794:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11781:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2287, + "indexExpression": { + "expression": { + "id": 2284, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11831:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2285, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11831:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11781:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2295, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11947:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "11947:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2288, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "11870:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2290, + "indexExpression": { + "id": 2289, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2273, + "src": "11883:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11870:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2293, + "indexExpression": { + "expression": { + "id": 2291, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11902:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2292, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11902:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11870:54:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "11870:58:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11870:112:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11781:201:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2299, + "nodeType": "ExpressionStatement", + "src": "11781:201:1" + } + ] + } + }, + { + "expression": { + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2302, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12006:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "12006:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2308, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12082:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "12082:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2305, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12036:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "12036:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "12036:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12036:77:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12006:107:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2312, + "nodeType": "ExpressionStatement", + "src": "12006:107:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2317, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12189:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2318, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "12189:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2314, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "12141:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2313, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "12126:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12126:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 9328, + "src": "12126:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12126:103:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2320, + "nodeType": "ExpressionStatement", + "src": "12126:103:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2322, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12278:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2323, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "12278:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2324, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12322:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "12322:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2326, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12358:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2327, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "12358:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2328, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "12393:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PAYMENT", + "nodeType": "MemberAccess", + "src": "12393:19:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2321, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "12242:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12242:181:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "12242:181:1" + } + ] + }, + "documentation": { + "id": 2233, + "nodeType": "StructuredDocumentation", + "src": "10789:283:1", + "text": " @notice Following function `releasePayments`, if certain conditions for the voucher status are met, the voucher price will be sent to the seller\n @param voucherDetails keeps all required information of the voucher which the payment should be released for." + }, + "id": 2333, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releasePaymentToSeller", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2235, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2333, + "src": "11110:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2234, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "11110:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "11109:38:1" + }, + "returnParameters": { + "id": 2237, + "nodeType": "ParameterList", + "parameters": [], + "src": "11171:0:1" + }, + "scope": 4105, + "src": "11078:1353:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "12820:1262:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2339, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "12849:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2340, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "12849:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2341, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "12881:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12849:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2343, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "12904:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2344, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "12904:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2345, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "12936:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12904:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12849:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2363, + "nodeType": "IfStatement", + "src": "12831:269:1", + "trueBody": { + "id": 2362, + "nodeType": "Block", + "src": "12954:146:1", + "statements": [ + { + "expression": { + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2348, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "12969:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2351, + "indexExpression": { + "expression": { + "id": 2349, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "12976:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "12976:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12969:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2357, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13053:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "13053:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2352, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "13001:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2355, + "indexExpression": { + "expression": { + "id": 2353, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13008:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2354, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13008:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13001:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "13001:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13001:87:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12969:119:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2361, + "nodeType": "ExpressionStatement", + "src": "12969:119:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2364, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13130:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2365, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "13130:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2366, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "13162:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13130:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2368, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13185:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "13185:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2370, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "13217:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13185:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13130:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2402, + "nodeType": "IfStatement", + "src": "13112:533:1", + "trueBody": { + "id": 2401, + "nodeType": "Block", + "src": "13235:410:1", + "statements": [ + { + "assignments": [ + 2374 + ], + "declarations": [ + { + "constant": false, + "id": 2374, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 2401, + "src": "13250:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2373, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13250:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2382, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2379, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13368:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2380, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "13368:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2376, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "13310:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2375, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13295:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13295:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "13295:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13295:120:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13250:165:1" + }, + { + "expression": { + "id": 2399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2383, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "13432:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2387, + "indexExpression": { + "id": 2384, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2374, + "src": "13445:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13432:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2388, + "indexExpression": { + "expression": { + "id": 2385, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13482:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13482:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13432:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2396, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13598:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2397, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "13598:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2389, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "13521:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2391, + "indexExpression": { + "id": 2390, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2374, + "src": "13534:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13521:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2394, + "indexExpression": { + "expression": { + "id": 2392, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13553:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2393, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13553:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13521:54:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "13521:58:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13521:112:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13432:201:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2400, + "nodeType": "ExpressionStatement", + "src": "13432:201:1" + } + ] + } + }, + { + "expression": { + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2403, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13657:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2405, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "13657:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2409, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13733:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "13733:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2406, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13687:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "13687:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "13687:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13687:77:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13657:107:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2413, + "nodeType": "ExpressionStatement", + "src": "13657:107:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2418, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13840:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "13840:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2415, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "13792:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2414, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13777:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13777:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 9328, + "src": "13777:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 2420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13777:103:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2421, + "nodeType": "ExpressionStatement", + "src": "13777:103:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2423, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13929:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2424, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "13929:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2425, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13973:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13973:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2427, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "14009:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2428, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "14009:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2429, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "14044:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PAYMENT", + "nodeType": "MemberAccess", + "src": "14044:19:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2422, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "13893:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13893:181:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "13893:181:1" + } + ] + }, + "documentation": { + "id": 2334, + "nodeType": "StructuredDocumentation", + "src": "12439:283:1", + "text": " @notice Following function `releasePayments`, if certain conditions for the voucher status are met, the voucher price will be sent to the buyer\n @param voucherDetails keeps all required information of the voucher, which the payment should be released for." + }, + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releasePaymentToBuyer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2336, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "12759:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2335, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "12759:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "12758:38:1" + }, + "returnParameters": { + "id": 2338, + "nodeType": "ParameterList", + "parameters": [], + "src": "12820:0:1" + }, + "scope": 4105, + "src": "12728:1354:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2502, + "nodeType": "Block", + "src": "14709:1113:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2441, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "14761:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2442, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "14761:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2443, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "14761:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2444, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "14795:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2440, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "14752:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14752:56:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2468, + "nodeType": "Block", + "src": "14929:336:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2452, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "14957:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2453, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "14957:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2454, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "14957:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2455, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "14991:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2451, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "14948:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14948:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2466, + "nodeType": "Block", + "src": "15139:115:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2463, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15223:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2462, + "name": "distributeFullIssuerDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2987, + "src": "15195:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15195:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2465, + "nodeType": "ExpressionStatement", + "src": "15195:43:1" + } + ] + }, + "id": 2467, + "nodeType": "IfStatement", + "src": "14944:310:1", + "trueBody": { + "id": 2461, + "nodeType": "Block", + "src": "15010:123:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2458, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15102:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2457, + "name": "distributeIssuerDepositOnIssuerCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2894, + "src": "15064:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15064:53:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2460, + "nodeType": "ExpressionStatement", + "src": "15064:53:1" + } + ] + } + } + ] + }, + "id": 2469, + "nodeType": "IfStatement", + "src": "14748:517:1", + "trueBody": { + "id": 2450, + "nodeType": "Block", + "src": "14810:113:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2447, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "14896:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2446, + "name": "distributeIssuerDepositOnHolderComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2759, + "src": "14856:39:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14856:55:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2449, + "nodeType": "ExpressionStatement", + "src": "14856:55:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2471, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15333:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "15333:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2473, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "15333:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2474, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "15367:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2470, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "15324:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15324:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2477, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15404:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2478, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "15404:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "15404:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2480, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "15438:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2476, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "15395:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15395:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15324:131:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2492, + "nodeType": "Block", + "src": "15576:122:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2489, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15671:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2488, + "name": "distributeHolderDepositOnNotRedeemedNotCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3173, + "src": "15622:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15622:64:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2491, + "nodeType": "ExpressionStatement", + "src": "15622:64:1" + } + ] + }, + "id": 2493, + "nodeType": "IfStatement", + "src": "15306:392:1", + "trueBody": { + "id": 2487, + "nodeType": "Block", + "src": "15467:103:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2484, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15543:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2483, + "name": "distributeFullHolderDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3080, + "src": "15515:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15515:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2486, + "nodeType": "ExpressionStatement", + "src": "15515:43:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2498, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15774:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "15774:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2495, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "15725:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2494, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "15710:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15710:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 9334, + "src": "15710:49:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 2500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15710:104:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2501, + "nodeType": "ExpressionStatement", + "src": "15710:104:1" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "14090:541:1", + "text": " @notice Release of deposits, for a voucher which deposits had not been released already, and had been marked as `finalized`\n Based on the voucher status(e.g. complained, redeemed, refunded, etc), the voucher deposits will be sent to either buyer, seller, or pool owner.\n Depending on the payment type (e.g ETH, or Token) escrow funds will be held in the `escrow` || escrowTokens mappings\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 2503, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releaseDeposits", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2503, + "src": "14662:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2436, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "14662:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "14661:38:1" + }, + "returnParameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [], + "src": "14709:0:1" + }, + "scope": 4105, + "src": "14637:1185:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2758, + "nodeType": "Block", + "src": "16264:3626:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2510, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16288:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "16288:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2512, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16288:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2513, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "16322:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2509, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "16279:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16279:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2756, + "nodeType": "Block", + "src": "18739:1144:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2680, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18807:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2681, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "18807:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2682, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "18839:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "18807:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2684, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18866:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2685, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "18866:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2686, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "18898:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "18866:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18807:97:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2732, + "nodeType": "Block", + "src": "19074:447:1", + "statements": [ + { + "assignments": [ + 2705 + ], + "declarations": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2732, + "src": "19093:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19093:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2713, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2710, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19224:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2711, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "19224:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2707, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "19160:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2706, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "19145:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19145:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "19145:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19145:130:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19093:182:1" + }, + { + "expression": { + "id": 2730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2714, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "19296:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2718, + "indexExpression": { + "id": 2715, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2705, + "src": "19309:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19296:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2719, + "indexExpression": { + "expression": { + "id": 2716, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19353:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2717, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "19353:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "19296:97:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2727, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19480:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19480:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2720, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "19396:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2722, + "indexExpression": { + "id": 2721, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2705, + "src": "19409:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19396:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2725, + "indexExpression": { + "expression": { + "id": 2723, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19431:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "19431:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19396:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "19396:83:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19396:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19296:209:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2731, + "nodeType": "ExpressionStatement", + "src": "19296:209:1" + } + ] + }, + "id": 2733, + "nodeType": "IfStatement", + "src": "18785:736:1", + "trueBody": { + "id": 2703, + "nodeType": "Block", + "src": "18920:148:1", + "statements": [ + { + "expression": { + "id": 2701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2689, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "18939:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2692, + "indexExpression": { + "expression": { + "id": 2690, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18946:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2691, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "18946:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18939:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2698, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19027:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2699, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19027:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2693, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "18971:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2696, + "indexExpression": { + "expression": { + "id": 2694, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18978:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "18978:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18971:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "18971:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18971:81:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18939:113:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2702, + "nodeType": "ExpressionStatement", + "src": "18939:113:1" + } + ] + } + }, + { + "expression": { + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2734, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19537:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "19537:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2740, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19617:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2741, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19617:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2737, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19567:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2738, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "19567:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "19567:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19567:89:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19537:119:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2744, + "nodeType": "ExpressionStatement", + "src": "19537:119:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2746, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19713:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2747, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "19713:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2748, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "19761:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19761:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2750, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19787:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19787:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2752, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "19830:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "19830:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2745, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "19673:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19673:198:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2755, + "nodeType": "ExpressionStatement", + "src": "19673:198:1" + } + ] + }, + "id": 2757, + "nodeType": "IfStatement", + "src": "16275:3608:1", + "trueBody": { + "id": 2679, + "nodeType": "Block", + "src": "16341:2392:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2515, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16425:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16425:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2517, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "16457:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16425:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2519, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16484:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16484:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2521, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "16516:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16484:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16425:97:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2539, + "nodeType": "IfStatement", + "src": "16403:283:1", + "trueBody": { + "id": 2538, + "nodeType": "Block", + "src": "16538:148:1", + "statements": [ + { + "expression": { + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2524, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "16557:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2527, + "indexExpression": { + "expression": { + "id": 2525, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16564:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "16564:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16557:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2533, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16645:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2534, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "16645:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2528, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "16589:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2531, + "indexExpression": { + "expression": { + "id": 2529, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16596:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "16596:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16589:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "16589:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16589:81:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16557:113:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2537, + "nodeType": "ExpressionStatement", + "src": "16557:113:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2540, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16724:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16724:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2542, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "16756:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16724:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2544, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16783:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2545, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16783:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2546, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "16815:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16783:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16724:97:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2578, + "nodeType": "IfStatement", + "src": "16702:582:1", + "trueBody": { + "id": 2577, + "nodeType": "Block", + "src": "16837:447:1", + "statements": [ + { + "assignments": [ + 2550 + ], + "declarations": [ + { + "constant": false, + "id": 2550, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "16856:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2549, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16856:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2558, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2555, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16987:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2556, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "16987:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2552, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "16923:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2551, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16908:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16908:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "16908:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16908:130:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16856:182:1" + }, + { + "expression": { + "id": 2575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2559, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "17059:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2563, + "indexExpression": { + "id": 2560, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2550, + "src": "17072:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17059:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2564, + "indexExpression": { + "expression": { + "id": 2561, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17116:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2562, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "17116:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17059:97:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2572, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17243:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2573, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "17243:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2565, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "17159:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2567, + "indexExpression": { + "id": 2566, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2550, + "src": "17172:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17159:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2570, + "indexExpression": { + "expression": { + "id": 2568, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17194:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "17194:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17159:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "17159:83:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17159:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17059:209:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2576, + "nodeType": "ExpressionStatement", + "src": "17059:209:1" + } + ] + } + }, + { + "assignments": [ + 2580 + ], + "declarations": [ + { + "constant": false, + "id": 2580, + "mutability": "mutable", + "name": "tFraction", + "nodeType": "VariableDeclaration", + "scope": 2679, + "src": "17300:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17300:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2586, + "initialValue": { + "arguments": [ + { + "id": 2584, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "17349:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2581, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17320:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2582, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "17320:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "17320:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17320:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17300:67:1" + }, + { + "expression": { + "id": 2595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2587, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17382:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2589, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "17382:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2593, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17466:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2590, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17414:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "17414:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "17414:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17414:76:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17382:108:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2596, + "nodeType": "ExpressionStatement", + "src": "17382:108:1" + }, + { + "expression": { + "id": 2608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2597, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17528:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "17528:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2605, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "17626:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2603, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17612:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "17612:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17612:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2600, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17560:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "17560:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "17560:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17560:99:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17528:131:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2609, + "nodeType": "ExpressionStatement", + "src": "17528:131:1" + }, + { + "expression": { + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2610, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17700:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "17700:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2625, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "17862:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2623, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17848:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "17848:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17848:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "components": [ + { + "arguments": [ + { + "id": 2619, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17810:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2616, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17781:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "17781:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "17781:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17781:39:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2621, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17780:41:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "17780:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17780:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2613, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17730:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "17730:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "17730:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17730:184:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17700:214:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2630, + "nodeType": "ExpressionStatement", + "src": "17700:214:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2632, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17991:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2633, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "17991:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2634, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18039:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "18039:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2636, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18079:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2637, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "18107:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "18107:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2631, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "17951:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17951:197:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2640, + "nodeType": "ExpressionStatement", + "src": "17951:197:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2642, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18203:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2643, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "18203:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2644, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18251:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "18251:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2648, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "18305:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2646, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18291:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "18291:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18291:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2650, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "18342:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "18342:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2641, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "18163:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18163:220:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2653, + "nodeType": "ExpressionStatement", + "src": "18163:220:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2655, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18438:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2656, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "18438:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2657, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "18486:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18486:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2668, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "18594:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2666, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18580:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "18580:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18580:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "components": [ + { + "arguments": [ + { + "id": 2662, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18542:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2659, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18513:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2660, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "18513:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "18513:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18513:39:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2664, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18512:41:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "18512:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18512:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2671, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "18650:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "18650:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2654, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "18398:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18398:293:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2674, + "nodeType": "ExpressionStatement", + "src": "18398:293:1" + }, + { + "expression": { + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2675, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18708:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 2676, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18720:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18708:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2678, + "nodeType": "ExpressionStatement", + "src": "18708:13:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 2504, + "nodeType": "StructuredDocumentation", + "src": "15830:316:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if a voucher had been complained by the buyer.\n Also checks if the voucher had been cancelled\n @param voucherDetails keeps all required information of the voucher which the payment should be released for." + }, + "id": 2759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeIssuerDepositOnHolderComplain", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2506, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2759, + "src": "16211:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2505, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "16211:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "16200:54:1" + }, + "returnParameters": { + "id": 2508, + "nodeType": "ParameterList", + "parameters": [], + "src": "16264:0:1" + }, + "scope": 4105, + "src": "16152:3738:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2893, + "nodeType": "Block", + "src": "20343:1733:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2765, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20372:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20372:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2767, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "20404:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20372:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2769, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20427:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20427:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2771, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "20459:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20427:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20372:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2789, + "nodeType": "IfStatement", + "src": "20354:273:1", + "trueBody": { + "id": 2788, + "nodeType": "Block", + "src": "20477:150:1", + "statements": [ + { + "expression": { + "id": 2786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2774, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "20492:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2777, + "indexExpression": { + "expression": { + "id": 2775, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20499:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2776, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "20499:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20492:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2783, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20576:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "20576:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2778, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "20524:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2781, + "indexExpression": { + "expression": { + "id": 2779, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20531:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "20531:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20524:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "20524:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20524:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20492:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2787, + "nodeType": "ExpressionStatement", + "src": "20492:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2790, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20657:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2791, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20657:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2792, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "20689:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20657:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2794, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20712:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2795, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20712:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2796, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "20744:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20712:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20657:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2828, + "nodeType": "IfStatement", + "src": "20639:548:1", + "trueBody": { + "id": 2827, + "nodeType": "Block", + "src": "20762:425:1", + "statements": [ + { + "assignments": [ + 2800 + ], + "declarations": [ + { + "constant": false, + "id": 2800, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2827, + "src": "20777:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20777:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2808, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2805, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20900:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2806, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "20900:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2802, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "20840:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2801, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "20825:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20825:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "20825:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20825:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20777:170:1" + }, + { + "expression": { + "id": 2825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2809, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "20964:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2813, + "indexExpression": { + "id": 2810, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2800, + "src": "20977:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20964:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2814, + "indexExpression": { + "expression": { + "id": 2811, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21017:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2812, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "21017:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20964:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2822, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21136:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21136:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2815, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "21056:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2817, + "indexExpression": { + "id": 2816, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2800, + "src": "21069:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21056:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2820, + "indexExpression": { + "expression": { + "id": 2818, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21091:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2819, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "21091:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21056:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "21056:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21056:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20964:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2826, + "nodeType": "ExpressionStatement", + "src": "20964:211:1" + } + ] + } + }, + { + "expression": { + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2829, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2831, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "21199:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2838, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21308:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2835, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21279:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21279:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21279:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21279:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2832, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21231:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2833, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "21231:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "21231:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21231:106:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21199:138:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2842, + "nodeType": "ExpressionStatement", + "src": "21199:138:1" + }, + { + "expression": { + "id": 2859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2843, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21350:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "21350:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2855, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21506:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2852, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21477:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21477:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21477:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21477:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2849, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21430:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2850, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21430:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "21430:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21430:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2846, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21382:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "21382:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "21382:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21382:168:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21350:200:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2860, + "nodeType": "ExpressionStatement", + "src": "21350:200:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2862, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21599:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2863, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "21599:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2864, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21643:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2865, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "21643:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2869, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21708:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2866, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21679:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21679:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21679:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21679:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2871, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "21741:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "21741:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2861, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "21563:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21563:215:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2874, + "nodeType": "ExpressionStatement", + "src": "21563:215:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2876, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21827:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "21827:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2878, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21871:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "21871:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2886, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21983:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2883, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21954:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21954:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21954:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21954:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2880, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21907:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21907:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "21907:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21907:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2889, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "22031:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "22031:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2875, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "21791:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21791:277:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2892, + "nodeType": "ExpressionStatement", + "src": "21791:277:1" + } + ] + }, + "documentation": { + "id": 2760, + "nodeType": "StructuredDocumentation", + "src": "19898:329:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if a voucher had been cancelled by the seller.\n Will be triggered if the voucher had not been complained.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 2894, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeIssuerDepositOnIssuerCancel", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2762, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2894, + "src": "20290:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2761, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "20290:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "20279:54:1" + }, + "returnParameters": { + "id": 2764, + "nodeType": "ParameterList", + "parameters": [], + "src": "20343:0:1" + }, + "scope": 4105, + "src": "20233:1843:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2986, + "nodeType": "Block", + "src": "22496:1184:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2900, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22525:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2901, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22525:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2902, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "22557:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22525:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2904, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22580:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2905, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22580:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2906, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "22612:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22580:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22525:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2924, + "nodeType": "IfStatement", + "src": "22507:273:1", + "trueBody": { + "id": 2923, + "nodeType": "Block", + "src": "22630:150:1", + "statements": [ + { + "expression": { + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2909, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "22645:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2912, + "indexExpression": { + "expression": { + "id": 2910, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22652:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2911, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "22652:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "22645:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2918, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22729:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "22729:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2913, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "22677:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2916, + "indexExpression": { + "expression": { + "id": 2914, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22684:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2915, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "22684:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22677:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "22677:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22677:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22645:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2922, + "nodeType": "ExpressionStatement", + "src": "22645:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2925, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22810:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22810:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2927, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "22842:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22810:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2929, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22865:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22865:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2931, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "22897:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22865:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22810:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2963, + "nodeType": "IfStatement", + "src": "22792:548:1", + "trueBody": { + "id": 2962, + "nodeType": "Block", + "src": "22915:425:1", + "statements": [ + { + "assignments": [ + 2935 + ], + "declarations": [ + { + "constant": false, + "id": 2935, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "22930:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2934, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22930:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2943, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2940, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23053:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "23053:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2937, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "22993:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2936, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22978:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22978:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "22978:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22978:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22930:170:1" + }, + { + "expression": { + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2944, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "23117:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2948, + "indexExpression": { + "id": 2945, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2935, + "src": "23130:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23117:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2949, + "indexExpression": { + "expression": { + "id": 2946, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23170:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "23170:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "23117:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2957, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23289:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2958, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "23289:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2950, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "23209:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2952, + "indexExpression": { + "id": 2951, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2935, + "src": "23222:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23209:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2955, + "indexExpression": { + "expression": { + "id": 2953, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23244:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2954, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "23244:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23209:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "23209:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23209:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23117:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2961, + "nodeType": "ExpressionStatement", + "src": "23117:211:1" + } + ] + } + }, + { + "expression": { + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2964, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23352:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "23352:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2970, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23432:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "23432:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2967, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23384:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "23384:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "23384:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23384:83:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23352:115:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2974, + "nodeType": "ExpressionStatement", + "src": "23352:115:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23516:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "23516:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2978, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23560:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2979, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "23560:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2980, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23596:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "23596:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2982, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "23635:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "23635:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2975, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "23480:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23480:192:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2985, + "nodeType": "ExpressionStatement", + "src": "23480:192:1" + } + ] + }, + "documentation": { + "id": 2895, + "nodeType": "StructuredDocumentation", + "src": "22084:308:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if no complain, nor cancel had been made.\n All seller deposit is returned to seller.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeFullIssuerDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "22435:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2896, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "22435:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "22434:38:1" + }, + "returnParameters": { + "id": 2899, + "nodeType": "ParameterList", + "parameters": [], + "src": "22496:0:1" + }, + "scope": 4105, + "src": "22398:1282:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3079, + "nodeType": "Block", + "src": "24115:1183:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2993, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24144:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24144:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2995, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "24176:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24144:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2997, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2998, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24199:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2999, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "24231:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24199:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24144:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3017, + "nodeType": "IfStatement", + "src": "24126:273:1", + "trueBody": { + "id": 3016, + "nodeType": "Block", + "src": "24249:150:1", + "statements": [ + { + "expression": { + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3002, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "24264:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3005, + "indexExpression": { + "expression": { + "id": 3003, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24271:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3004, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24271:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24264:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24348:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "24348:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3006, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "24296:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3009, + "indexExpression": { + "expression": { + "id": 3007, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24303:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24303:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24296:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "24296:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24296:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24264:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "24264:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3018, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24429:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24429:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3020, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "24461:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24429:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3022, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24484:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3023, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24484:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3024, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "24516:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24484:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24429:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3056, + "nodeType": "IfStatement", + "src": "24411:548:1", + "trueBody": { + "id": 3055, + "nodeType": "Block", + "src": "24534:425:1", + "statements": [ + { + "assignments": [ + 3028 + ], + "declarations": [ + { + "constant": false, + "id": 3028, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3055, + "src": "24549:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3027, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24549:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3036, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3033, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24672:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "24672:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3030, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "24612:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3029, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "24597:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24597:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "24597:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24597:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24549:170:1" + }, + { + "expression": { + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3037, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "24736:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3041, + "indexExpression": { + "id": 3038, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "24749:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24736:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3042, + "indexExpression": { + "expression": { + "id": 3039, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24789:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24789:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24736:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3050, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24908:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3051, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "24908:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3043, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "24828:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3045, + "indexExpression": { + "id": 3044, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "24841:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24828:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3048, + "indexExpression": { + "expression": { + "id": 3046, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24863:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24863:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24828:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "24828:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24828:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24736:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3054, + "nodeType": "ExpressionStatement", + "src": "24736:211:1" + } + ] + } + }, + { + "expression": { + "id": 3066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3057, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24971:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3059, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "24971:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3063, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25051:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "25051:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 3060, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25003:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3061, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "25003:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "25003:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25003:83:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24971:115:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3067, + "nodeType": "ExpressionStatement", + "src": "24971:115:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3069, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25135:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3070, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "25135:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3071, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25179:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "25179:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3073, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25215:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "25215:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3075, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "25254:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_BUYER", + "nodeType": "MemberAccess", + "src": "25254:25:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 3068, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "25099:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 3077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25099:191:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3078, + "nodeType": "ExpressionStatement", + "src": "25099:191:1" + } + ] + }, + "documentation": { + "id": 2988, + "nodeType": "StructuredDocumentation", + "src": "23688:323:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if voucher had been redeemed, or the seller had cancelled.\n All buyer deposit is returned to buyer.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 3080, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeFullHolderDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2990, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 3080, + "src": "24054:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2989, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "24054:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "24053:38:1" + }, + "returnParameters": { + "id": 2992, + "nodeType": "ParameterList", + "parameters": [], + "src": "24115:0:1" + }, + "scope": 4105, + "src": "24017:1281:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3172, + "nodeType": "Block", + "src": "25756:1165:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3086, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25785:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3087, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "25785:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3088, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "25817:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25785:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3090, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25840:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "25840:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3092, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "25872:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25840:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "25785:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3110, + "nodeType": "IfStatement", + "src": "25767:273:1", + "trueBody": { + "id": 3109, + "nodeType": "Block", + "src": "25890:150:1", + "statements": [ + { + "expression": { + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3095, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "25905:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3098, + "indexExpression": { + "expression": { + "id": 3096, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25912:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "25912:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "25905:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3104, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25989:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3105, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "25989:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3099, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "25937:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3102, + "indexExpression": { + "expression": { + "id": 3100, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25944:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "25944:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25937:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "25937:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25937:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25905:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3108, + "nodeType": "ExpressionStatement", + "src": "25905:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3111, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26070:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "26070:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3113, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "26102:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "26070:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3115, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26125:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "26125:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3117, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "26157:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "26125:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26070:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3149, + "nodeType": "IfStatement", + "src": "26052:548:1", + "trueBody": { + "id": 3148, + "nodeType": "Block", + "src": "26175:425:1", + "statements": [ + { + "assignments": [ + 3121 + ], + "declarations": [ + { + "constant": false, + "id": 3121, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3148, + "src": "26190:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3120, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26190:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3129, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3126, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26313:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "26313:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3123, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "26253:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3122, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "26238:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26238:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "26238:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26238:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26190:170:1" + }, + { + "expression": { + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3130, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "26377:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3134, + "indexExpression": { + "id": 3131, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3121, + "src": "26390:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26377:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3135, + "indexExpression": { + "expression": { + "id": 3132, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26430:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "26430:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "26377:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3143, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26549:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "26549:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3136, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "26469:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3138, + "indexExpression": { + "id": 3137, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3121, + "src": "26482:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26469:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3141, + "indexExpression": { + "expression": { + "id": 3139, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26504:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3140, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "26504:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26469:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "26469:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26469:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26377:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "26377:211:1" + } + ] + } + }, + { + "expression": { + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3150, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26612:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "26612:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3156, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26688:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3157, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "26688:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 3153, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26642:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "26642:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "26642:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26642:81:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26612:111:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3160, + "nodeType": "ExpressionStatement", + "src": "26612:111:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3162, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26772:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3163, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "26772:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3164, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "26816:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 3165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26816:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3166, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26838:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "26838:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3168, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "26877:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 3169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_BUYER", + "nodeType": "MemberAccess", + "src": "26877:25:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 3161, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "26736:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26736:177:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3171, + "nodeType": "ExpressionStatement", + "src": "26736:177:1" + } + ] + }, + "documentation": { + "id": 3081, + "nodeType": "StructuredDocumentation", + "src": "25306:323:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if voucher had not been redeemed or cancelled after finalization.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\n All buyer deposit goes to Boson." + }, + "id": 3173, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeHolderDepositOnNotRedeemedNotCancelled", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3083, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 3173, + "src": "25703:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 3082, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "25703:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "25692:54:1" + }, + "returnParameters": { + "id": 3085, + "nodeType": "ParameterList", + "parameters": [], + "src": "25756:0:1" + }, + "scope": 4105, + "src": "25635:1286:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8691 + ], + "body": { + "id": 3284, + "nodeType": "Block", + "src": "27637:1181:1", + "statements": [ + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "deposit", + "nodeType": "VariableDeclaration", + "scope": 3284, + "src": "27648:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3188, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27648:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3196, + "initialValue": { + "arguments": [ + { + "id": 3194, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "27726:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3191, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "27694:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3190, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "27679:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27679:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSellerDeposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9480, + "src": "27679:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256)" + } + }, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27679:62:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27648:93:1" + }, + { + "assignments": [ + 3198 + ], + "declarations": [ + { + "constant": false, + "id": 3198, + "mutability": "mutable", + "name": "depositAmount", + "nodeType": "VariableDeclaration", + "scope": 3284, + "src": "27754:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3197, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27754:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3203, + "initialValue": { + "arguments": [ + { + "id": 3201, + "name": "_burnedQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3178, + "src": "27790:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3199, + "name": "deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "27778:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "27778:11:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27778:23:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27754:47:1" + }, + { + "assignments": [ + 3205 + ], + "declarations": [ + { + "constant": false, + "id": 3205, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 3284, + "src": "27814:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3204, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "27814:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3212, + "initialValue": { + "arguments": [ + { + "id": 3210, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "27921:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3207, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "27864:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3206, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "27849:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27849:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "27849:53:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 3211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27849:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27814:136:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3214, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "27985:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 3215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28001:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27985:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3217, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28006:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 3218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28023:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "28006:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "27985:39:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 3221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28039:24:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 3213, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27963:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27963:111:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3223, + "nodeType": "ExpressionStatement", + "src": "27963:111:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3224, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28091:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3225, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "28108:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28091:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3227, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28118:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3228, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "28135:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28118:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "28091:50:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3243, + "nodeType": "IfStatement", + "src": "28087:141:1", + "trueBody": { + "id": 3242, + "nodeType": "Block", + "src": "28143:85:1", + "statements": [ + { + "expression": { + "id": 3240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3231, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "28158:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3233, + "indexExpression": { + "id": 3232, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28165:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28158:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3238, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3198, + "src": "28202:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3234, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "28179:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3236, + "indexExpression": { + "id": 3235, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28186:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28179:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "28179:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28179:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28158:58:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3241, + "nodeType": "ExpressionStatement", + "src": "28158:58:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3244, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28244:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3245, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "28261:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28244:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3247, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28271:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3248, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "28288:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28271:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "28244:50:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3276, + "nodeType": "IfStatement", + "src": "28240:420:1", + "trueBody": { + "id": 3275, + "nodeType": "Block", + "src": "28296:364:1", + "statements": [ + { + "assignments": [ + 3252 + ], + "declarations": [ + { + "constant": false, + "id": 3252, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3275, + "src": "28311:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3251, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28311:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3259, + "initialValue": { + "arguments": [ + { + "id": 3257, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "28434:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3254, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "28374:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3253, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "28359:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28359:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "28359:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28359:108:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28311:156:1" + }, + { + "expression": { + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3260, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "28484:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3263, + "indexExpression": { + "id": 3261, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3252, + "src": "28497:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28484:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3264, + "indexExpression": { + "id": 3262, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28519:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28484:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3271, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3198, + "src": "28634:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3265, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "28533:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3267, + "indexExpression": { + "id": 3266, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3252, + "src": "28564:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28533:66:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3269, + "indexExpression": { + "id": 3268, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28600:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28533:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "28533:100:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28533:115:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28484:164:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3274, + "nodeType": "ExpressionStatement", + "src": "28484:164:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 3278, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28704:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 3279, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3198, + "src": "28729:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3280, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28757:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3281, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "28785:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3277, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "28672:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28672:138:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3283, + "nodeType": "ExpressionStatement", + "src": "28672:138:1" + } + ] + }, + "documentation": { + "id": 3174, + "nodeType": "StructuredDocumentation", + "src": "26929:522:1", + "text": " @notice External function for withdrawing deposits. Caller must be the seller of the goods, otherwise reverts.\n @notice Seller triggers withdrawals of remaining deposits for a given supply, in case the voucher set is no longer in exchange.\n @param _tokenIdSupply an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for\n @param _burnedQty burned quantity that the deposits should be withdrawn for\n @param _msgSender owner of the voucher set" + }, + "functionSelector": "5321847e", + "id": 3285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3184, + "modifierName": { + "id": 3183, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "27609:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27609:12:1" + }, + { + "id": 3186, + "modifierName": { + "id": 3185, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "27622:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27622:14:1" + } + ], + "name": "withdrawDepositsSe", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3182, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "27600:8:1" + }, + "parameters": { + "id": 3181, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3176, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 3285, + "src": "27495:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27495:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3178, + "mutability": "mutable", + "name": "_burnedQty", + "nodeType": "VariableDeclaration", + "scope": 3285, + "src": "27528:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27528:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3180, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 3285, + "src": "27557:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 3179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27557:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "src": "27484:106:1" + }, + "returnParameters": { + "id": 3187, + "nodeType": "ParameterList", + "parameters": [], + "src": "27637:0:1" + }, + "scope": 4105, + "src": "27457:1361:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 3366, + "nodeType": "Block", + "src": "29675:802:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3298, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "29694:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29716:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29708:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3299, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29708:7:1", + "typeDescriptions": {} + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29708:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "29694:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29720:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3297, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29686:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29686:56:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3306, + "nodeType": "ExpressionStatement", + "src": "29686:56:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3308, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "29851:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29861:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29851:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "", + "id": 3311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29864:2:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 3307, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29843:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29843:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3313, + "nodeType": "ExpressionStatement", + "src": "29843:24:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3314, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "29884:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3315, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "29902:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29884:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3317, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "29912:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3318, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "29930:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29912:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "29884:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3337, + "nodeType": "IfStatement", + "src": "29880:189:1", + "trueBody": { + "id": 3336, + "nodeType": "Block", + "src": "29938:131:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3326, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "29983:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3323, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "29961:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29953:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 3321, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29953:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 3324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29953:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sendValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 12844, + "src": "29953:29:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29953:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3328, + "nodeType": "ExpressionStatement", + "src": "29953:38:1" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3330, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "30025:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "30025:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 3332, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "30037:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3333, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "30049:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3329, + "name": "LogWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "30011:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30011:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3335, + "nodeType": "EmitStatement", + "src": "30006:51:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3338, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "30085:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3339, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "30103:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "30085:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3341, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "30113:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3342, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "30131:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "30113:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "30085:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3365, + "nodeType": "IfStatement", + "src": "30081:389:1", + "trueBody": { + "id": 3364, + "nodeType": "Block", + "src": "30139:331:1", + "statements": [ + { + "assignments": [ + 3346 + ], + "declarations": [ + { + "constant": false, + "id": 3346, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 3364, + "src": "30154:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3345, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30154:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3353, + "initialValue": { + "arguments": [ + { + "id": 3351, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "30272:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3348, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "30214:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3347, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "30199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30199:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "30199:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30199:106:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30154:151:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3358, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "30370:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3357, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "30363:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$12577_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 3359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30363:25:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + }, + { + "id": 3360, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "30407:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3361, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "30436:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3354, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12790, + "src": "30322:9:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeERC20_$12790_$", + "typeString": "type(library SafeERC20)" + } + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 12611, + "src": "30322:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12577_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30322:136:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3363, + "nodeType": "ExpressionStatement", + "src": "30322:136:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 3286, + "nodeType": "StructuredDocumentation", + "src": "28826:681:1", + "text": " @notice Internal function for withdrawing payments.\n As unbelievable as it is, neither .send() nor .transfer() are now secure to use due to EIP-1884\n So now transferring funds via the last remaining option: .call()\n See https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/\n @param _recipient address of the account receiving funds from the escrow\n @param _amount amount to be released from escrow\n @param _paymentMethod payment method that should be used to determine, how to do the payouts\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to" + }, + "id": 3367, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawPayments", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3295, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3288, + "mutability": "mutable", + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29550:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3287, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29550:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3290, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29579:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29579:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3292, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29605:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3291, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "29605:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3294, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29636:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29636:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29539:126:1" + }, + "returnParameters": { + "id": 3296, + "nodeType": "ParameterList", + "parameters": [], + "src": "29675:0:1" + }, + "scope": 4105, + "src": "29513:964:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3448, + "nodeType": "Block", + "src": "31068:810:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3380, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31087:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31109:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31101:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3381, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31101:7:1", + "typeDescriptions": {} + } + }, + "id": 3384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31101:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "31087:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31113:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3379, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31079:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31079:56:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3388, + "nodeType": "ExpressionStatement", + "src": "31079:56:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3390, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31244:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 3391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31254:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31244:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "", + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31257:2:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 3389, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31236:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31236:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3395, + "nodeType": "ExpressionStatement", + "src": "31236:24:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3396, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31277:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3397, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "31295:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31277:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3399, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31305:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3400, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "31323:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31305:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31277:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3419, + "nodeType": "IfStatement", + "src": "31273:189:1", + "trueBody": { + "id": 3418, + "nodeType": "Block", + "src": "31331:131:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3408, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31376:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3405, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31354:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31346:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 3403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31346:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 3406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31346:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 3407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sendValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 12844, + "src": "31346:29:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31346:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3410, + "nodeType": "ExpressionStatement", + "src": "31346:38:1" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3412, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "31418:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "31418:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 3414, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31430:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3415, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31442:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3411, + "name": "LogWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "31404:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31404:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3417, + "nodeType": "EmitStatement", + "src": "31399:51:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3420, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31478:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3421, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "31496:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31478:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3423, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31506:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3424, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "31524:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31506:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31478:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3447, + "nodeType": "IfStatement", + "src": "31474:397:1", + "trueBody": { + "id": 3446, + "nodeType": "Block", + "src": "31532:339:1", + "statements": [ + { + "assignments": [ + 3428 + ], + "declarations": [ + { + "constant": false, + "id": 3428, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3446, + "src": "31547:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31547:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3435, + "initialValue": { + "arguments": [ + { + "id": 3433, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3376, + "src": "31670:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3430, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "31610:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3429, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "31595:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31595:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "31595:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31595:108:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31547:156:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3440, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3428, + "src": "31768:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3439, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "31761:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$12577_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31761:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + }, + { + "id": 3442, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31808:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3443, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31837:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3436, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12790, + "src": "31720:9:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeERC20_$12790_$", + "typeString": "type(library SafeERC20)" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 12611, + "src": "31720:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12577_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31720:139:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3445, + "nodeType": "ExpressionStatement", + "src": "31720:139:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 3368, + "nodeType": "StructuredDocumentation", + "src": "30485:415:1", + "text": " @notice Internal function for withdrawing deposits.\n @param _recipient address of the account receiving funds from the escrow\n @param _amount amount to be released from escrow\n @param _paymentMethod payment method that should be used to determine, how to do the payouts\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to" + }, + "id": 3449, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawDeposits", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3370, + "mutability": "mutable", + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "30943:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30943:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3372, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "30972:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3371, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30972:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3374, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "30998:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3373, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "30998:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3376, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "31029:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3375, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31029:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30932:126:1" + }, + "returnParameters": { + "id": 3378, + "nodeType": "ParameterList", + "parameters": [], + "src": "31068:0:1" + }, + "scope": 4105, + "src": "30906:972:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8777 + ], + "body": { + "id": 3478, + "nodeType": "Block", + "src": "32152:295:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3459, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3452, + "src": "32171:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32202:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3461, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32194:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32194:7:1", + "typeDescriptions": {} + } + }, + "id": 3463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32194:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "32171:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32206:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3458, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32163:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32163:65:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3467, + "nodeType": "ExpressionStatement", + "src": "32163:65:1" + }, + { + "expression": { + "id": 3470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3468, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "32331:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3469, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3452, + "src": "32352:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "32331:40:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3471, + "nodeType": "ExpressionStatement", + "src": "32331:40:1" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3473, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3452, + "src": "32407:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3474, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32428:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32428:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 3472, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1658, + "src": "32389:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32389:50:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3477, + "nodeType": "EmitStatement", + "src": "32384:55:1" + } + ] + }, + "documentation": { + "id": 3450, + "nodeType": "StructuredDocumentation", + "src": "31886:140:1", + "text": " @notice Set the address of the BR contract\n @param _bosonRouterAddress The address of the Boson Route contract" + }, + "functionSelector": "bd17de40", + "id": 3479, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3456, + "modifierName": { + "id": 3455, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "32137:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "32137:9:1" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3454, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32119:8:1" + }, + "parameters": { + "id": 3453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3452, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 3479, + "src": "32063:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32063:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "32062:29:1" + }, + "returnParameters": { + "id": 3457, + "nodeType": "ParameterList", + "parameters": [], + "src": "32152:0:1" + }, + "scope": 4105, + "src": "32032:415:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8783 + ], + "body": { + "id": 3508, + "nodeType": "Block", + "src": "32742:312:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3489, + "name": "_tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3482, + "src": "32768:22:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32802:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32794:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3490, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32794:7:1", + "typeDescriptions": {} + } + }, + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32794:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "32768:36:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32806:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3488, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32760:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32760:68:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3497, + "nodeType": "ExpressionStatement", + "src": "32760:68:1" + }, + { + "expression": { + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3498, + "name": "tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1633, + "src": "32929:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3499, + "name": "_tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3482, + "src": "32953:22:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "32929:46:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3501, + "nodeType": "ExpressionStatement", + "src": "32929:46:1" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3503, + "name": "_tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3482, + "src": "33011:22:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3504, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "33035:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "33035:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 3502, + "name": "LogTokenContractSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "32991:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32991:55:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3507, + "nodeType": "EmitStatement", + "src": "32986:60:1" + } + ] + }, + "documentation": { + "id": 3480, + "nodeType": "StructuredDocumentation", + "src": "32455:156:1", + "text": " @notice Set the address of the ERC1155ERC721 contract\n @param _tokensContractAddress The address of the ERC1155ERC721 contract" + }, + "functionSelector": "b23d4854", + "id": 3509, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3486, + "modifierName": { + "id": 3485, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "32727:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "32727:9:1" + } + ], + "name": "setTokenContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3484, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32709:8:1" + }, + "parameters": { + "id": 3483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3482, + "mutability": "mutable", + "name": "_tokensContractAddress", + "nodeType": "VariableDeclaration", + "scope": 3509, + "src": "32650:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32650:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "32649:32:1" + }, + "returnParameters": { + "id": 3487, + "nodeType": "ParameterList", + "parameters": [], + "src": "32742:0:1" + }, + "scope": 4105, + "src": "32617:437:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8705 + ], + "body": { + "id": 3530, + "nodeType": "Block", + "src": "33386:69:1", + "statements": [ + { + "expression": { + "id": 3528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3518, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "33397:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3520, + "indexExpression": { + "id": 3519, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "33404:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "33397:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3525, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "33437:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "33437:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3521, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "33416:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3523, + "indexExpression": { + "id": 3522, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "33423:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33416:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "33416:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33416:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33397:50:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3529, + "nodeType": "ExpressionStatement", + "src": "33397:50:1" + } + ] + }, + "documentation": { + "id": 3510, + "nodeType": "StructuredDocumentation", + "src": "33064:191:1", + "text": " @notice Update the amount in escrow of an address with the new value, based on VoucherSet/Voucher interaction\n @param _account The address of an account to update" + }, + "functionSelector": "19946845", + "id": 3531, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3516, + "modifierName": { + "id": 3515, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "33366:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "33366:14:1" + } + ], + "name": "addEscrowAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3514, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "33331:8:1" + }, + "parameters": { + "id": 3513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3512, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 3531, + "src": "33286:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33286:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "33285:18:1" + }, + "returnParameters": { + "id": 3517, + "nodeType": "ParameterList", + "parameters": [], + "src": "33386:0:1" + }, + "scope": 4105, + "src": "33261:194:1", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8715 + ], + "body": { + "id": 3559, + "nodeType": "Block", + "src": "33920:99:1", + "statements": [ + { + "expression": { + "id": 3557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3544, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "33931:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3547, + "indexExpression": { + "id": 3545, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "33944:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33931:20:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3548, + "indexExpression": { + "id": 3546, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3536, + "src": "33952:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "33931:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3555, + "name": "_newAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3538, + "src": "34000:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3549, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "33965:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3551, + "indexExpression": { + "id": 3550, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "33978:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33965:20:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3553, + "indexExpression": { + "id": 3552, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3536, + "src": "33986:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33965:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "33965:34:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33965:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33931:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3558, + "nodeType": "ExpressionStatement", + "src": "33931:80:1" + } + ] + }, + "documentation": { + "id": 3532, + "nodeType": "StructuredDocumentation", + "src": "33463:299:1", + "text": " @notice Update the amount in escrowTokens of an address with the new value, based on VoucherSet/Voucher interaction\n @param _token The address of a token to query\n @param _account The address of an account to query\n @param _newAmount New amount to be set" + }, + "functionSelector": "1429dae8", + "id": 3560, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3542, + "modifierName": { + "id": 3541, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "33905:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "33905:14:1" + } + ], + "name": "addEscrowTokensAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3540, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "33896:8:1" + }, + "parameters": { + "id": 3539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3534, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3560, + "src": "33809:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33809:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3536, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 3560, + "src": "33834:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3535, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33834:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3538, + "mutability": "mutable", + "name": "_newAmount", + "nodeType": "VariableDeclaration", + "scope": 3560, + "src": "33861:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33861:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "33798:88:1" + }, + "returnParameters": { + "id": 3543, + "nodeType": "ParameterList", + "parameters": [], + "src": "33920:0:1" + }, + "scope": 4105, + "src": "33768:251:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8725 + ], + "body": { + "id": 3861, + "nodeType": "Block", + "src": "34516:3061:1", + "statements": [ + { + "assignments": [ + 3574 + ], + "declarations": [ + { + "constant": false, + "id": 3574, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34527:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3573, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34527:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3575, + "nodeType": "VariableDeclarationStatement", + "src": "34527:20:1" + }, + { + "assignments": [ + 3577 + ], + "declarations": [ + { + "constant": false, + "id": 3577, + "mutability": "mutable", + "name": "tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34560:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3576, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34560:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3584, + "initialValue": { + "arguments": [ + { + "id": 3582, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3567, + "src": "34668:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3579, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "34612:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3578, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "34597:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34597:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getIdSupplyFromVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 9488, + "src": "34597:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure external returns (uint256)" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34597:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34560:138:1" + }, + { + "assignments": [ + 3586 + ], + "declarations": [ + { + "constant": false, + "id": 3586, + "mutability": "mutable", + "name": "paymentType", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34711:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3585, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "34711:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3593, + "initialValue": { + "arguments": [ + { + "id": 3591, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "34816:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3588, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "34759:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3587, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "34744:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34744:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "34744:53:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34744:100:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34711:133:1" + }, + { + "assignments": [ + 3595, + 3597 + ], + "declarations": [ + { + "constant": false, + "id": 3595, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34858:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34858:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3597, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34873:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34873:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3604, + "initialValue": { + "arguments": [ + { + "id": 3602, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "34956:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3599, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "34922:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3598, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "34907:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34907:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "34907:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 3603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34907:63:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34857:113:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3605, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "34987:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3606, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "35002:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34987:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3638, + "nodeType": "IfStatement", + "src": "34983:289:1", + "trueBody": { + "id": 3637, + "nodeType": "Block", + "src": "35010:262:1", + "statements": [ + { + "assignments": [ + 3609 + ], + "declarations": [ + { + "constant": false, + "id": 3609, + "mutability": "mutable", + "name": "totalAmount", + "nodeType": "VariableDeclaration", + "scope": 3637, + "src": "35025:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35025:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3614, + "initialValue": { + "arguments": [ + { + "id": 3612, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "35057:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3610, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "35047:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35047:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35047:20:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35025:42:1" + }, + { + "expression": { + "id": 3624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3615, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35157:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3617, + "indexExpression": { + "id": 3616, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35164:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35157:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3622, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3609, + "src": "35191:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3618, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35173:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3620, + "indexExpression": { + "id": 3619, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35180:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35173:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "35173:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35173:30:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35157:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3625, + "nodeType": "ExpressionStatement", + "src": "35157:46:1" + }, + { + "expression": { + "id": 3635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3626, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35218:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3628, + "indexExpression": { + "id": 3627, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35225:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35218:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3633, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3609, + "src": "35248:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3629, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35232:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3631, + "indexExpression": { + "id": 3630, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35239:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35232:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35232:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35232:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35218:42:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3636, + "nodeType": "ExpressionStatement", + "src": "35218:42:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3639, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "35290:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3640, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "35305:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "35290:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3704, + "nodeType": "IfStatement", + "src": "35286:652:1", + "trueBody": { + "id": 3703, + "nodeType": "Block", + "src": "35313:625:1", + "statements": [ + { + "expression": { + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3642, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35411:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3644, + "indexExpression": { + "id": 3643, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35418:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35411:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3649, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "35445:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3645, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35427:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3647, + "indexExpression": { + "id": 3646, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35434:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35427:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "35427:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35427:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35411:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3652, + "nodeType": "ExpressionStatement", + "src": "35411:40:1" + }, + { + "expression": { + "id": 3662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3653, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35466:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3655, + "indexExpression": { + "id": 3654, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35473:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35466:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3660, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "35496:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3656, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35480:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3658, + "indexExpression": { + "id": 3657, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35487:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35480:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35480:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35480:22:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35466:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3663, + "nodeType": "ExpressionStatement", + "src": "35466:36:1" + }, + { + "expression": { + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3664, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35519:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3669, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "35605:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3666, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "35549:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3665, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "35534:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35534:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "35534:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35534:99:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35519:114:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3672, + "nodeType": "ExpressionStatement", + "src": "35519:114:1" + }, + { + "expression": { + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3673, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35745:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3676, + "indexExpression": { + "id": 3674, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35758:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35745:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3677, + "indexExpression": { + "id": 3675, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35772:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35745:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3684, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "35819:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3678, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35781:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3680, + "indexExpression": { + "id": 3679, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35794:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35781:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3682, + "indexExpression": { + "id": 3681, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35808:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35781:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "35781:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35781:48:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35745:84:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3687, + "nodeType": "ExpressionStatement", + "src": "35745:84:1" + }, + { + "expression": { + "id": 3701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3688, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35844:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3691, + "indexExpression": { + "id": 3689, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35857:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35844:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3692, + "indexExpression": { + "id": 3690, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35871:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35844:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3699, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "35914:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3693, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35878:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3695, + "indexExpression": { + "id": 3694, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35891:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35878:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3697, + "indexExpression": { + "id": 3696, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35905:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35878:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35878:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35878:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35844:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3702, + "nodeType": "ExpressionStatement", + "src": "35844:80:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3705, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "35954:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3706, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "35969:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "35954:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3770, + "nodeType": "IfStatement", + "src": "35950:657:1", + "trueBody": { + "id": 3769, + "nodeType": "Block", + "src": "35977:630:1", + "statements": [ + { + "expression": { + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3708, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35992:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3713, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "36076:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3710, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "36022:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3709, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "36007:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36007:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "36007:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36007:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35992:112:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3716, + "nodeType": "ExpressionStatement", + "src": "35992:112:1" + }, + { + "expression": { + "id": 3730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3717, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36225:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3720, + "indexExpression": { + "id": 3718, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36238:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36225:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3721, + "indexExpression": { + "id": 3719, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36252:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36225:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3728, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "36299:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3722, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36261:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3724, + "indexExpression": { + "id": 3723, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36274:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36261:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3726, + "indexExpression": { + "id": 3725, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36288:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36261:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "36261:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36261:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36225:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3731, + "nodeType": "ExpressionStatement", + "src": "36225:80:1" + }, + { + "expression": { + "id": 3745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3732, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36320:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3735, + "indexExpression": { + "id": 3733, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36333:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36320:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3736, + "indexExpression": { + "id": 3734, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36347:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36320:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3743, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "36390:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3737, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36354:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3739, + "indexExpression": { + "id": 3738, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36367:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36354:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3741, + "indexExpression": { + "id": 3740, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36381:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36354:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "36354:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36354:42:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36320:76:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3746, + "nodeType": "ExpressionStatement", + "src": "36320:76:1" + }, + { + "expression": { + "id": 3756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3747, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36496:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3749, + "indexExpression": { + "id": 3748, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36503:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36496:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3754, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "36530:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3750, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36512:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3752, + "indexExpression": { + "id": 3751, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36519:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36512:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "36512:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36512:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36496:44:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3757, + "nodeType": "ExpressionStatement", + "src": "36496:44:1" + }, + { + "expression": { + "id": 3767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3758, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36555:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3760, + "indexExpression": { + "id": 3759, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36562:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36555:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3765, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "36585:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3761, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36569:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3763, + "indexExpression": { + "id": 3762, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36576:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36569:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "36569:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36569:26:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36555:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3768, + "nodeType": "ExpressionStatement", + "src": "36555:40:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3771, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "36623:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3772, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "36638:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36623:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3853, + "nodeType": "IfStatement", + "src": "36619:875:1", + "trueBody": { + "id": 3852, + "nodeType": "Block", + "src": "36646:848:1", + "statements": [ + { + "expression": { + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3774, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36661:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3779, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "36745:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3776, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "36691:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3775, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "36676:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36676:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "36676:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36676:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36661:112:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3782, + "nodeType": "ExpressionStatement", + "src": "36661:112:1" + }, + { + "expression": { + "id": 3796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3783, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36886:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3786, + "indexExpression": { + "id": 3784, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36899:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36886:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3787, + "indexExpression": { + "id": 3785, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36913:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36886:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3794, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "36960:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3788, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36922:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3790, + "indexExpression": { + "id": 3789, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36935:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36922:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3792, + "indexExpression": { + "id": 3791, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36949:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36922:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "36922:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36922:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36886:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3797, + "nodeType": "ExpressionStatement", + "src": "36886:80:1" + }, + { + "expression": { + "id": 3811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3798, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36981:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3801, + "indexExpression": { + "id": 3799, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36994:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36981:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3802, + "indexExpression": { + "id": 3800, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37008:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36981:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3809, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "37051:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3803, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37015:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3805, + "indexExpression": { + "id": 3804, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37028:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37015:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3807, + "indexExpression": { + "id": 3806, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37042:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37015:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "37015:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37015:42:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36981:76:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3812, + "nodeType": "ExpressionStatement", + "src": "36981:76:1" + }, + { + "expression": { + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3813, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37074:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3818, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "37160:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3815, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "37104:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3814, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "37089:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37089:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "37089:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37089:99:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "37074:114:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3821, + "nodeType": "ExpressionStatement", + "src": "37074:114:1" + }, + { + "expression": { + "id": 3835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3822, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37301:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3825, + "indexExpression": { + "id": 3823, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37314:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37301:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3826, + "indexExpression": { + "id": 3824, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "37328:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "37301:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3833, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "37375:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3827, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37337:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3829, + "indexExpression": { + "id": 3828, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37350:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37337:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3831, + "indexExpression": { + "id": 3830, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "37364:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37337:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "37337:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37337:48:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37301:84:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3836, + "nodeType": "ExpressionStatement", + "src": "37301:84:1" + }, + { + "expression": { + "id": 3850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3837, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37400:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3840, + "indexExpression": { + "id": 3838, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37413:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37400:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3841, + "indexExpression": { + "id": 3839, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37427:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "37400:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3848, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "37470:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3842, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37434:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3844, + "indexExpression": { + "id": 3843, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37447:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37434:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3846, + "indexExpression": { + "id": 3845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37461:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37434:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "37434:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37434:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37400:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3851, + "nodeType": "ExpressionStatement", + "src": "37400:80:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 3858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37565:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 3855, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "37522:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3854, + "name": "IBosonRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8660, + "src": "37509:12:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBosonRouter_$8660_$", + "typeString": "type(contract IBosonRouter)" + } + }, + "id": 3856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBosonRouter_$8660", + "typeString": "contract IBosonRouter" + } + }, + "id": 3857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "incrementCorrelationId", + "nodeType": "MemberAccess", + "referencedDeclaration": 8633, + "src": "37509:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3860, + "nodeType": "ExpressionStatement", + "src": "37509:60:1" + } + ] + }, + "documentation": { + "id": 3561, + "nodeType": "StructuredDocumentation", + "src": "34027:333:1", + "text": " @notice Hook which will be triggered when a _tokenIdVoucher will be transferred. Escrow funds should be allocated to the new owner.\n @param _from prev owner of the _tokenIdVoucher\n @param _to next owner of the _tokenIdVoucher\n @param _tokenIdVoucher _tokenIdVoucher that has been transferred" + }, + "functionSelector": "a2919f63", + "id": 3862, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3571, + "modifierName": { + "id": 3570, + "name": "onlyTokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1753, + "src": "34497:18:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "34497:18:1" + } + ], + "name": "onERC721Transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3569, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "34488:8:1" + }, + "parameters": { + "id": 3568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3563, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3862, + "src": "34402:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34402:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3565, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3862, + "src": "34426:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34426:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3567, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 3862, + "src": "34448:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3566, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34448:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "34391:87:1" + }, + "returnParameters": { + "id": 3572, + "nodeType": "ParameterList", + "parameters": [], + "src": "34516:0:1" + }, + "scope": 4105, + "src": "34366:3211:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8737 + ], + "body": { + "id": 4018, + "nodeType": "Block", + "src": "38187:1594:1", + "statements": [ + { + "assignments": [ + 3878 + ], + "declarations": [ + { + "constant": false, + "id": 3878, + "mutability": "mutable", + "name": "paymentType", + "nodeType": "VariableDeclaration", + "scope": 4018, + "src": "38198:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3877, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38198:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3885, + "initialValue": { + "arguments": [ + { + "id": 3883, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "38303:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3880, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "38246:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3879, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "38231:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38231:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "38231:53:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 3884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38231:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38198:134:1" + }, + { + "assignments": [ + 3887 + ], + "declarations": [ + { + "constant": false, + "id": 3887, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 4018, + "src": "38345:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3886, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38345:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3888, + "nodeType": "VariableDeclarationStatement", + "src": "38345:17:1" + }, + { + "assignments": [ + 3890 + ], + "declarations": [ + { + "constant": false, + "id": 3890, + "mutability": "mutable", + "name": "totalAmount", + "nodeType": "VariableDeclaration", + "scope": 4018, + "src": "38373:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38373:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3891, + "nodeType": "VariableDeclarationStatement", + "src": "38373:19:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3892, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38409:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3893, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "38424:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38409:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3895, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38434:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3896, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "38449:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38434:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "38409:46:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3938, + "nodeType": "IfStatement", + "src": "38405:428:1", + "trueBody": { + "id": 3937, + "nodeType": "Block", + "src": "38457:376:1", + "statements": [ + { + "expression": { + "id": 3906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3899, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "38472:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3904, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "38549:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3901, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "38499:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3900, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "38484:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38484:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSellerDeposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9480, + "src": "38484:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256)" + } + }, + "id": 3905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38484:94:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38472:106:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3907, + "nodeType": "ExpressionStatement", + "src": "38472:106:1" + }, + { + "expression": { + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3908, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "38593:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3911, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3871, + "src": "38621:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3909, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "38607:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "38607:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38607:21:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38593:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3914, + "nodeType": "ExpressionStatement", + "src": "38593:35:1" + }, + { + "expression": { + "id": 3924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3915, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38718:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3917, + "indexExpression": { + "id": 3916, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "38725:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "38718:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3922, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "38752:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3918, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38734:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3920, + "indexExpression": { + "id": 3919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "38741:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38734:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "38734:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38734:30:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38718:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3925, + "nodeType": "ExpressionStatement", + "src": "38718:46:1" + }, + { + "expression": { + "id": 3935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3926, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38779:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3928, + "indexExpression": { + "id": 3927, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "38786:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "38779:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3933, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "38809:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3929, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38793:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3931, + "indexExpression": { + "id": 3930, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "38800:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38793:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "38793:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38793:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38779:42:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3936, + "nodeType": "ExpressionStatement", + "src": "38779:42:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3939, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38849:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3940, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "38864:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38849:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3942, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38874:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3943, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "38889:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38874:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "38849:46:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4002, + "nodeType": "IfStatement", + "src": "38845:730:1", + "trueBody": { + "id": 4001, + "nodeType": "Block", + "src": "38897:678:1", + "statements": [ + { + "assignments": [ + 3947 + ], + "declarations": [ + { + "constant": false, + "id": 3947, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 4001, + "src": "38912:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38912:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3954, + "initialValue": { + "arguments": [ + { + "id": 3952, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "39034:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3949, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "38974:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3948, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "38959:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38959:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "38959:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38959:108:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38912:155:1" + }, + { + "expression": { + "id": 3962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3955, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "39084:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3960, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "39161:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3957, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "39111:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3956, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "39096:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39096:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSellerDeposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9480, + "src": "39096:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256)" + } + }, + "id": 3961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39096:94:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39084:106:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3963, + "nodeType": "ExpressionStatement", + "src": "39084:106:1" + }, + { + "expression": { + "id": 3969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3964, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "39205:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3967, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3871, + "src": "39233:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3965, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "39219:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "39219:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39219:21:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39205:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3970, + "nodeType": "ExpressionStatement", + "src": "39205:35:1" + }, + { + "expression": { + "id": 3984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3971, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39352:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3974, + "indexExpression": { + "id": 3972, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39365:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39352:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3975, + "indexExpression": { + "id": 3973, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "39386:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "39352:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3982, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "39440:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3976, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39395:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3978, + "indexExpression": { + "id": 3977, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39408:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39395:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3980, + "indexExpression": { + "id": 3979, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "39429:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39395:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "39395:44:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39395:57:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39352:100:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3985, + "nodeType": "ExpressionStatement", + "src": "39352:100:1" + }, + { + "expression": { + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3986, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39467:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3989, + "indexExpression": { + "id": 3987, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39480:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39467:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3990, + "indexExpression": { + "id": 3988, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39501:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "39467:38:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3997, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "39551:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3991, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39508:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3993, + "indexExpression": { + "id": 3992, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39521:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39508:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3995, + "indexExpression": { + "id": 3994, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39542:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39508:38:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "39508:42:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39508:55:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39467:96:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4000, + "nodeType": "ExpressionStatement", + "src": "39467:96:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4007, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "39657:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4008, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39686:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 4004, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "39602:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4003, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "39587:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 4005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39587:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 4006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setSupplyHolderOnTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 9420, + "src": "39587:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 4009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39587:113:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4010, + "nodeType": "ExpressionStatement", + "src": "39587:113:1" + }, + { + "expression": { + "arguments": [ + { + "id": 4015, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39769:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 4012, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "39726:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4011, + "name": "IBosonRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8660, + "src": "39713:12:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBosonRouter_$8660_$", + "typeString": "type(contract IBosonRouter)" + } + }, + "id": 4013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39713:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBosonRouter_$8660", + "typeString": "contract IBosonRouter" + } + }, + "id": 4014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "incrementCorrelationId", + "nodeType": "MemberAccess", + "referencedDeclaration": 8633, + "src": "39713:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39713:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4017, + "nodeType": "ExpressionStatement", + "src": "39713:60:1" + } + ] + }, + "documentation": { + "id": 3863, + "nodeType": "StructuredDocumentation", + "src": "37585:421:1", + "text": " @notice After the transfer happens the _tokenSupplyId should be updated in the promise. Escrow funds for the seller's deposits (If in ETH) should be allocated to the new owner as well.\n @param _from prev owner of the _tokenSupplyId\n @param _to nex owner of the _tokenSupplyId\n @param _tokenSupplyId _tokenSupplyId for transfer\n @param _value qty which has been transferred" + }, + "functionSelector": "5711fd77", + "id": 4019, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3875, + "modifierName": { + "id": 3874, + "name": "onlyTokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1753, + "src": "38168:18:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "38168:18:1" + } + ], + "name": "onERC1155Transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3873, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38159:8:1" + }, + "parameters": { + "id": 3872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3865, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38049:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3864, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38049:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3867, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38073:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3866, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38073:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3869, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38095:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3868, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38095:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3871, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38128:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38128:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38038:111:1" + }, + "returnParameters": { + "id": 3876, + "nodeType": "ParameterList", + "parameters": [], + "src": "38187:0:1" + }, + "scope": 4105, + "src": "38012:1769:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 4031, + "nodeType": "Block", + "src": "39900:77:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4024, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "39919:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "39919:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4026, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "39933:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "39919:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5041594545", + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39953:15:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e5e5ab0b8db5cdc836d0a25c05428d3402358fcbc24bfa86b879a92a492268a", + "typeString": "literal_string \"INVALID_PAYEE\"" + }, + "value": "INVALID_PAYEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e5e5ab0b8db5cdc836d0a25c05428d3402358fcbc24bfa86b879a92a492268a", + "typeString": "literal_string \"INVALID_PAYEE\"" + } + ], + "id": 4023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "39911:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39911:58:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4030, + "nodeType": "ExpressionStatement", + "src": "39911:58:1" + } + ] + }, + "documentation": { + "id": 4020, + "nodeType": "StructuredDocumentation", + "src": "39789:78:1", + "text": " @notice Only accept ETH via fallback from the BR Contract" + }, + "id": 4032, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4021, + "nodeType": "ParameterList", + "parameters": [], + "src": "39880:2:1" + }, + "returnParameters": { + "id": 4022, + "nodeType": "ParameterList", + "parameters": [], + "src": "39900:0:1" + }, + "scope": 4105, + "src": "39873:104:1", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8743 + ], + "body": { + "id": 4041, + "nodeType": "Block", + "src": "40309:39:1", + "statements": [ + { + "expression": { + "id": 4039, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "40327:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4038, + "id": 4040, + "nodeType": "Return", + "src": "40320:20:1" + } + ] + }, + "documentation": { + "id": 4033, + "nodeType": "StructuredDocumentation", + "src": "40061:122:1", + "text": " @notice Get the address of Voucher Kernel contract\n @return Address of Voucher Kernel contract" + }, + "functionSelector": "e3f5d2d5", + "id": 4042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4035, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40268:8:1" + }, + "parameters": { + "id": 4034, + "nodeType": "ParameterList", + "parameters": [], + "src": "40221:2:1" + }, + "returnParameters": { + "id": 4038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4037, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4042, + "src": "40295:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40295:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "40294:9:1" + }, + "scope": 4105, + "src": "40189:159:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8749 + ], + "body": { + "id": 4051, + "nodeType": "Block", + "src": "40598:44:1", + "statements": [ + { + "expression": { + "id": 4049, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "40616:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4048, + "id": 4050, + "nodeType": "Return", + "src": "40609:25:1" + } + ] + }, + "documentation": { + "id": 4043, + "nodeType": "StructuredDocumentation", + "src": "40356:118:1", + "text": " @notice Get the address of Boson Router contract\n @return Address of Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 4052, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4045, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40557:8:1" + }, + "parameters": { + "id": 4044, + "nodeType": "ParameterList", + "parameters": [], + "src": "40510:2:1" + }, + "returnParameters": { + "id": 4048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4047, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4052, + "src": "40584:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4046, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40584:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "40583:9:1" + }, + "scope": 4105, + "src": "40480:162:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8755 + ], + "body": { + "id": 4061, + "nodeType": "Block", + "src": "40897:47:1", + "statements": [ + { + "expression": { + "id": 4059, + "name": "tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1633, + "src": "40915:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4058, + "id": 4060, + "nodeType": "Return", + "src": "40908:28:1" + } + ] + }, + "documentation": { + "id": 4053, + "nodeType": "StructuredDocumentation", + "src": "40650:120:1", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 4062, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4055, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40856:8:1" + }, + "parameters": { + "id": 4054, + "nodeType": "ParameterList", + "parameters": [], + "src": "40809:2:1" + }, + "returnParameters": { + "id": 4058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4057, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4062, + "src": "40883:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4056, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40883:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "40882:9:1" + }, + "scope": 4105, + "src": "40776:168:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8761 + ], + "body": { + "id": 4071, + "nodeType": "Block", + "src": "41146:39:1", + "statements": [ + { + "expression": { + "id": 4069, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "41164:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4068, + "id": 4070, + "nodeType": "Return", + "src": "41157:20:1" + } + ] + }, + "documentation": { + "id": 4063, + "nodeType": "StructuredDocumentation", + "src": "40952:121:1", + "text": " @notice Ensure whether or not contract has been set to disaster state \n @return disasterState" + }, + "functionSelector": "598e2e0c", + "id": 4072, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDisasterStateSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4065, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41123:8:1" + }, + "parameters": { + "id": 4064, + "nodeType": "ParameterList", + "parameters": [], + "src": "41106:2:1" + }, + "returnParameters": { + "id": 4068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4072, + "src": "41140:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4066, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "41140:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "41139:6:1" + }, + "scope": 4105, + "src": "41079:106:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8699 + ], + "body": { + "id": 4085, + "nodeType": "Block", + "src": "41498:42:1", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 4081, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "41516:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4083, + "indexExpression": { + "id": 4082, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4075, + "src": "41523:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41516:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4080, + "id": 4084, + "nodeType": "Return", + "src": "41509:23:1" + } + ] + }, + "documentation": { + "id": 4073, + "nodeType": "StructuredDocumentation", + "src": "41193:174:1", + "text": " @notice Get the amount in escrow of an address\n @param _account The address of an account to query\n @return The balance in escrow" + }, + "functionSelector": "d1358365", + "id": 4086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEscrowAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4077, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41457:8:1" + }, + "parameters": { + "id": 4076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4075, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "41398:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41398:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41397:18:1" + }, + "returnParameters": { + "id": 4080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "41484:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41484:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41483:9:1" + }, + "scope": 4105, + "src": "41373:167:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8771 + ], + "body": { + "id": 4103, + "nodeType": "Block", + "src": "41930:56:1", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4097, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "41948:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4099, + "indexExpression": { + "id": 4098, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4089, + "src": "41961:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41948:20:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4101, + "indexExpression": { + "id": 4100, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "41969:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41948:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4096, + "id": 4102, + "nodeType": "Return", + "src": "41941:37:1" + } + ] + }, + "documentation": { + "id": 4087, + "nodeType": "StructuredDocumentation", + "src": "41548:229:1", + "text": " @notice Get the amount in escrow of an address\n @param _token The address of a token to query\n @param _account The address of an account to query\n @return The balance in escrow" + }, + "functionSelector": "2a950716", + "id": 4104, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEscrowTokensAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4093, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41889:8:1" + }, + "parameters": { + "id": 4092, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4089, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 4104, + "src": "41814:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4088, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41814:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4091, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 4104, + "src": "41830:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41830:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41813:34:1" + }, + "returnParameters": { + "id": 4096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4095, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4104, + "src": "41916:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41916:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41915:9:1" + }, + "scope": 4105, + "src": "41783:203:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4106, + "src": "789:41200:1" + } + ], + "src": "47:41944:1" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/Cashier.sol", + "exportedSymbols": { + "Cashier": [ + 4105 + ] + }, + "id": 4106, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1596, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "47:22:1" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 1597, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 13734, + "src": "73:59:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "id": 1598, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12791, + "src": "134:59:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 1599, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12500, + "src": "195:51:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 1600, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12145, + "src": "248:52:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 1601, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 13694, + "src": "302:52:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 1602, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 13087, + "src": "356:51:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 1603, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 12578, + "src": "409:56:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 1604, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 9644, + "src": "467:41:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/ICashier.sol", + "file": "./interfaces/ICashier.sol", + "id": 1605, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 8785, + "src": "510:35:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IBosonRouter.sol", + "file": "./interfaces/IBosonRouter.sol", + "id": 1606, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 8661, + "src": "547:39:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 1607, + "nodeType": "ImportDirective", + "scope": 4106, + "sourceUnit": 6141, + "src": "588:28:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1609, + "name": "ICashier", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 8784, + "src": "809:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICashier_$8784", + "typeString": "contract ICashier" + } + }, + "id": 1610, + "nodeType": "InheritanceSpecifier", + "src": "809:8:1" + }, + { + "baseName": { + "id": 1611, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "819:12:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 1612, + "nodeType": "InheritanceSpecifier", + "src": "819:12:1" + }, + { + "baseName": { + "id": 1613, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13733, + "src": "833:15:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$13733", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 1614, + "nodeType": "InheritanceSpecifier", + "src": "833:15:1" + }, + { + "baseName": { + "id": 1615, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "850:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 1616, + "nodeType": "InheritanceSpecifier", + "src": "850:7:1" + }, + { + "baseName": { + "id": 1617, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "859:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 1618, + "nodeType": "InheritanceSpecifier", + "src": "859:8:1" + } + ], + "contractDependencies": [ + 6140, + 8784, + 12144, + 13109, + 13693, + 13733 + ], + "contractKind": "contract", + "documentation": { + "id": 1608, + "nodeType": "StructuredDocumentation", + "src": "620:167:1", + "text": " @title Contract for managing funds\n Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/" + }, + "fullyImplemented": true, + "id": 4105, + "linearizedBaseContracts": [ + 4105, + 13693, + 12144, + 13109, + 13733, + 6140, + 8784 + ], + "name": "Cashier", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1621, + "libraryName": { + "id": 1619, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12790, + "src": "881:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$12790", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "875:27:1", + "typeName": { + "id": 1620, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12577, + "src": "895:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + } + }, + { + "id": 1624, + "libraryName": { + "id": 1622, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "914:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "908:34:1", + "typeName": { + "id": 1623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "926:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + }, + { + "id": 1627, + "libraryName": { + "id": 1625, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "954:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "948:27:1", + "typeName": { + "id": 1626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "967:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 1629, + "mutability": "mutable", + "name": "voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "983:29:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1628, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "983:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1631, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1019:34:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1630, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1019:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1633, + "mutability": "mutable", + "name": "tokensContractAddress", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1060:37:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1632, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1060:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1635, + "mutability": "mutable", + "name": "disasterState", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1104:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1634, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1104:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "private" + }, + { + "canonicalName": "Cashier.PaymentType", + "id": 1639, + "members": [ + { + "id": 1636, + "name": "PAYMENT", + "nodeType": "EnumValue", + "src": "1157:7:1" + }, + { + "id": 1637, + "name": "DEPOSIT_SELLER", + "nodeType": "EnumValue", + "src": "1166:14:1" + }, + { + "id": 1638, + "name": "DEPOSIT_BUYER", + "nodeType": "EnumValue", + "src": "1182:13:1" + } + ], + "name": "PaymentType", + "nodeType": "EnumDefinition", + "src": "1139:57:1" + }, + { + "constant": false, + "id": 1643, + "mutability": "mutable", + "name": "escrow", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1204:42:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1642, + "keyType": { + "id": 1640, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1212:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1204:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1641, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1223:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 1649, + "mutability": "mutable", + "name": "escrowTokens", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1421:68:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 1648, + "keyType": { + "id": 1644, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1429:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1421:47:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 1647, + "keyType": { + "id": 1645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1448:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1440:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1646, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1459:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 1652, + "mutability": "constant", + "name": "CANCELFAULT_SPLIT", + "nodeType": "VariableDeclaration", + "scope": 4105, + "src": "1537:47:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1537:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "32", + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1583:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "internal" + }, + { + "anonymous": false, + "id": 1658, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 1657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1654, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1691:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1653, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1691:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1656, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1658, + "src": "1716:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1655, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1716:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1690:47:1" + }, + "src": "1667:71:1" + }, + { + "anonymous": false, + "id": 1664, + "name": "LogTokenContractSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 1663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1660, + "indexed": false, + "mutability": "mutable", + "name": "_newTokenContract", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1772:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1772:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1662, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1664, + "src": "1799:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1661, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1799:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1771:49:1" + }, + "src": "1746:75:1" + }, + { + "anonymous": false, + "id": 1672, + "name": "LogWithdrawal", + "nodeType": "EventDefinition", + "parameters": { + "id": 1671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1666, + "indexed": false, + "mutability": "mutable", + "name": "_caller", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "1849:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1665, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1849:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1668, + "indexed": false, + "mutability": "mutable", + "name": "_payee", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "1866:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1667, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1866:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1670, + "indexed": false, + "mutability": "mutable", + "name": "_payment", + "nodeType": "VariableDeclaration", + "scope": 1672, + "src": "1882:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1882:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1848:51:1" + }, + "src": "1829:71:1" + }, + { + "anonymous": false, + "id": 1682, + "name": "LogAmountDistribution", + "nodeType": "EventDefinition", + "parameters": { + "id": 1681, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1674, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "1946:31:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1673, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1946:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1676, + "indexed": false, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "1988:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1675, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1678, + "indexed": false, + "mutability": "mutable", + "name": "_payment", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "2010:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2010:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1680, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 1682, + "src": "2037:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + }, + "typeName": { + "id": 1679, + "name": "PaymentType", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1639, + "src": "2037:11:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + }, + "visibility": "internal" + } + ], + "src": "1935:126:1" + }, + "src": "1908:154:1" + }, + { + "anonymous": false, + "id": 1688, + "name": "LogDisasterStateSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 1687, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1684, + "indexed": false, + "mutability": "mutable", + "name": "_disasterState", + "nodeType": "VariableDeclaration", + "scope": 1688, + "src": "2096:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2096:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1686, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1688, + "src": "2117:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1685, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2117:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2095:43:1" + }, + "src": "2070:69:1" + }, + { + "anonymous": false, + "id": 1694, + "name": "LogWithdrawEthOnDisaster", + "nodeType": "EventDefinition", + "parameters": { + "id": 1693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1690, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "2176:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2176:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "2193:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1691, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2193:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2175:39:1" + }, + "src": "2145:70:1" + }, + { + "anonymous": false, + "id": 1702, + "name": "LogWithdrawTokensOnDisaster", + "nodeType": "EventDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1696, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "2265:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1695, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2265:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1698, + "indexed": false, + "mutability": "mutable", + "name": "_tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "2291:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2291:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1700, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 1702, + "src": "2323:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1699, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2323:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2254:96:1" + }, + "src": "2221:130:1" + }, + { + "body": { + "id": 1723, + "nodeType": "Block", + "src": "2385:337:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1705, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "2404:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2434:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2426:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2426:7:1", + "typeDescriptions": {} + } + }, + "id": 1709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2426:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2404:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 1711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2438:16:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 1704, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2396:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2396:59:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1713, + "nodeType": "ExpressionStatement", + "src": "2396:59:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1715, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "2565:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2565:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1717, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "2579:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2565:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 1719, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2599:17:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 1714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2557:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1721, + "nodeType": "ExpressionStatement", + "src": "2557:60:1" + }, + { + "id": 1722, + "nodeType": "PlaceholderStatement", + "src": "2713:1:1" + } + ] + }, + "id": 1724, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1703, + "nodeType": "ParameterList", + "parameters": [], + "src": "2382:2:1" + }, + "src": "2359:363:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1739, + "nodeType": "Block", + "src": "2776:91:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1729, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1726, + "src": "2795:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2819:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2811:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2811:7:1", + "typeDescriptions": {} + } + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2811:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2795:26:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f544f4b454e5f41444452455353", + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2823:23:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0bf8b111ec96677a725e54d2bf034db3cecae98926c9d489195a44f6b469681c", + "typeString": "literal_string \"INVALID_TOKEN_ADDRESS\"" + }, + "value": "INVALID_TOKEN_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0bf8b111ec96677a725e54d2bf034db3cecae98926c9d489195a44f6b469681c", + "typeString": "literal_string \"INVALID_TOKEN_ADDRESS\"" + } + ], + "id": 1728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2787:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2787:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1737, + "nodeType": "ExpressionStatement", + "src": "2787:60:1" + }, + { + "id": 1738, + "nodeType": "PlaceholderStatement", + "src": "2858:1:1" + } + ] + }, + "id": 1740, + "name": "notZeroAddress", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1726, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 1740, + "src": "2754:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1725, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2754:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2753:22:1" + }, + "src": "2730:137:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1752, + "nodeType": "Block", + "src": "3005:111:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1744, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3024:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3024:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1746, + "name": "tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1633, + "src": "3038:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3024:35:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "5554", + "id": 1748, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3061:4:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cb49966919293454db3772b6c52b360dd4d2d010b3500935254740dec7a645da", + "typeString": "literal_string \"UT\"" + }, + "value": "UT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cb49966919293454db3772b6c52b360dd4d2d010b3500935254740dec7a645da", + "typeString": "literal_string \"UT\"" + } + ], + "id": 1743, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3016:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3016:50:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1750, + "nodeType": "ExpressionStatement", + "src": "3016:50:1" + }, + { + "id": 1751, + "nodeType": "PlaceholderStatement", + "src": "3107:1:1" + } + ] + }, + "documentation": { + "id": 1741, + "nodeType": "StructuredDocumentation", + "src": "2875:94:1", + "text": " @notice The only caller must be tokensContractAddress, otherwise reverts." + }, + "id": 1753, + "name": "onlyTokensContract", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1742, + "nodeType": "ParameterList", + "parameters": [], + "src": "3002:2:1" + }, + "src": "2975:141:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1766, + "nodeType": "Block", + "src": "3160:81:1", + "statements": [ + { + "expression": { + "id": 1760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1758, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "3171:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1759, + "name": "_voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1755, + "src": "3187:14:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3171:30:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1761, + "nodeType": "ExpressionStatement", + "src": "3171:30:1" + }, + { + "expression": { + "id": 1764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1762, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "3212:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3228:5:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3212:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1765, + "nodeType": "ExpressionStatement", + "src": "3212:21:1" + } + ] + }, + "id": 1767, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1755, + "mutability": "mutable", + "name": "_voucherKernel", + "nodeType": "VariableDeclaration", + "scope": 1767, + "src": "3136:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1754, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3136:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3135:24:1" + }, + "returnParameters": { + "id": 1757, + "nodeType": "ParameterList", + "parameters": [], + "src": "3160:0:1" + }, + "scope": 4105, + "src": "3124:117:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 8666 + ], + "body": { + "id": 1777, + "nodeType": "Block", + "src": "3473:27:1", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1774, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "3484:6:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3484:8:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1776, + "nodeType": "ExpressionStatement", + "src": "3484:8:1" + } + ] + }, + "documentation": { + "id": 1768, + "nodeType": "StructuredDocumentation", + "src": "3249:168:1", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 1778, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1772, + "modifierName": { + "id": 1771, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "3458:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3458:14:1" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1770, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3449:8:1" + }, + "parameters": { + "id": 1769, + "nodeType": "ParameterList", + "parameters": [], + "src": "3437:2:1" + }, + "returnParameters": { + "id": 1773, + "nodeType": "ParameterList", + "parameters": [], + "src": "3473:0:1" + }, + "scope": 4105, + "src": "3423:77:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8670 + ], + "body": { + "id": 1788, + "nodeType": "Block", + "src": "3714:29:1", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1785, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "3725:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3725:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1787, + "nodeType": "ExpressionStatement", + "src": "3725:10:1" + } + ] + }, + "documentation": { + "id": 1779, + "nodeType": "StructuredDocumentation", + "src": "3508:148:1", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 1789, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1783, + "modifierName": { + "id": 1782, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "3699:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3699:14:1" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1781, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3690:8:1" + }, + "parameters": { + "id": 1780, + "nodeType": "ParameterList", + "parameters": [], + "src": "3678:2:1" + }, + "returnParameters": { + "id": 1784, + "nodeType": "ParameterList", + "parameters": [], + "src": "3714:0:1" + }, + "scope": 4105, + "src": "3662:81:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8675 + ], + "body": { + "id": 1799, + "nodeType": "Block", + "src": "3928:40:1", + "statements": [ + { + "expression": { + "id": 1797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3946:14:1", + "subExpression": { + "id": 1796, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "3947:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1795, + "id": 1798, + "nodeType": "Return", + "src": "3939:21:1" + } + ] + }, + "documentation": { + "id": 1790, + "nodeType": "StructuredDocumentation", + "src": "3751:111:1", + "text": " @notice If once disaster state has been set to true, the contract could never be unpaused." + }, + "functionSelector": "ae04884e", + "id": 1800, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "canUnpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1792, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3904:8:1" + }, + "parameters": { + "id": 1791, + "nodeType": "ParameterList", + "parameters": [], + "src": "3887:2:1" + }, + "returnParameters": { + "id": 1795, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1794, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1800, + "src": "3922:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1793, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3922:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3921:6:1" + }, + "scope": 4105, + "src": "3868:100:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1818, + "nodeType": "Block", + "src": "4196:96:1", + "statements": [ + { + "expression": { + "id": 1810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1808, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "4207:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4223:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "4207:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1811, + "nodeType": "ExpressionStatement", + "src": "4207:20:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1813, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "4258:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "id": 1814, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4273:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4273:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1812, + "name": "LogDisasterStateSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1688, + "src": "4238:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bool_$_t_address_$returns$__$", + "typeString": "function (bool,address)" + } + }, + "id": 1816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4238:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1817, + "nodeType": "ExpressionStatement", + "src": "4238:46:1" + } + ] + }, + "documentation": { + "id": 1801, + "nodeType": "StructuredDocumentation", + "src": "3976:156:1", + "text": " @notice Once this functions is triggered, contracts cannot be unpaused anymore\n Only BR contract is in control of this function." + }, + "functionSelector": "36a166f6", + "id": 1819, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1804, + "modifierName": { + "id": 1803, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "4175:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4175:9:1" + }, + { + "id": 1806, + "modifierName": { + "id": 1805, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "4185:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4185:10:1" + } + ], + "name": "setDisasterState", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1802, + "nodeType": "ParameterList", + "parameters": [], + "src": "4163:2:1" + }, + "returnParameters": { + "id": 1807, + "nodeType": "ParameterList", + "parameters": [], + "src": "4196:0:1" + }, + "scope": 4105, + "src": "4138:154:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1867, + "nodeType": "Block", + "src": "4549:305:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1828, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "4568:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f776e657220646964206e6f7420616c6c6f77206d616e75616c207769746864726177", + "id": 1829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4583:37:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + }, + "value": "Owner did not allow manual withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + } + ], + "id": 1827, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4560:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4560:61:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1831, + "nodeType": "ExpressionStatement", + "src": "4560:61:1" + }, + { + "assignments": [ + 1833 + ], + "declarations": [ + { + "constant": false, + "id": 1833, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1867, + "src": "4634:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1832, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4634:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1838, + "initialValue": { + "baseExpression": { + "id": 1834, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "4651:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1837, + "indexExpression": { + "expression": { + "id": 1835, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4658:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4658:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4651:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4634:35:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1840, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4690:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4699:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4690:10:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "455343524f575f454d505459", + "id": 1843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4702:14:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + }, + "value": "ESCROW_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + } + ], + "id": 1839, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4682:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4682:35:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1845, + "nodeType": "ExpressionStatement", + "src": "4682:35:1" + }, + { + "expression": { + "id": 1851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1846, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "4728:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1849, + "indexExpression": { + "expression": { + "id": 1847, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4735:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4735:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4728:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4749:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4728:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1852, + "nodeType": "ExpressionStatement", + "src": "4728:22:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1858, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4782:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 1853, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4761:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4761:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sendValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 12844, + "src": "4761:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 1859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4761:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1860, + "nodeType": "ExpressionStatement", + "src": "4761:28:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1862, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1833, + "src": "4827:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 1863, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4835:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4835:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1861, + "name": "LogWithdrawEthOnDisaster", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1694, + "src": "4802:24:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 1865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4802:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1866, + "nodeType": "ExpressionStatement", + "src": "4802:44:1" + } + ] + }, + "documentation": { + "id": 1820, + "nodeType": "StructuredDocumentation", + "src": "4300:177:1", + "text": " @notice In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrow for the address provided. Funds are sent in ETH" + }, + "functionSelector": "7c727088", + "id": 1868, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1823, + "modifierName": { + "id": 1822, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "4525:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4525:10:1" + }, + { + "id": 1825, + "modifierName": { + "id": 1824, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "4536:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4536:12:1" + } + ], + "name": "withdrawEthOnDisaster", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1821, + "nodeType": "ParameterList", + "parameters": [], + "src": "4513:2:1" + }, + "returnParameters": { + "id": 1826, + "nodeType": "ParameterList", + "parameters": [], + "src": "4549:0:1" + }, + "scope": 4105, + "src": "4483:371:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1929, + "nodeType": "Block", + "src": "5293:368:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1882, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "5312:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f776e657220646964206e6f7420616c6c6f77206d616e75616c207769746864726177", + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5327:37:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + }, + "value": "Owner did not allow manual withdraw" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_39e1fde4d4900457f38d7b9a4aa85574d5ebf0b2422c5f07f7344a2f347d4355", + "typeString": "literal_string \"Owner did not allow manual withdraw\"" + } + ], + "id": 1881, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5304:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5304:61:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1885, + "nodeType": "ExpressionStatement", + "src": "5304:61:1" + }, + { + "assignments": [ + 1887 + ], + "declarations": [ + { + "constant": false, + "id": 1887, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1929, + "src": "5378:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1886, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5378:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1894, + "initialValue": { + "baseExpression": { + "baseExpression": { + "id": 1888, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "5395:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1890, + "indexExpression": { + "id": 1889, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5408:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5395:19:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1893, + "indexExpression": { + "expression": { + "id": 1891, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5415:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5415:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5395:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5378:48:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1896, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "5445:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5454:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5445:10:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "455343524f575f454d505459", + "id": 1899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5457:14:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + }, + "value": "ESCROW_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e5650df124bfb40b640d11ba0a2505e025b8823f9c7650121359d9b5d6c7908", + "typeString": "literal_string \"ESCROW_EMPTY\"" + } + ], + "id": 1895, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5437:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5437:35:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1901, + "nodeType": "ExpressionStatement", + "src": "5437:35:1" + }, + { + "expression": { + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 1902, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "5483:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 1906, + "indexExpression": { + "id": 1903, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5496:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5483:19:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1907, + "indexExpression": { + "expression": { + "id": 1904, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5503:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5503:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5483:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 1908, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5517:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5483:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1910, + "nodeType": "ExpressionStatement", + "src": "5483:35:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 1915, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5561:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1914, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "5554:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$12577_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5554:13:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + }, + { + "expression": { + "id": 1917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5569:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5569:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 1919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "5581:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1911, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12790, + "src": "5531:9:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeERC20_$12790_$", + "typeString": "type(library SafeERC20)" + } + }, + "id": 1913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 12611, + "src": "5531:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12577_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 1920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5531:57:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1921, + "nodeType": "ExpressionStatement", + "src": "5531:57:1" + }, + { + "expression": { + "arguments": [ + { + "id": 1923, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1887, + "src": "5627:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1924, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5635:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1925, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5642:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5642:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 1922, + "name": "LogWithdrawTokensOnDisaster", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1702, + "src": "5599:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address)" + } + }, + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5599:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1928, + "nodeType": "ExpressionStatement", + "src": "5599:54:1" + } + ] + }, + "documentation": { + "id": 1869, + "nodeType": "StructuredDocumentation", + "src": "4862:280:1", + "text": " @notice In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrowTokens for the address provided.\n @param token address of a token, that the caller sent the funds, while interacting with voucher or voucher-set" + }, + "functionSelector": "e13f44bf", + "id": 1930, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1874, + "modifierName": { + "id": 1873, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "5224:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5224:10:1" + }, + { + "id": 1876, + "modifierName": { + "id": 1875, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "5244:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5244:12:1" + }, + { + "arguments": [ + { + "id": 1878, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1871, + "src": "5281:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1879, + "modifierName": { + "id": 1877, + "name": "notZeroAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1740, + "src": "5266:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5266:21:1" + } + ], + "name": "withdrawTokensOnDisaster", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1871, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1930, + "src": "5182:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1870, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5182:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5181:15:1" + }, + "returnParameters": { + "id": 1880, + "nodeType": "ParameterList", + "parameters": [], + "src": "5293:0:1" + }, + "scope": 4105, + "src": "5148:513:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8681 + ], + "body": { + "id": 2177, + "nodeType": "Block", + "src": "6186:3634:1", + "statements": [ + { + "assignments": [ + 1942 + ], + "declarations": [ + { + "constant": false, + "id": 1942, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2177, + "src": "6197:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 1941, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "6197:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "id": 1943, + "nodeType": "VariableDeclarationStatement", + "src": "6197:36:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1945, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1933, + "src": "6254:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 1946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6273:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6254:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 1948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6276:16:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 1944, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6246:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6246:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1950, + "nodeType": "ExpressionStatement", + "src": "6246:47:1" + }, + { + "expression": { + "id": 1955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 1951, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6396:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1953, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "6396:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1954, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1933, + "src": "6428:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6396:47:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1956, + "nodeType": "ExpressionStatement", + "src": "6396:47:1" + }, + { + "expression": { + "id": 1967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 1957, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6454:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1959, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "6454:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 1964, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6552:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1965, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "6552:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1961, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "6500:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1960, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "6485:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6485:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getIdSupplyFromVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 9488, + "src": "6485:66:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure external returns (uint256)" + } + }, + "id": 1966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6485:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6454:128:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1968, + "nodeType": "ExpressionStatement", + "src": "6454:128:1" + }, + { + "expression": { + "id": 1979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 1969, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6593:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "6593:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 1976, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6692:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "6692:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1973, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "6639:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1972, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "6624:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 1974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6624:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 1975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "6624:67:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 1978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6624:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6593:128:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 1980, + "nodeType": "ExpressionStatement", + "src": "6593:128:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1982, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6756:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1983, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "6756:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1984, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6787:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6756:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1986, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6809:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1987, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "6809:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 1988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6841:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "6809:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6756:86:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 1991, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6857:24:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 1981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6734:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6734:158:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1993, + "nodeType": "ExpressionStatement", + "src": "6734:158:1" + }, + { + "expression": { + "id": 2013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "expression": { + "expression": { + "id": 1994, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6920:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 1997, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "6920:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 1998, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "6920:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "expression": { + "id": 1999, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "6967:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2000, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "6967:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2001, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "6967:43:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "expression": { + "id": 2002, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7025:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2003, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "7025:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2004, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "7025:44:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + null, + null + ], + "id": 2005, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "6905:191:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$__$__$", + "typeString": "tuple(uint8,bool,bool,,)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2010, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7160:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2011, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "7160:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2007, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7114:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2006, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7099:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7099:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 9542, + "src": "7099:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint8,bool,bool,uint256,uint256)" + } + }, + "id": 2012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7099:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "src": "6905:295:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2014, + "nodeType": "ExpressionStatement", + "src": "6905:295:1" + }, + { + "expression": { + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "components": [ + { + "expression": { + "id": 2015, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7228:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "7228:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2018, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7263:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "7263:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2020, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7302:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2021, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "7302:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2022, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "7213:124:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2027, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7398:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "7398:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2024, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7355:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2023, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7340:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7340:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9508, + "src": "7340:43:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" + } + }, + "id": 2029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7340:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "src": "7213:224:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2031, + "nodeType": "ExpressionStatement", + "src": "7213:224:1" + }, + { + "expression": { + "id": 2045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2032, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7450:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2034, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "7450:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 2041, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7560:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2042, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "7560:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2038, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7511:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2037, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7496:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSupplyHolder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9550, + "src": "7496:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7496:107:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2036, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7474:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2035, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7474:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 2044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7474:140:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7450:164:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2046, + "nodeType": "ExpressionStatement", + "src": "7450:164:1" + }, + { + "expression": { + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2047, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7625:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2049, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "7625:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 2056, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7736:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "7736:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2053, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "7686:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2052, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "7671:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7671:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherHolder", + "nodeType": "MemberAccess", + "referencedDeclaration": 9558, + "src": "7671:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7671:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7649:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 2050, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7649:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7649:142:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7625:166:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2061, + "nodeType": "ExpressionStatement", + "src": "7625:166:1" + }, + { + "condition": { + "id": 2065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7938:44:1", + "subExpression": { + "expression": { + "expression": { + "id": 2062, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "7939:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2063, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "7939:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "7939:43:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2071, + "nodeType": "IfStatement", + "src": "7934:108:1", + "trueBody": { + "id": 2070, + "nodeType": "Block", + "src": "7984:58:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2067, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8015:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2066, + "name": "releasePayments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2232, + "src": "7999:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7999:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2069, + "nodeType": "ExpressionStatement", + "src": "7999:31:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8160:45:1", + "subExpression": { + "expression": { + "expression": { + "id": 2072, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8161:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2073, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "8161:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "8161:44:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2077, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8231:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2078, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "8231:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "8231:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2080, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "8265:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2076, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "8222:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8222:53:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "8160:115:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2088, + "nodeType": "IfStatement", + "src": "8142:203:1", + "trueBody": { + "id": 2087, + "nodeType": "Block", + "src": "8287:58:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2084, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8318:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2083, + "name": "releaseDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2503, + "src": "8302:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8302:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2086, + "nodeType": "ExpressionStatement", + "src": "8302:31:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2089, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8361:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2090, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "8361:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8391:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8361:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2105, + "nodeType": "IfStatement", + "src": "8357:262:1", + "trueBody": { + "id": 2104, + "nodeType": "Block", + "src": "8394:225:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2094, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "8445:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8445:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2096, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8471:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "8471:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2098, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8517:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2099, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "8517:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2100, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8564:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "8564:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2093, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "8409:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8409:198:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2103, + "nodeType": "ExpressionStatement", + "src": "8409:198:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2106, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8635:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "8635:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8665:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8635:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2122, + "nodeType": "IfStatement", + "src": "8631:276:1", + "trueBody": { + "id": 2121, + "nodeType": "Block", + "src": "8668:239:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2111, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8719:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "8719:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2113, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8759:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2114, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "8759:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2115, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8805:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "8805:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2117, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8852:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "8852:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2110, + "name": "_withdrawPayments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3367, + "src": "8683:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8683:212:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2120, + "nodeType": "ExpressionStatement", + "src": "8683:212:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2123, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "8923:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2124, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "8923:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8955:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8923:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2139, + "nodeType": "IfStatement", + "src": "8919:280:1", + "trueBody": { + "id": 2138, + "nodeType": "Block", + "src": "8958:241:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2128, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9009:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2129, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "9009:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2130, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9049:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "9049:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2132, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9097:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "9097:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2134, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9144:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "9144:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2127, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "8973:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8973:214:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2137, + "nodeType": "ExpressionStatement", + "src": "8973:214:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2140, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9215:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2141, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "9215:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9245:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9215:31:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2156, + "nodeType": "IfStatement", + "src": "9211:276:1", + "trueBody": { + "id": 2155, + "nodeType": "Block", + "src": "9248:239:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2145, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9299:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2146, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "9299:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2147, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9339:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "9339:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2149, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9385:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "9385:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2151, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9432:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "9432:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2144, + "name": "_withdrawPayments", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3367, + "src": "9263:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9263:212:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2154, + "nodeType": "ExpressionStatement", + "src": "9263:212:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2157, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9503:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2158, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "9503:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9535:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9503:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2173, + "nodeType": "IfStatement", + "src": "9499:280:1", + "trueBody": { + "id": 2172, + "nodeType": "Block", + "src": "9538:241:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2162, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9589:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2163, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "9589:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2164, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9629:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "9629:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2166, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9677:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "9677:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "id": 2168, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9724:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "9724:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2161, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "9553:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9553:214:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "9553:214:1" + } + ] + } + }, + { + "expression": { + "id": 2175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "9791:21:1", + "subExpression": { + "id": 2174, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1942, + "src": "9798:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2176, + "nodeType": "ExpressionStatement", + "src": "9791:21:1" + } + ] + }, + "documentation": { + "id": 1931, + "nodeType": "StructuredDocumentation", + "src": "5669:382:1", + "text": " @notice Trigger withdrawals of what funds are releasable\n The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\n @dev This function would be optimized a lot, here verbose for readability.\n @param _tokenIdVoucher ID of a voucher token (ERC-721) to try withdraw funds from" + }, + "functionSelector": "2e1a7d4d", + "id": 2178, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1937, + "modifierName": { + "id": 1936, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "6145:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6145:12:1" + }, + { + "id": 1939, + "modifierName": { + "id": 1938, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "6167:13:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6167:13:1" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1935, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6127:8:1" + }, + "parameters": { + "id": 1934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1933, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 2178, + "src": "6075:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1932, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6075:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6074:25:1" + }, + "returnParameters": { + "id": 1940, + "nodeType": "ParameterList", + "parameters": [], + "src": "6186:0:1" + }, + "scope": 4105, + "src": "6057:3763:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2231, + "nodeType": "Block", + "src": "10258:523:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2185, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10282:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2186, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10282:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10282:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2188, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "10316:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2184, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10273:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10273:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2196, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10427:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10427:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2198, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10427:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2199, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "10461:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2195, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10418:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10418:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2202, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10498:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2203, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10498:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2204, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10498:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2205, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "10532:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2201, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10489:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10489:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10418:125:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2209, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10570:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2210, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10570:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2211, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10570:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2212, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "10604:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2208, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10561:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10561:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 2220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10642:55:1", + "subExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2215, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10652:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2216, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "10652:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2217, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "10652:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2218, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "10686:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2214, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "10643:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10643:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10561:136:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 2222, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10560:138:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10418:280:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2229, + "nodeType": "IfStatement", + "src": "10400:374:1", + "trueBody": { + "id": 2228, + "nodeType": "Block", + "src": "10710:64:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2225, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10747:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2224, + "name": "releasePaymentToBuyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2434, + "src": "10725:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10725:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2227, + "nodeType": "ExpressionStatement", + "src": "10725:37:1" + } + ] + } + }, + "id": 2230, + "nodeType": "IfStatement", + "src": "10269:505:1", + "trueBody": { + "id": 2194, + "nodeType": "Block", + "src": "10329:65:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2191, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2181, + "src": "10367:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2190, + "name": "releasePaymentToSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2333, + "src": "10344:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10344:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2193, + "nodeType": "ExpressionStatement", + "src": "10344:38:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 2179, + "nodeType": "StructuredDocumentation", + "src": "9828:352:1", + "text": " @notice Release of payments, for a voucher which payments had not been released already.\n Based on the voucher status(e.g. redeemed, refunded, etc), the voucher price will be sent to either buyer or seller.\n @param voucherDetails keeps all required information of the voucher which the payment should be released for." + }, + "id": 2232, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releasePayments", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2181, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2232, + "src": "10211:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2180, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "10211:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "10210:38:1" + }, + "returnParameters": { + "id": 2183, + "nodeType": "ParameterList", + "parameters": [], + "src": "10258:0:1" + }, + "scope": 4105, + "src": "10186:595:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2332, + "nodeType": "Block", + "src": "11171:1260:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2238, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11200:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11200:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2240, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "11232:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11200:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2242, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11255:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11255:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2244, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "11287:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11255:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11200:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2262, + "nodeType": "IfStatement", + "src": "11182:269:1", + "trueBody": { + "id": 2261, + "nodeType": "Block", + "src": "11305:146:1", + "statements": [ + { + "expression": { + "id": 2259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2247, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "11320:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2250, + "indexExpression": { + "expression": { + "id": 2248, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11327:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11327:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11320:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2256, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11404:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "11404:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2251, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "11352:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2254, + "indexExpression": { + "expression": { + "id": 2252, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11359:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2253, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11359:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11352:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "11352:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11352:87:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11320:119:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2260, + "nodeType": "ExpressionStatement", + "src": "11320:119:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2263, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11479:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11479:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2265, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "11511:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11479:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2267, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11534:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "11534:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2269, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "11566:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "11534:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11479:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2301, + "nodeType": "IfStatement", + "src": "11461:533:1", + "trueBody": { + "id": 2300, + "nodeType": "Block", + "src": "11584:410:1", + "statements": [ + { + "assignments": [ + 2273 + ], + "declarations": [ + { + "constant": false, + "id": 2273, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 2300, + "src": "11599:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11599:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2281, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2278, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11717:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2279, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "11717:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2275, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "11659:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2274, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "11644:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11644:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "11644:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11644:120:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11599:165:1" + }, + { + "expression": { + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2282, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "11781:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2286, + "indexExpression": { + "id": 2283, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2273, + "src": "11794:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11781:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2287, + "indexExpression": { + "expression": { + "id": 2284, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11831:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2285, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11831:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11781:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2295, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11947:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "11947:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2288, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "11870:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2290, + "indexExpression": { + "id": 2289, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2273, + "src": "11883:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11870:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2293, + "indexExpression": { + "expression": { + "id": 2291, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "11902:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2292, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "11902:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11870:54:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "11870:58:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11870:112:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11781:201:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2299, + "nodeType": "ExpressionStatement", + "src": "11781:201:1" + } + ] + } + }, + { + "expression": { + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2302, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12006:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2304, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "12006:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2308, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12082:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "12082:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2305, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12036:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6006, + "src": "12036:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "12036:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12036:77:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12006:107:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2312, + "nodeType": "ExpressionStatement", + "src": "12006:107:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2317, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12189:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2318, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "12189:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2314, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "12141:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2313, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "12126:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12126:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 9328, + "src": "12126:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12126:103:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2320, + "nodeType": "ExpressionStatement", + "src": "12126:103:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2322, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12278:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2323, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "12278:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2324, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12322:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "12322:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2326, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2235, + "src": "12358:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2327, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "12358:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2328, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "12393:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PAYMENT", + "nodeType": "MemberAccess", + "src": "12393:19:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2321, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "12242:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12242:181:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2331, + "nodeType": "ExpressionStatement", + "src": "12242:181:1" + } + ] + }, + "documentation": { + "id": 2233, + "nodeType": "StructuredDocumentation", + "src": "10789:283:1", + "text": " @notice Following function `releasePayments`, if certain conditions for the voucher status are met, the voucher price will be sent to the seller\n @param voucherDetails keeps all required information of the voucher which the payment should be released for." + }, + "id": 2333, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releasePaymentToSeller", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2235, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2333, + "src": "11110:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2234, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "11110:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "11109:38:1" + }, + "returnParameters": { + "id": 2237, + "nodeType": "ParameterList", + "parameters": [], + "src": "11171:0:1" + }, + "scope": 4105, + "src": "11078:1353:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2433, + "nodeType": "Block", + "src": "12820:1262:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2339, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "12849:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2340, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "12849:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2341, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "12881:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12849:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2343, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "12904:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2344, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "12904:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2345, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "12936:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12904:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12849:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2363, + "nodeType": "IfStatement", + "src": "12831:269:1", + "trueBody": { + "id": 2362, + "nodeType": "Block", + "src": "12954:146:1", + "statements": [ + { + "expression": { + "id": 2360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2348, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "12969:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2351, + "indexExpression": { + "expression": { + "id": 2349, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "12976:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "12976:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12969:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2357, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13053:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "13053:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2352, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "13001:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2355, + "indexExpression": { + "expression": { + "id": 2353, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13008:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2354, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13008:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13001:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "13001:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13001:87:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12969:119:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2361, + "nodeType": "ExpressionStatement", + "src": "12969:119:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2364, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13130:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2365, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "13130:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2366, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "13162:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13130:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2368, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13185:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "13185:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2370, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "13217:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13185:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13130:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2402, + "nodeType": "IfStatement", + "src": "13112:533:1", + "trueBody": { + "id": 2401, + "nodeType": "Block", + "src": "13235:410:1", + "statements": [ + { + "assignments": [ + 2374 + ], + "declarations": [ + { + "constant": false, + "id": 2374, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 2401, + "src": "13250:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2373, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13250:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2382, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2379, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13368:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2380, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "13368:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2376, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "13310:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2375, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13295:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13295:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "13295:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13295:120:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13250:165:1" + }, + { + "expression": { + "id": 2399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2383, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "13432:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2387, + "indexExpression": { + "id": 2384, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2374, + "src": "13445:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13432:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2388, + "indexExpression": { + "expression": { + "id": 2385, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13482:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2386, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13482:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13432:86:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2396, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13598:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2397, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "13598:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2389, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "13521:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2391, + "indexExpression": { + "id": 2390, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2374, + "src": "13534:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13521:31:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2394, + "indexExpression": { + "expression": { + "id": 2392, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13553:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2393, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13553:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13521:54:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "13521:58:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13521:112:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13432:201:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2400, + "nodeType": "ExpressionStatement", + "src": "13432:201:1" + } + ] + } + }, + { + "expression": { + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2403, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13657:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2405, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "13657:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2409, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13733:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "13733:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2406, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13687:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2407, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6010, + "src": "13687:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "13687:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13687:77:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13657:107:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2413, + "nodeType": "ExpressionStatement", + "src": "13657:107:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2418, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13840:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2419, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "13840:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2415, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "13792:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2414, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "13777:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13777:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 9328, + "src": "13777:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 2420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13777:103:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2421, + "nodeType": "ExpressionStatement", + "src": "13777:103:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2423, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13929:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2424, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "13929:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2425, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "13973:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "13973:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2427, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2336, + "src": "14009:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2428, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 5996, + "src": "14009:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2429, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "14044:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PAYMENT", + "nodeType": "MemberAccess", + "src": "14044:19:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2422, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "13893:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13893:181:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2432, + "nodeType": "ExpressionStatement", + "src": "13893:181:1" + } + ] + }, + "documentation": { + "id": 2334, + "nodeType": "StructuredDocumentation", + "src": "12439:283:1", + "text": " @notice Following function `releasePayments`, if certain conditions for the voucher status are met, the voucher price will be sent to the buyer\n @param voucherDetails keeps all required information of the voucher, which the payment should be released for." + }, + "id": 2434, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releasePaymentToBuyer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2336, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2434, + "src": "12759:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2335, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "12759:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "12758:38:1" + }, + "returnParameters": { + "id": 2338, + "nodeType": "ParameterList", + "parameters": [], + "src": "12820:0:1" + }, + "scope": 4105, + "src": "12728:1354:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2502, + "nodeType": "Block", + "src": "14709:1113:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2441, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "14761:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2442, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "14761:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2443, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "14761:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2444, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "14795:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2440, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "14752:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14752:56:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2468, + "nodeType": "Block", + "src": "14929:336:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2452, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "14957:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2453, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "14957:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2454, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "14957:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2455, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "14991:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2451, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "14948:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14948:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2466, + "nodeType": "Block", + "src": "15139:115:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2463, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15223:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2462, + "name": "distributeFullIssuerDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2987, + "src": "15195:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15195:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2465, + "nodeType": "ExpressionStatement", + "src": "15195:43:1" + } + ] + }, + "id": 2467, + "nodeType": "IfStatement", + "src": "14944:310:1", + "trueBody": { + "id": 2461, + "nodeType": "Block", + "src": "15010:123:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2458, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15102:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2457, + "name": "distributeIssuerDepositOnIssuerCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2894, + "src": "15064:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15064:53:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2460, + "nodeType": "ExpressionStatement", + "src": "15064:53:1" + } + ] + } + } + ] + }, + "id": 2469, + "nodeType": "IfStatement", + "src": "14748:517:1", + "trueBody": { + "id": 2450, + "nodeType": "Block", + "src": "14810:113:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2447, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "14896:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2446, + "name": "distributeIssuerDepositOnHolderComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2759, + "src": "14856:39:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14856:55:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2449, + "nodeType": "ExpressionStatement", + "src": "14856:55:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2471, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15333:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "15333:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2473, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "15333:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2474, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "15367:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2470, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "15324:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15324:54:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2477, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15404:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2478, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "15404:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2479, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "15404:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2480, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "15438:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2476, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "15395:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15395:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "15324:131:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2492, + "nodeType": "Block", + "src": "15576:122:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2489, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15671:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2488, + "name": "distributeHolderDepositOnNotRedeemedNotCancelled", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3173, + "src": "15622:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15622:64:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2491, + "nodeType": "ExpressionStatement", + "src": "15622:64:1" + } + ] + }, + "id": 2493, + "nodeType": "IfStatement", + "src": "15306:392:1", + "trueBody": { + "id": 2487, + "nodeType": "Block", + "src": "15467:103:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2484, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15543:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + ], + "id": 2483, + "name": "distributeFullHolderDeposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3080, + "src": "15515:27:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_VoucherDetails_$6017_memory_ptr_$returns$__$", + "typeString": "function (struct UsingHelpers.VoucherDetails memory)" + } + }, + "id": 2485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15515:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2486, + "nodeType": "ExpressionStatement", + "src": "15515:43:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2498, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2437, + "src": "15774:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "15774:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2495, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "15725:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2494, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "15710:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15710:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 9334, + "src": "15710:49:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 2500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15710:104:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2501, + "nodeType": "ExpressionStatement", + "src": "15710:104:1" + } + ] + }, + "documentation": { + "id": 2435, + "nodeType": "StructuredDocumentation", + "src": "14090:541:1", + "text": " @notice Release of deposits, for a voucher which deposits had not been released already, and had been marked as `finalized`\n Based on the voucher status(e.g. complained, redeemed, refunded, etc), the voucher deposits will be sent to either buyer, seller, or pool owner.\n Depending on the payment type (e.g ETH, or Token) escrow funds will be held in the `escrow` || escrowTokens mappings\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 2503, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "releaseDeposits", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2437, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2503, + "src": "14662:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2436, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "14662:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "14661:38:1" + }, + "returnParameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [], + "src": "14709:0:1" + }, + "scope": 4105, + "src": "14637:1185:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2758, + "nodeType": "Block", + "src": "16264:3626:1", + "statements": [ + { + "condition": { + "arguments": [ + { + "expression": { + "expression": { + "id": 2510, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16288:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "currStatus", + "nodeType": "MemberAccess", + "referencedDeclaration": 6016, + "src": "16288:25:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_memory_ptr", + "typeString": "struct UsingHelpers.VoucherStatus memory" + } + }, + "id": 2512, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16288:32:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 2513, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "16322:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2509, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "16279:8:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 2514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16279:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2756, + "nodeType": "Block", + "src": "18739:1144:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2680, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18807:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2681, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "18807:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2682, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "18839:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "18807:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2684, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18866:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2685, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "18866:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2686, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "18898:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "18866:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "18807:97:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 2732, + "nodeType": "Block", + "src": "19074:447:1", + "statements": [ + { + "assignments": [ + 2705 + ], + "declarations": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2732, + "src": "19093:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19093:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2713, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2710, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19224:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2711, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "19224:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2707, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "19160:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2706, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "19145:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19145:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "19145:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19145:130:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19093:182:1" + }, + { + "expression": { + "id": 2730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2714, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "19296:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2718, + "indexExpression": { + "id": 2715, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2705, + "src": "19309:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19296:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2719, + "indexExpression": { + "expression": { + "id": 2716, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19353:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2717, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "19353:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "19296:97:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2727, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19480:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19480:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2720, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "19396:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2722, + "indexExpression": { + "id": 2721, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2705, + "src": "19409:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19396:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2725, + "indexExpression": { + "expression": { + "id": 2723, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19431:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "19431:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19396:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "19396:83:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19396:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19296:209:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2731, + "nodeType": "ExpressionStatement", + "src": "19296:209:1" + } + ] + }, + "id": 2733, + "nodeType": "IfStatement", + "src": "18785:736:1", + "trueBody": { + "id": 2703, + "nodeType": "Block", + "src": "18920:148:1", + "statements": [ + { + "expression": { + "id": 2701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2689, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "18939:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2692, + "indexExpression": { + "expression": { + "id": 2690, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18946:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2691, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "18946:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "18939:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2698, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19027:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2699, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19027:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2693, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "18971:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2696, + "indexExpression": { + "expression": { + "id": 2694, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18978:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "18978:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "18971:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "18971:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18971:81:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18939:113:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2702, + "nodeType": "ExpressionStatement", + "src": "18939:113:1" + } + ] + } + }, + { + "expression": { + "id": 2743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2734, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19537:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "19537:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2740, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19617:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2741, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19617:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2737, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19567:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2738, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "19567:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "19567:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19567:89:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19537:119:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2744, + "nodeType": "ExpressionStatement", + "src": "19537:119:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2746, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19713:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2747, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "19713:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2748, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "19761:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19761:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2750, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "19787:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "19787:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2752, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "19830:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "19830:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2745, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "19673:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19673:198:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2755, + "nodeType": "ExpressionStatement", + "src": "19673:198:1" + } + ] + }, + "id": 2757, + "nodeType": "IfStatement", + "src": "16275:3608:1", + "trueBody": { + "id": 2679, + "nodeType": "Block", + "src": "16341:2392:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2515, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16425:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2516, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16425:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2517, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "16457:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16425:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2519, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16484:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16484:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2521, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "16516:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16484:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16425:97:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2539, + "nodeType": "IfStatement", + "src": "16403:283:1", + "trueBody": { + "id": 2538, + "nodeType": "Block", + "src": "16538:148:1", + "statements": [ + { + "expression": { + "id": 2536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2524, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "16557:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2527, + "indexExpression": { + "expression": { + "id": 2525, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16564:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "16564:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16557:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2533, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16645:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2534, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "16645:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2528, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "16589:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2531, + "indexExpression": { + "expression": { + "id": 2529, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16596:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "16596:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16589:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "16589:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16589:81:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16557:113:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2537, + "nodeType": "ExpressionStatement", + "src": "16557:113:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2540, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16724:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16724:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2542, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "16756:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16724:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2544, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16783:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2545, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "16783:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2546, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "16815:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16783:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "16724:97:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2578, + "nodeType": "IfStatement", + "src": "16702:582:1", + "trueBody": { + "id": 2577, + "nodeType": "Block", + "src": "16837:447:1", + "statements": [ + { + "assignments": [ + 2550 + ], + "declarations": [ + { + "constant": false, + "id": 2550, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2577, + "src": "16856:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2549, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16856:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2558, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2555, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "16987:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2556, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "16987:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2552, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "16923:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2551, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "16908:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16908:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "16908:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16908:130:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16856:182:1" + }, + { + "expression": { + "id": 2575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2559, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "17059:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2563, + "indexExpression": { + "id": 2560, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2550, + "src": "17072:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17059:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2564, + "indexExpression": { + "expression": { + "id": 2561, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17116:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2562, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "17116:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "17059:97:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2572, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17243:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2573, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "17243:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2565, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "17159:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2567, + "indexExpression": { + "id": 2566, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2550, + "src": "17172:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17159:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2570, + "indexExpression": { + "expression": { + "id": 2568, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17194:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "17194:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17159:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "17159:83:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17159:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17059:209:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2576, + "nodeType": "ExpressionStatement", + "src": "17059:209:1" + } + ] + } + }, + { + "assignments": [ + 2580 + ], + "declarations": [ + { + "constant": false, + "id": 2580, + "mutability": "mutable", + "name": "tFraction", + "nodeType": "VariableDeclaration", + "scope": 2679, + "src": "17300:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2579, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17300:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2586, + "initialValue": { + "arguments": [ + { + "id": 2584, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "17349:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2581, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17320:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2582, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "17320:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "17320:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17320:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "17300:67:1" + }, + { + "expression": { + "id": 2595, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2587, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17382:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2589, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "17382:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 2593, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17466:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2590, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17414:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2591, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "17414:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "17414:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17414:76:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17382:108:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2596, + "nodeType": "ExpressionStatement", + "src": "17382:108:1" + }, + { + "expression": { + "id": 2608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2597, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17528:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "17528:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2605, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "17626:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2603, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17612:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "17612:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17612:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2600, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17560:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "17560:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "17560:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17560:99:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17528:131:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2609, + "nodeType": "ExpressionStatement", + "src": "17528:131:1" + }, + { + "expression": { + "id": 2629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2610, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17700:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "17700:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2625, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "17862:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2623, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17848:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "17848:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17848:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "components": [ + { + "arguments": [ + { + "id": 2619, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "17810:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2616, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17781:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2617, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "17781:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "17781:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17781:39:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2621, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "17780:41:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "17780:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17780:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2613, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17730:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "17730:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "17730:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17730:184:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "17700:214:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2630, + "nodeType": "ExpressionStatement", + "src": "17700:214:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2632, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "17991:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2633, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "17991:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2634, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18039:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "18039:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2636, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18079:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2637, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "18107:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2638, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "18107:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2631, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "17951:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17951:197:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2640, + "nodeType": "ExpressionStatement", + "src": "17951:197:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2642, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18203:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2643, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "18203:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2644, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18251:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "18251:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2648, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "18305:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2646, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18291:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "18291:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18291:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2650, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "18342:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "18342:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2641, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "18163:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18163:220:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2653, + "nodeType": "ExpressionStatement", + "src": "18163:220:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2655, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18438:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2656, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "18438:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2657, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "18486:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 2658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18486:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2668, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "18594:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 2666, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18580:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "18580:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18580:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "components": [ + { + "arguments": [ + { + "id": 2662, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18542:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2659, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2506, + "src": "18513:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2660, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "18513:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "18513:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18513:39:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 2664, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18512:41:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "18512:45:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18512:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2671, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "18650:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "18650:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2654, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "18398:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "18398:293:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2674, + "nodeType": "ExpressionStatement", + "src": "18398:293:1" + }, + { + "expression": { + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2675, + "name": "tFraction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "18708:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 2676, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18720:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "18708:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2678, + "nodeType": "ExpressionStatement", + "src": "18708:13:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 2504, + "nodeType": "StructuredDocumentation", + "src": "15830:316:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if a voucher had been complained by the buyer.\n Also checks if the voucher had been cancelled\n @param voucherDetails keeps all required information of the voucher which the payment should be released for." + }, + "id": 2759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeIssuerDepositOnHolderComplain", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2506, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2759, + "src": "16211:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2505, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "16211:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "16200:54:1" + }, + "returnParameters": { + "id": 2508, + "nodeType": "ParameterList", + "parameters": [], + "src": "16264:0:1" + }, + "scope": 4105, + "src": "16152:3738:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2893, + "nodeType": "Block", + "src": "20343:1733:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2765, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20372:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20372:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2767, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "20404:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20372:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2769, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20427:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20427:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2771, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "20459:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20427:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20372:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2789, + "nodeType": "IfStatement", + "src": "20354:273:1", + "trueBody": { + "id": 2788, + "nodeType": "Block", + "src": "20477:150:1", + "statements": [ + { + "expression": { + "id": 2786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2774, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "20492:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2777, + "indexExpression": { + "expression": { + "id": 2775, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20499:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2776, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "20499:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20492:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2783, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20576:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "20576:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2778, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "20524:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2781, + "indexExpression": { + "expression": { + "id": 2779, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20531:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "20531:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20524:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "20524:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20524:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20492:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2787, + "nodeType": "ExpressionStatement", + "src": "20492:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2790, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20657:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2791, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20657:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2792, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "20689:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20657:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2794, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20712:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2795, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "20712:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2796, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "20744:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20712:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "20657:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2828, + "nodeType": "IfStatement", + "src": "20639:548:1", + "trueBody": { + "id": 2827, + "nodeType": "Block", + "src": "20762:425:1", + "statements": [ + { + "assignments": [ + 2800 + ], + "declarations": [ + { + "constant": false, + "id": 2800, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2827, + "src": "20777:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2799, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20777:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2808, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2805, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "20900:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2806, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "20900:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2802, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "20840:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2801, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "20825:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20825:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "20825:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20825:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "20777:170:1" + }, + { + "expression": { + "id": 2825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2809, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "20964:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2813, + "indexExpression": { + "id": 2810, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2800, + "src": "20977:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20964:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2814, + "indexExpression": { + "expression": { + "id": 2811, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21017:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2812, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "21017:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "20964:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2822, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21136:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2823, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21136:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2815, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "21056:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2817, + "indexExpression": { + "id": 2816, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2800, + "src": "21069:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21056:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2820, + "indexExpression": { + "expression": { + "id": 2818, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21091:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2819, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "21091:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21056:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "21056:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21056:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20964:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2826, + "nodeType": "ExpressionStatement", + "src": "20964:211:1" + } + ] + } + }, + { + "expression": { + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2829, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2831, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "21199:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 2838, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21308:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2835, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21279:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21279:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21279:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21279:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2832, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21231:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2833, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "21231:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "21231:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21231:106:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21199:138:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2842, + "nodeType": "ExpressionStatement", + "src": "21199:138:1" + }, + { + "expression": { + "id": 2859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2843, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21350:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "21350:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 2855, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21506:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2852, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21477:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21477:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21477:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21477:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2849, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21430:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2850, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21430:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "21430:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21430:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2846, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21382:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "21382:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2848, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "21382:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21382:168:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "21350:200:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2860, + "nodeType": "ExpressionStatement", + "src": "21350:200:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2862, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21599:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2863, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "21599:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2864, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21643:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2865, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "21643:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 2869, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21708:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2866, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21679:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21679:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21679:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21679:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2871, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "21741:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "21741:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2861, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "21563:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21563:215:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2874, + "nodeType": "ExpressionStatement", + "src": "21563:215:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2876, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21827:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "21827:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2878, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21871:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "21871:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 2886, + "name": "CANCELFAULT_SPLIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1652, + "src": "21983:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2883, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21954:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21954:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 12404, + "src": "21954:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21954:47:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2880, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2762, + "src": "21907:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "21907:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "21907:28:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21907:109:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2889, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "22031:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "22031:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2875, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "21791:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21791:277:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2892, + "nodeType": "ExpressionStatement", + "src": "21791:277:1" + } + ] + }, + "documentation": { + "id": 2760, + "nodeType": "StructuredDocumentation", + "src": "19898:329:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if a voucher had been cancelled by the seller.\n Will be triggered if the voucher had not been complained.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 2894, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeIssuerDepositOnIssuerCancel", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2762, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2894, + "src": "20290:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2761, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "20290:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "20279:54:1" + }, + "returnParameters": { + "id": 2764, + "nodeType": "ParameterList", + "parameters": [], + "src": "20343:0:1" + }, + "scope": 4105, + "src": "20233:1843:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2986, + "nodeType": "Block", + "src": "22496:1184:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2900, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22525:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2901, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22525:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2902, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "22557:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22525:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2904, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22580:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2905, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22580:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2906, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "22612:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22580:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22525:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2924, + "nodeType": "IfStatement", + "src": "22507:273:1", + "trueBody": { + "id": 2923, + "nodeType": "Block", + "src": "22630:150:1", + "statements": [ + { + "expression": { + "id": 2921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2909, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "22645:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2912, + "indexExpression": { + "expression": { + "id": 2910, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22652:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2911, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "22652:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "22645:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2918, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22729:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "22729:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 2913, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "22677:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2916, + "indexExpression": { + "expression": { + "id": 2914, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22684:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2915, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "22684:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22677:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "22677:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22677:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22645:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2922, + "nodeType": "ExpressionStatement", + "src": "22645:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2925, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22810:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22810:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2927, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "22842:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22810:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2929, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "22865:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "22865:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2931, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "22897:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "22865:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22810:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2963, + "nodeType": "IfStatement", + "src": "22792:548:1", + "trueBody": { + "id": 2962, + "nodeType": "Block", + "src": "22915:425:1", + "statements": [ + { + "assignments": [ + 2935 + ], + "declarations": [ + { + "constant": false, + "id": 2935, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 2962, + "src": "22930:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2934, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "22930:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 2943, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 2940, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23053:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2941, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "23053:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 2937, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "22993:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 2936, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "22978:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 2938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22978:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 2939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "22978:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22978:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22930:170:1" + }, + { + "expression": { + "id": 2960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 2944, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "23117:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2948, + "indexExpression": { + "id": 2945, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2935, + "src": "23130:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23117:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2949, + "indexExpression": { + "expression": { + "id": 2946, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23170:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "23170:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "23117:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2957, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23289:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2958, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "23289:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 2950, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "23209:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2952, + "indexExpression": { + "id": 2951, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2935, + "src": "23222:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23209:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2955, + "indexExpression": { + "expression": { + "id": 2953, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23244:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2954, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "23244:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23209:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "23209:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23209:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23117:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2961, + "nodeType": "ExpressionStatement", + "src": "23117:211:1" + } + ] + } + }, + { + "expression": { + "id": 2973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 2964, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23352:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "23352:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 2970, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23432:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "23432:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 2967, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23384:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 6008, + "src": "23384:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "23384:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23384:83:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23352:115:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2974, + "nodeType": "ExpressionStatement", + "src": "23352:115:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 2976, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23516:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "23516:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2978, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23560:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2979, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "issuer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5992, + "src": "23560:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 2980, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "23596:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 5998, + "src": "23596:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 2982, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "23635:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 2983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_SELLER", + "nodeType": "MemberAccess", + "src": "23635:26:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 2975, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "23480:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 2984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23480:192:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2985, + "nodeType": "ExpressionStatement", + "src": "23480:192:1" + } + ] + }, + "documentation": { + "id": 2895, + "nodeType": "StructuredDocumentation", + "src": "22084:308:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if no complain, nor cancel had been made.\n All seller deposit is returned to seller.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeFullIssuerDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "22435:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2896, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "22435:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "22434:38:1" + }, + "returnParameters": { + "id": 2899, + "nodeType": "ParameterList", + "parameters": [], + "src": "22496:0:1" + }, + "scope": 4105, + "src": "22398:1282:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3079, + "nodeType": "Block", + "src": "24115:1183:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2993, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24144:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24144:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2995, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "24176:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24144:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 2997, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 2998, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24199:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 2999, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "24231:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24199:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24144:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3017, + "nodeType": "IfStatement", + "src": "24126:273:1", + "trueBody": { + "id": 3016, + "nodeType": "Block", + "src": "24249:150:1", + "statements": [ + { + "expression": { + "id": 3014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3002, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "24264:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3005, + "indexExpression": { + "expression": { + "id": 3003, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24271:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3004, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24271:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24264:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3011, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24348:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3012, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "24348:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3006, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "24296:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3009, + "indexExpression": { + "expression": { + "id": 3007, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24303:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24303:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24296:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "24296:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24296:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24264:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3015, + "nodeType": "ExpressionStatement", + "src": "24264:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3018, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24429:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24429:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3020, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "24461:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24429:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3022, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24484:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3023, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "24484:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3024, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "24516:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24484:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "24429:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3056, + "nodeType": "IfStatement", + "src": "24411:548:1", + "trueBody": { + "id": 3055, + "nodeType": "Block", + "src": "24534:425:1", + "statements": [ + { + "assignments": [ + 3028 + ], + "declarations": [ + { + "constant": false, + "id": 3028, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3055, + "src": "24549:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3027, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "24549:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3036, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3033, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24672:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3034, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "24672:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3030, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "24612:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3029, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "24597:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24597:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "24597:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24597:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "24549:170:1" + }, + { + "expression": { + "id": 3053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3037, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "24736:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3041, + "indexExpression": { + "id": 3038, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "24749:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24736:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3042, + "indexExpression": { + "expression": { + "id": 3039, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24789:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24789:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "24736:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3050, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24908:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3051, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "24908:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3043, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "24828:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3045, + "indexExpression": { + "id": 3044, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3028, + "src": "24841:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24828:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3048, + "indexExpression": { + "expression": { + "id": 3046, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24863:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3047, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "24863:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24828:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "24828:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24828:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24736:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3054, + "nodeType": "ExpressionStatement", + "src": "24736:211:1" + } + ] + } + }, + { + "expression": { + "id": 3066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3057, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "24971:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3059, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "24971:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3063, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25051:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "25051:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 3060, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25003:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3061, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 6012, + "src": "25003:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "25003:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25003:83:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24971:115:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3067, + "nodeType": "ExpressionStatement", + "src": "24971:115:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3069, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25135:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3070, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "25135:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3071, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25179:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "25179:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3073, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2990, + "src": "25215:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "25215:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3075, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "25254:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 3076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_BUYER", + "nodeType": "MemberAccess", + "src": "25254:25:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 3068, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "25099:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 3077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25099:191:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3078, + "nodeType": "ExpressionStatement", + "src": "25099:191:1" + } + ] + }, + "documentation": { + "id": 2988, + "nodeType": "StructuredDocumentation", + "src": "23688:323:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if voucher had been redeemed, or the seller had cancelled.\n All buyer deposit is returned to buyer.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for." + }, + "id": 3080, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeFullHolderDeposit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2990, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 3080, + "src": "24054:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 2989, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "24054:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "24053:38:1" + }, + "returnParameters": { + "id": 2992, + "nodeType": "ParameterList", + "parameters": [], + "src": "24115:0:1" + }, + "scope": 4105, + "src": "24017:1281:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3172, + "nodeType": "Block", + "src": "25756:1165:1", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3086, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25785:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3087, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "25785:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3088, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "25817:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25785:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3090, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25840:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3091, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "25840:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3092, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "25872:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25840:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "25785:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3110, + "nodeType": "IfStatement", + "src": "25767:273:1", + "trueBody": { + "id": 3109, + "nodeType": "Block", + "src": "25890:150:1", + "statements": [ + { + "expression": { + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3095, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "25905:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3098, + "indexExpression": { + "expression": { + "id": 3096, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25912:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3097, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "25912:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "25905:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3104, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25989:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3105, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "25989:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3099, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "25937:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3102, + "indexExpression": { + "expression": { + "id": 3100, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "25944:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "25944:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25937:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "25937:33:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25937:91:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25905:123:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3108, + "nodeType": "ExpressionStatement", + "src": "25905:123:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3111, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26070:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "26070:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3113, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "26102:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "26070:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3115, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26125:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6014, + "src": "26125:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3117, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "26157:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "26125:38:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26070:93:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3149, + "nodeType": "IfStatement", + "src": "26052:548:1", + "trueBody": { + "id": 3148, + "nodeType": "Block", + "src": "26175:425:1", + "statements": [ + { + "assignments": [ + 3121 + ], + "declarations": [ + { + "constant": false, + "id": 3121, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3148, + "src": "26190:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3120, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "26190:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3129, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3126, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26313:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 5988, + "src": "26313:28:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3123, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "26253:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3122, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "26238:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26238:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "26238:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26238:122:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26190:170:1" + }, + { + "expression": { + "id": 3146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3130, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "26377:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3134, + "indexExpression": { + "id": 3131, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3121, + "src": "26390:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26377:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3135, + "indexExpression": { + "expression": { + "id": 3132, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26430:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "26430:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "26377:89:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3143, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26549:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3144, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "26549:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3136, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "26469:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3138, + "indexExpression": { + "id": 3137, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3121, + "src": "26482:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26469:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3141, + "indexExpression": { + "expression": { + "id": 3139, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26504:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3140, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "holder", + "nodeType": "MemberAccess", + "referencedDeclaration": 5994, + "src": "26504:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26469:57:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "26469:61:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26469:119:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26377:211:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3147, + "nodeType": "ExpressionStatement", + "src": "26377:211:1" + } + ] + } + }, + { + "expression": { + "id": 3159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3150, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26612:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3152, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "26612:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3156, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26688:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3157, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "26688:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 3153, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26642:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "deposit2pool", + "nodeType": "MemberAccess", + "referencedDeclaration": 6004, + "src": "26642:27:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "26642:31:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26642:81:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26612:111:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3160, + "nodeType": "ExpressionStatement", + "src": "26612:111:1" + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3162, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26772:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3163, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenIdVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 5990, + "src": "26772:29:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3164, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12079, + "src": "26816:5:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 3165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26816:7:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3166, + "name": "voucherDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "26838:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails memory" + } + }, + "id": 3167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6000, + "src": "26838:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3168, + "name": "PaymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "26877:11:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PaymentType_$1639_$", + "typeString": "type(enum Cashier.PaymentType)" + } + }, + "id": 3169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "DEPOSIT_BUYER", + "nodeType": "MemberAccess", + "src": "26877:25:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_enum$_PaymentType_$1639", + "typeString": "enum Cashier.PaymentType" + } + ], + "id": 3161, + "name": "LogAmountDistribution", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1682, + "src": "26736:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_uint256_$_t_enum$_PaymentType_$1639_$returns$__$", + "typeString": "function (uint256,address,uint256,enum Cashier.PaymentType)" + } + }, + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26736:177:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3171, + "nodeType": "ExpressionStatement", + "src": "26736:177:1" + } + ] + }, + "documentation": { + "id": 3081, + "nodeType": "StructuredDocumentation", + "src": "25306:323:1", + "text": " @notice Following function `releaseDeposits` this function will be triggered if voucher had not been redeemed or cancelled after finalization.\n @param voucherDetails keeps all required information of the voucher which the deposits should be released for.\n All buyer deposit goes to Boson." + }, + "id": 3173, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "distributeHolderDepositOnNotRedeemedNotCancelled", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3083, + "mutability": "mutable", + "name": "voucherDetails", + "nodeType": "VariableDeclaration", + "scope": 3173, + "src": "25703:36:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_memory_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + }, + "typeName": { + "id": 3082, + "name": "VoucherDetails", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6017, + "src": "25703:14:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherDetails_$6017_storage_ptr", + "typeString": "struct UsingHelpers.VoucherDetails" + } + }, + "visibility": "internal" + } + ], + "src": "25692:54:1" + }, + "returnParameters": { + "id": 3085, + "nodeType": "ParameterList", + "parameters": [], + "src": "25756:0:1" + }, + "scope": 4105, + "src": "25635:1286:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8691 + ], + "body": { + "id": 3284, + "nodeType": "Block", + "src": "27637:1181:1", + "statements": [ + { + "assignments": [ + 3189 + ], + "declarations": [ + { + "constant": false, + "id": 3189, + "mutability": "mutable", + "name": "deposit", + "nodeType": "VariableDeclaration", + "scope": 3284, + "src": "27648:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3188, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27648:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3196, + "initialValue": { + "arguments": [ + { + "id": 3194, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "27726:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3191, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "27694:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3190, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "27679:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27679:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSellerDeposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9480, + "src": "27679:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256)" + } + }, + "id": 3195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27679:62:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27648:93:1" + }, + { + "assignments": [ + 3198 + ], + "declarations": [ + { + "constant": false, + "id": 3198, + "mutability": "mutable", + "name": "depositAmount", + "nodeType": "VariableDeclaration", + "scope": 3284, + "src": "27754:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3197, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27754:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3203, + "initialValue": { + "arguments": [ + { + "id": 3201, + "name": "_burnedQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3178, + "src": "27790:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3199, + "name": "deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3189, + "src": "27778:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "27778:11:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27778:23:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27754:47:1" + }, + { + "assignments": [ + 3205 + ], + "declarations": [ + { + "constant": false, + "id": 3205, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 3284, + "src": "27814:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3204, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "27814:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3212, + "initialValue": { + "arguments": [ + { + "id": 3210, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "27921:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3207, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "27864:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3206, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "27849:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27849:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "27849:53:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 3211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27849:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "27814:136:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3214, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "27985:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 3215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28001:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "27985:17:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3217, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28006:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 3218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28023:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "28006:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "27985:39:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 3221, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28039:24:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 3213, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27963:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3222, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27963:111:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3223, + "nodeType": "ExpressionStatement", + "src": "27963:111:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3224, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28091:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3225, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "28108:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28091:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3227, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28118:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3228, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "28135:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28118:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "28091:50:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3243, + "nodeType": "IfStatement", + "src": "28087:141:1", + "trueBody": { + "id": 3242, + "nodeType": "Block", + "src": "28143:85:1", + "statements": [ + { + "expression": { + "id": 3240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3231, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "28158:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3233, + "indexExpression": { + "id": 3232, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28165:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28158:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3238, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3198, + "src": "28202:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3234, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "28179:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3236, + "indexExpression": { + "id": 3235, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28186:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28179:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "28179:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28179:37:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28158:58:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3241, + "nodeType": "ExpressionStatement", + "src": "28158:58:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3244, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28244:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3245, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "28261:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28244:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3247, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28271:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3248, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "28288:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "28271:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "28244:50:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3276, + "nodeType": "IfStatement", + "src": "28240:420:1", + "trueBody": { + "id": 3275, + "nodeType": "Block", + "src": "28296:364:1", + "statements": [ + { + "assignments": [ + 3252 + ], + "declarations": [ + { + "constant": false, + "id": 3252, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3275, + "src": "28311:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3251, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "28311:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3259, + "initialValue": { + "arguments": [ + { + "id": 3257, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "28434:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3254, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "28374:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3253, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "28359:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28359:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "28359:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28359:108:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "28311:156:1" + }, + { + "expression": { + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3260, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "28484:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3263, + "indexExpression": { + "id": 3261, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3252, + "src": "28497:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28484:34:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3264, + "indexExpression": { + "id": 3262, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28519:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "28484:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3271, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3198, + "src": "28634:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3265, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "28533:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3267, + "indexExpression": { + "id": 3266, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3252, + "src": "28564:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28533:66:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3269, + "indexExpression": { + "id": 3268, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28600:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28533:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "28533:100:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28533:115:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28484:164:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3274, + "nodeType": "ExpressionStatement", + "src": "28484:164:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 3278, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3180, + "src": "28704:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 3279, + "name": "depositAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3198, + "src": "28729:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3280, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3205, + "src": "28757:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3281, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "28785:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3277, + "name": "_withdrawDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3449, + "src": "28672:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint8_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint8,uint256)" + } + }, + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28672:138:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3283, + "nodeType": "ExpressionStatement", + "src": "28672:138:1" + } + ] + }, + "documentation": { + "id": 3174, + "nodeType": "StructuredDocumentation", + "src": "26929:522:1", + "text": " @notice External function for withdrawing deposits. Caller must be the seller of the goods, otherwise reverts.\n @notice Seller triggers withdrawals of remaining deposits for a given supply, in case the voucher set is no longer in exchange.\n @param _tokenIdSupply an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for\n @param _burnedQty burned quantity that the deposits should be withdrawn for\n @param _msgSender owner of the voucher set" + }, + "functionSelector": "5321847e", + "id": 3285, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3184, + "modifierName": { + "id": 3183, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13732, + "src": "27609:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27609:12:1" + }, + { + "id": 3186, + "modifierName": { + "id": 3185, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "27622:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "27622:14:1" + } + ], + "name": "withdrawDepositsSe", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3182, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "27600:8:1" + }, + "parameters": { + "id": 3181, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3176, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 3285, + "src": "27495:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27495:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3178, + "mutability": "mutable", + "name": "_burnedQty", + "nodeType": "VariableDeclaration", + "scope": 3285, + "src": "27528:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "27528:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3180, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 3285, + "src": "27557:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 3179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "27557:15:1", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "visibility": "internal" + } + ], + "src": "27484:106:1" + }, + "returnParameters": { + "id": 3187, + "nodeType": "ParameterList", + "parameters": [], + "src": "27637:0:1" + }, + "scope": 4105, + "src": "27457:1361:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 3366, + "nodeType": "Block", + "src": "29675:802:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3298, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "29694:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29716:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29708:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3299, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29708:7:1", + "typeDescriptions": {} + } + }, + "id": 3302, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29708:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "29694:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29720:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3297, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29686:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29686:56:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3306, + "nodeType": "ExpressionStatement", + "src": "29686:56:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3308, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "29851:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 3309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29861:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "29851:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "", + "id": 3311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29864:2:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 3307, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "29843:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29843:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3313, + "nodeType": "ExpressionStatement", + "src": "29843:24:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3314, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "29884:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3315, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "29902:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29884:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3317, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "29912:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3318, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "29930:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29912:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "29884:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3337, + "nodeType": "IfStatement", + "src": "29880:189:1", + "trueBody": { + "id": 3336, + "nodeType": "Block", + "src": "29938:131:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3326, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "29983:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3323, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "29961:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "29953:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 3321, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29953:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 3324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29953:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sendValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 12844, + "src": "29953:29:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 3327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29953:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3328, + "nodeType": "ExpressionStatement", + "src": "29953:38:1" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3330, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "30025:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3331, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "30025:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 3332, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "30037:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3333, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "30049:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3329, + "name": "LogWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "30011:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30011:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3335, + "nodeType": "EmitStatement", + "src": "30006:51:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3338, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "30085:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3339, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "30103:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "30085:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3341, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3292, + "src": "30113:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3342, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "30131:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "30113:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "30085:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3365, + "nodeType": "IfStatement", + "src": "30081:389:1", + "trueBody": { + "id": 3364, + "nodeType": "Block", + "src": "30139:331:1", + "statements": [ + { + "assignments": [ + 3346 + ], + "declarations": [ + { + "constant": false, + "id": 3346, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 3364, + "src": "30154:25:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3345, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30154:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3353, + "initialValue": { + "arguments": [ + { + "id": 3351, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "30272:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3348, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "30214:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3347, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "30199:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30199:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "30199:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30199:106:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30154:151:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3358, + "name": "addressTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3346, + "src": "30370:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3357, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "30363:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$12577_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 3359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30363:25:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + }, + { + "id": 3360, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3288, + "src": "30407:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3361, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3290, + "src": "30436:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3354, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12790, + "src": "30322:9:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeERC20_$12790_$", + "typeString": "type(library SafeERC20)" + } + }, + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 12611, + "src": "30322:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12577_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30322:136:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3363, + "nodeType": "ExpressionStatement", + "src": "30322:136:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 3286, + "nodeType": "StructuredDocumentation", + "src": "28826:681:1", + "text": " @notice Internal function for withdrawing payments.\n As unbelievable as it is, neither .send() nor .transfer() are now secure to use due to EIP-1884\n So now transferring funds via the last remaining option: .call()\n See https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/\n @param _recipient address of the account receiving funds from the escrow\n @param _amount amount to be released from escrow\n @param _paymentMethod payment method that should be used to determine, how to do the payouts\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to" + }, + "id": 3367, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawPayments", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3295, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3288, + "mutability": "mutable", + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29550:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3287, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29550:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3290, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29579:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29579:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3292, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29605:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3291, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "29605:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3294, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 3367, + "src": "29636:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3293, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29636:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "29539:126:1" + }, + "returnParameters": { + "id": 3296, + "nodeType": "ParameterList", + "parameters": [], + "src": "29675:0:1" + }, + "scope": 4105, + "src": "29513:964:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3448, + "nodeType": "Block", + "src": "31068:810:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3380, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31087:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31109:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31101:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3381, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31101:7:1", + "typeDescriptions": {} + } + }, + "id": 3384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31101:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "31087:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31113:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3379, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31079:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31079:56:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3388, + "nodeType": "ExpressionStatement", + "src": "31079:56:1" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3390, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31244:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 3391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31254:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31244:11:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "", + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31257:2:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 3389, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31236:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31236:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3395, + "nodeType": "ExpressionStatement", + "src": "31236:24:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3396, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31277:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3397, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "31295:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31277:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3399, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31305:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3400, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "31323:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31305:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31277:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3419, + "nodeType": "IfStatement", + "src": "31273:189:1", + "trueBody": { + "id": 3418, + "nodeType": "Block", + "src": "31331:131:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3408, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31376:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3405, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31354:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "31346:8:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_payable_$", + "typeString": "type(address payable)" + }, + "typeName": { + "id": 3403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31346:8:1", + "stateMutability": "payable", + "typeDescriptions": {} + } + }, + "id": 3406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31346:19:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 3407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sendValue", + "nodeType": "MemberAccess", + "referencedDeclaration": 12844, + "src": "31346:29:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", + "typeString": "function (address payable,uint256)" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31346:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3410, + "nodeType": "ExpressionStatement", + "src": "31346:38:1" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3412, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "31418:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "31418:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 3414, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31430:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3415, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31442:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3411, + "name": "LogWithdrawal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1672, + "src": "31404:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 3416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31404:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3417, + "nodeType": "EmitStatement", + "src": "31399:51:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3420, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31478:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3421, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "31496:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31478:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3423, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3374, + "src": "31506:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3424, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "31524:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "31506:24:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "31478:52:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3447, + "nodeType": "IfStatement", + "src": "31474:397:1", + "trueBody": { + "id": 3446, + "nodeType": "Block", + "src": "31532:339:1", + "statements": [ + { + "assignments": [ + 3428 + ], + "declarations": [ + { + "constant": false, + "id": 3428, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 3446, + "src": "31547:28:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "31547:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3435, + "initialValue": { + "arguments": [ + { + "id": 3433, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3376, + "src": "31670:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3430, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "31610:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3429, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "31595:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31595:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "31595:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31595:108:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31547:156:1" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 3440, + "name": "addressTokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3428, + "src": "31768:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3439, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12577, + "src": "31761:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$12577_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 3441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31761:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + } + }, + { + "id": 3442, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3370, + "src": "31808:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3443, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3372, + "src": "31837:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$12577", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3436, + "name": "SafeERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12790, + "src": "31720:9:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_SafeERC20_$12790_$", + "typeString": "type(library SafeERC20)" + } + }, + "id": 3438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 12611, + "src": "31720:22:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$12577_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31720:139:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3445, + "nodeType": "ExpressionStatement", + "src": "31720:139:1" + } + ] + } + } + ] + }, + "documentation": { + "id": 3368, + "nodeType": "StructuredDocumentation", + "src": "30485:415:1", + "text": " @notice Internal function for withdrawing deposits.\n @param _recipient address of the account receiving funds from the escrow\n @param _amount amount to be released from escrow\n @param _paymentMethod payment method that should be used to determine, how to do the payouts\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to" + }, + "id": 3449, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawDeposits", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3370, + "mutability": "mutable", + "name": "_recipient", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "30943:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "30943:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3372, + "mutability": "mutable", + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "30972:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3371, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30972:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3374, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "30998:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3373, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "30998:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3376, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 3449, + "src": "31029:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3375, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31029:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30932:126:1" + }, + "returnParameters": { + "id": 3378, + "nodeType": "ParameterList", + "parameters": [], + "src": "31068:0:1" + }, + "scope": 4105, + "src": "30906:972:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 8777 + ], + "body": { + "id": 3478, + "nodeType": "Block", + "src": "32152:295:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3459, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3452, + "src": "32171:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32202:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3461, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32194:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32194:7:1", + "typeDescriptions": {} + } + }, + "id": 3463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32194:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "32171:33:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32206:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3458, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32163:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32163:65:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3467, + "nodeType": "ExpressionStatement", + "src": "32163:65:1" + }, + { + "expression": { + "id": 3470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3468, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "32331:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3469, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3452, + "src": "32352:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "32331:40:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3471, + "nodeType": "ExpressionStatement", + "src": "32331:40:1" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3473, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3452, + "src": "32407:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3474, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32428:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32428:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 3472, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1658, + "src": "32389:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32389:50:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3477, + "nodeType": "EmitStatement", + "src": "32384:55:1" + } + ] + }, + "documentation": { + "id": 3450, + "nodeType": "StructuredDocumentation", + "src": "31886:140:1", + "text": " @notice Set the address of the BR contract\n @param _bosonRouterAddress The address of the Boson Route contract" + }, + "functionSelector": "bd17de40", + "id": 3479, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3456, + "modifierName": { + "id": 3455, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "32137:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "32137:9:1" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3454, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32119:8:1" + }, + "parameters": { + "id": 3453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3452, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 3479, + "src": "32063:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32063:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "32062:29:1" + }, + "returnParameters": { + "id": 3457, + "nodeType": "ParameterList", + "parameters": [], + "src": "32152:0:1" + }, + "scope": 4105, + "src": "32032:415:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8783 + ], + "body": { + "id": 3508, + "nodeType": "Block", + "src": "32742:312:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3489, + "name": "_tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3482, + "src": "32768:22:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 3492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32802:1:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3491, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "32794:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3490, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32794:7:1", + "typeDescriptions": {} + } + }, + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32794:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "32768:36:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 3495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32806:21:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 3488, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32760:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32760:68:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3497, + "nodeType": "ExpressionStatement", + "src": "32760:68:1" + }, + { + "expression": { + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3498, + "name": "tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1633, + "src": "32929:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3499, + "name": "_tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3482, + "src": "32953:22:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "32929:46:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3501, + "nodeType": "ExpressionStatement", + "src": "32929:46:1" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3503, + "name": "_tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3482, + "src": "33011:22:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 3504, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "33035:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "33035:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 3502, + "name": "LogTokenContractSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1664, + "src": "32991:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 3506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32991:55:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3507, + "nodeType": "EmitStatement", + "src": "32986:60:1" + } + ] + }, + "documentation": { + "id": 3480, + "nodeType": "StructuredDocumentation", + "src": "32455:156:1", + "text": " @notice Set the address of the ERC1155ERC721 contract\n @param _tokensContractAddress The address of the ERC1155ERC721 contract" + }, + "functionSelector": "b23d4854", + "id": 3509, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3486, + "modifierName": { + "id": 3485, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "32727:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "32727:9:1" + } + ], + "name": "setTokenContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3484, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32709:8:1" + }, + "parameters": { + "id": 3483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3482, + "mutability": "mutable", + "name": "_tokensContractAddress", + "nodeType": "VariableDeclaration", + "scope": 3509, + "src": "32650:30:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "32650:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "32649:32:1" + }, + "returnParameters": { + "id": 3487, + "nodeType": "ParameterList", + "parameters": [], + "src": "32742:0:1" + }, + "scope": 4105, + "src": "32617:437:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8705 + ], + "body": { + "id": 3530, + "nodeType": "Block", + "src": "33386:69:1", + "statements": [ + { + "expression": { + "id": 3528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3518, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "33397:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3520, + "indexExpression": { + "id": 3519, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "33404:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "33397:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3525, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "33437:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "src": "33437:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3521, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "33416:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3523, + "indexExpression": { + "id": 3522, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3512, + "src": "33423:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33416:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "33416:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33416:31:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33397:50:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3529, + "nodeType": "ExpressionStatement", + "src": "33397:50:1" + } + ] + }, + "documentation": { + "id": 3510, + "nodeType": "StructuredDocumentation", + "src": "33064:191:1", + "text": " @notice Update the amount in escrow of an address with the new value, based on VoucherSet/Voucher interaction\n @param _account The address of an account to update" + }, + "functionSelector": "19946845", + "id": 3531, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3516, + "modifierName": { + "id": 3515, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "33366:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "33366:14:1" + } + ], + "name": "addEscrowAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3514, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "33331:8:1" + }, + "parameters": { + "id": 3513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3512, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 3531, + "src": "33286:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33286:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "33285:18:1" + }, + "returnParameters": { + "id": 3517, + "nodeType": "ParameterList", + "parameters": [], + "src": "33386:0:1" + }, + "scope": 4105, + "src": "33261:194:1", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8715 + ], + "body": { + "id": 3559, + "nodeType": "Block", + "src": "33920:99:1", + "statements": [ + { + "expression": { + "id": 3557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3544, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "33931:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3547, + "indexExpression": { + "id": 3545, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "33944:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33931:20:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3548, + "indexExpression": { + "id": 3546, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3536, + "src": "33952:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "33931:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3555, + "name": "_newAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3538, + "src": "34000:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3549, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "33965:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3551, + "indexExpression": { + "id": 3550, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3534, + "src": "33978:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33965:20:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3553, + "indexExpression": { + "id": 3552, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3536, + "src": "33986:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33965:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "33965:34:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33965:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33931:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3558, + "nodeType": "ExpressionStatement", + "src": "33931:80:1" + } + ] + }, + "documentation": { + "id": 3532, + "nodeType": "StructuredDocumentation", + "src": "33463:299:1", + "text": " @notice Update the amount in escrowTokens of an address with the new value, based on VoucherSet/Voucher interaction\n @param _token The address of a token to query\n @param _account The address of an account to query\n @param _newAmount New amount to be set" + }, + "functionSelector": "1429dae8", + "id": 3560, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3542, + "modifierName": { + "id": 3541, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1724, + "src": "33905:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "33905:14:1" + } + ], + "name": "addEscrowTokensAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3540, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "33896:8:1" + }, + "parameters": { + "id": 3539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3534, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 3560, + "src": "33809:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33809:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3536, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 3560, + "src": "33834:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3535, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "33834:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3538, + "mutability": "mutable", + "name": "_newAmount", + "nodeType": "VariableDeclaration", + "scope": 3560, + "src": "33861:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "33861:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "33798:88:1" + }, + "returnParameters": { + "id": 3543, + "nodeType": "ParameterList", + "parameters": [], + "src": "33920:0:1" + }, + "scope": 4105, + "src": "33768:251:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8725 + ], + "body": { + "id": 3861, + "nodeType": "Block", + "src": "34516:3061:1", + "statements": [ + { + "assignments": [ + 3574 + ], + "declarations": [ + { + "constant": false, + "id": 3574, + "mutability": "mutable", + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34527:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3573, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34527:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3575, + "nodeType": "VariableDeclarationStatement", + "src": "34527:20:1" + }, + { + "assignments": [ + 3577 + ], + "declarations": [ + { + "constant": false, + "id": 3577, + "mutability": "mutable", + "name": "tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34560:21:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3576, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34560:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3584, + "initialValue": { + "arguments": [ + { + "id": 3582, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3567, + "src": "34668:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3579, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "34612:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3578, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "34597:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34597:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getIdSupplyFromVoucher", + "nodeType": "MemberAccess", + "referencedDeclaration": 9488, + "src": "34597:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure external returns (uint256)" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34597:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34560:138:1" + }, + { + "assignments": [ + 3586 + ], + "declarations": [ + { + "constant": false, + "id": 3586, + "mutability": "mutable", + "name": "paymentType", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34711:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3585, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "34711:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3593, + "initialValue": { + "arguments": [ + { + "id": 3591, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "34816:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3588, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "34759:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3587, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "34744:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34744:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "34744:53:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34744:100:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34711:133:1" + }, + { + "assignments": [ + 3595, + 3597 + ], + "declarations": [ + { + "constant": false, + "id": 3595, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34858:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34858:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3597, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 3861, + "src": "34873:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34873:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3604, + "initialValue": { + "arguments": [ + { + "id": 3602, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "34956:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3599, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "34922:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3598, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "34907:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34907:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getBuyerOrderCosts", + "nodeType": "MemberAccess", + "referencedDeclaration": 9472, + "src": "34907:48:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256,uint256)" + } + }, + "id": 3603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34907:63:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "34857:113:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3605, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "34987:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3606, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "35002:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34987:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3638, + "nodeType": "IfStatement", + "src": "34983:289:1", + "trueBody": { + "id": 3637, + "nodeType": "Block", + "src": "35010:262:1", + "statements": [ + { + "assignments": [ + 3609 + ], + "declarations": [ + { + "constant": false, + "id": 3609, + "mutability": "mutable", + "name": "totalAmount", + "nodeType": "VariableDeclaration", + "scope": 3637, + "src": "35025:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35025:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3614, + "initialValue": { + "arguments": [ + { + "id": 3612, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "35057:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3610, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "35047:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35047:9:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35047:20:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35025:42:1" + }, + { + "expression": { + "id": 3624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3615, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35157:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3617, + "indexExpression": { + "id": 3616, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35164:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35157:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3622, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3609, + "src": "35191:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3618, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35173:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3620, + "indexExpression": { + "id": 3619, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35180:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35173:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "35173:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35173:30:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35157:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3625, + "nodeType": "ExpressionStatement", + "src": "35157:46:1" + }, + { + "expression": { + "id": 3635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3626, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35218:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3628, + "indexExpression": { + "id": 3627, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35225:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35218:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3633, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3609, + "src": "35248:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3629, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35232:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3631, + "indexExpression": { + "id": 3630, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35239:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35232:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35232:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35232:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35218:42:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3636, + "nodeType": "ExpressionStatement", + "src": "35218:42:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3639, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "35290:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3640, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "35305:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "35290:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3704, + "nodeType": "IfStatement", + "src": "35286:652:1", + "trueBody": { + "id": 3703, + "nodeType": "Block", + "src": "35313:625:1", + "statements": [ + { + "expression": { + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3642, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35411:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3644, + "indexExpression": { + "id": 3643, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35418:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35411:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3649, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "35445:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3645, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35427:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3647, + "indexExpression": { + "id": 3646, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35434:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35427:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "35427:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35427:24:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35411:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3652, + "nodeType": "ExpressionStatement", + "src": "35411:40:1" + }, + { + "expression": { + "id": 3662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3653, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35466:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3655, + "indexExpression": { + "id": 3654, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35473:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35466:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3660, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "35496:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3656, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "35480:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3658, + "indexExpression": { + "id": 3657, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35487:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35480:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35480:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35480:22:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35466:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3663, + "nodeType": "ExpressionStatement", + "src": "35466:36:1" + }, + { + "expression": { + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3664, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35519:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3669, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "35605:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3666, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "35549:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3665, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "35534:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35534:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "35534:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35534:99:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35519:114:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3672, + "nodeType": "ExpressionStatement", + "src": "35519:114:1" + }, + { + "expression": { + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3673, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35745:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3676, + "indexExpression": { + "id": 3674, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35758:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35745:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3677, + "indexExpression": { + "id": 3675, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35772:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35745:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3684, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "35819:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3678, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35781:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3680, + "indexExpression": { + "id": 3679, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35794:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35781:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3682, + "indexExpression": { + "id": 3681, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "35808:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35781:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "35781:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35781:48:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35745:84:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3687, + "nodeType": "ExpressionStatement", + "src": "35745:84:1" + }, + { + "expression": { + "id": 3701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3688, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35844:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3691, + "indexExpression": { + "id": 3689, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35857:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35844:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3692, + "indexExpression": { + "id": 3690, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35871:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "35844:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3699, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "35914:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3693, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "35878:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3695, + "indexExpression": { + "id": 3694, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35891:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35878:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3697, + "indexExpression": { + "id": 3696, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "35905:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35878:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "35878:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35878:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "35844:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3702, + "nodeType": "ExpressionStatement", + "src": "35844:80:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3705, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "35954:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3706, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "35969:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "35954:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3770, + "nodeType": "IfStatement", + "src": "35950:657:1", + "trueBody": { + "id": 3769, + "nodeType": "Block", + "src": "35977:630:1", + "statements": [ + { + "expression": { + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3708, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "35992:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3713, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "36076:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3710, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "36022:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3709, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "36007:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36007:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "36007:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36007:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35992:112:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3716, + "nodeType": "ExpressionStatement", + "src": "35992:112:1" + }, + { + "expression": { + "id": 3730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3717, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36225:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3720, + "indexExpression": { + "id": 3718, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36238:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36225:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3721, + "indexExpression": { + "id": 3719, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36252:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36225:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3728, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "36299:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3722, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36261:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3724, + "indexExpression": { + "id": 3723, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36274:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36261:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3726, + "indexExpression": { + "id": 3725, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36288:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36261:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "36261:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36261:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36225:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3731, + "nodeType": "ExpressionStatement", + "src": "36225:80:1" + }, + { + "expression": { + "id": 3745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3732, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36320:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3735, + "indexExpression": { + "id": 3733, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36333:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36320:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3736, + "indexExpression": { + "id": 3734, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36347:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36320:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3743, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "36390:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3737, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36354:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3739, + "indexExpression": { + "id": 3738, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36367:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36354:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3741, + "indexExpression": { + "id": 3740, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36381:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36354:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "36354:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36354:42:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36320:76:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3746, + "nodeType": "ExpressionStatement", + "src": "36320:76:1" + }, + { + "expression": { + "id": 3756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3747, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36496:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3749, + "indexExpression": { + "id": 3748, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36503:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36496:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3754, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "36530:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3750, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36512:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3752, + "indexExpression": { + "id": 3751, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36519:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36512:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "36512:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36512:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36496:44:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3757, + "nodeType": "ExpressionStatement", + "src": "36496:44:1" + }, + { + "expression": { + "id": 3767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3758, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36555:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3760, + "indexExpression": { + "id": 3759, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36562:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36555:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3765, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "36585:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3761, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "36569:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3763, + "indexExpression": { + "id": 3762, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "36576:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36569:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "36569:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36569:26:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36555:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3768, + "nodeType": "ExpressionStatement", + "src": "36555:40:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3771, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3586, + "src": "36623:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3772, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "36638:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "36623:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3853, + "nodeType": "IfStatement", + "src": "36619:875:1", + "trueBody": { + "id": 3852, + "nodeType": "Block", + "src": "36646:848:1", + "statements": [ + { + "expression": { + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3774, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36661:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3779, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "36745:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3776, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "36691:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3775, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "36676:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36676:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPriceToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9454, + "src": "36676:50:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36676:97:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36661:112:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3782, + "nodeType": "ExpressionStatement", + "src": "36661:112:1" + }, + { + "expression": { + "id": 3796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3783, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36886:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3786, + "indexExpression": { + "id": 3784, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36899:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36886:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3787, + "indexExpression": { + "id": 3785, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36913:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36886:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3794, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "36960:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3788, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36922:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3790, + "indexExpression": { + "id": 3789, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36935:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36922:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3792, + "indexExpression": { + "id": 3791, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "36949:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36922:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "36922:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36922:44:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36886:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3797, + "nodeType": "ExpressionStatement", + "src": "36886:80:1" + }, + { + "expression": { + "id": 3811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3798, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "36981:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3801, + "indexExpression": { + "id": 3799, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "36994:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "36981:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3802, + "indexExpression": { + "id": 3800, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37008:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "36981:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3809, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3595, + "src": "37051:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3803, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37015:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3805, + "indexExpression": { + "id": 3804, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37028:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37015:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3807, + "indexExpression": { + "id": 3806, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37042:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37015:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "37015:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37015:42:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36981:76:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3812, + "nodeType": "ExpressionStatement", + "src": "36981:76:1" + }, + { + "expression": { + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3813, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37074:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3818, + "name": "tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3577, + "src": "37160:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3815, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "37104:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3814, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "37089:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37089:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "37089:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37089:99:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "37074:114:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3821, + "nodeType": "ExpressionStatement", + "src": "37074:114:1" + }, + { + "expression": { + "id": 3835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3822, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37301:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3825, + "indexExpression": { + "id": 3823, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37314:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37301:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3826, + "indexExpression": { + "id": 3824, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "37328:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "37301:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3833, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "37375:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3827, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37337:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3829, + "indexExpression": { + "id": 3828, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37350:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37337:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3831, + "indexExpression": { + "id": 3830, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3563, + "src": "37364:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37337:33:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "37337:37:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37337:48:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37301:84:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3836, + "nodeType": "ExpressionStatement", + "src": "37301:84:1" + }, + { + "expression": { + "id": 3850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3837, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37400:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3840, + "indexExpression": { + "id": 3838, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37413:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37400:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3841, + "indexExpression": { + "id": 3839, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37427:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "37400:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3848, + "name": "depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3597, + "src": "37470:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3842, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "37434:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3844, + "indexExpression": { + "id": 3843, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3574, + "src": "37447:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37434:26:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3846, + "indexExpression": { + "id": 3845, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37461:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37434:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "37434:35:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37434:46:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37400:80:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3851, + "nodeType": "ExpressionStatement", + "src": "37400:80:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 3858, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3565, + "src": "37565:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 3855, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "37522:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3854, + "name": "IBosonRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8660, + "src": "37509:12:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBosonRouter_$8660_$", + "typeString": "type(contract IBosonRouter)" + } + }, + "id": 3856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBosonRouter_$8660", + "typeString": "contract IBosonRouter" + } + }, + "id": 3857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "incrementCorrelationId", + "nodeType": "MemberAccess", + "referencedDeclaration": 8633, + "src": "37509:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3860, + "nodeType": "ExpressionStatement", + "src": "37509:60:1" + } + ] + }, + "documentation": { + "id": 3561, + "nodeType": "StructuredDocumentation", + "src": "34027:333:1", + "text": " @notice Hook which will be triggered when a _tokenIdVoucher will be transferred. Escrow funds should be allocated to the new owner.\n @param _from prev owner of the _tokenIdVoucher\n @param _to next owner of the _tokenIdVoucher\n @param _tokenIdVoucher _tokenIdVoucher that has been transferred" + }, + "functionSelector": "a2919f63", + "id": 3862, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3571, + "modifierName": { + "id": 3570, + "name": "onlyTokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1753, + "src": "34497:18:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "34497:18:1" + } + ], + "name": "onERC721Transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3569, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "34488:8:1" + }, + "parameters": { + "id": 3568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3563, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 3862, + "src": "34402:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34402:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3565, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 3862, + "src": "34426:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "34426:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3567, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 3862, + "src": "34448:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3566, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "34448:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "34391:87:1" + }, + "returnParameters": { + "id": 3572, + "nodeType": "ParameterList", + "parameters": [], + "src": "34516:0:1" + }, + "scope": 4105, + "src": "34366:3211:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8737 + ], + "body": { + "id": 4018, + "nodeType": "Block", + "src": "38187:1594:1", + "statements": [ + { + "assignments": [ + 3878 + ], + "declarations": [ + { + "constant": false, + "id": 3878, + "mutability": "mutable", + "name": "paymentType", + "nodeType": "VariableDeclaration", + "scope": 4018, + "src": "38198:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3877, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "38198:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3885, + "initialValue": { + "arguments": [ + { + "id": 3883, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "38303:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3880, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "38246:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3879, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "38231:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38231:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherPaymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 9526, + "src": "38231:53:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view external returns (uint8)" + } + }, + "id": 3884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38231:101:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38198:134:1" + }, + { + "assignments": [ + 3887 + ], + "declarations": [ + { + "constant": false, + "id": 3887, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 4018, + "src": "38345:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3886, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38345:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3888, + "nodeType": "VariableDeclarationStatement", + "src": "38345:17:1" + }, + { + "assignments": [ + 3890 + ], + "declarations": [ + { + "constant": false, + "id": 3890, + "mutability": "mutable", + "name": "totalAmount", + "nodeType": "VariableDeclaration", + "scope": 4018, + "src": "38373:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3889, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38373:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3891, + "nodeType": "VariableDeclarationStatement", + "src": "38373:19:1" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3892, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38409:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3893, + "name": "ETHETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5977, + "src": "38424:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38409:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3895, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38434:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3896, + "name": "TKNETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5983, + "src": "38449:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38434:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "38409:46:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3938, + "nodeType": "IfStatement", + "src": "38405:428:1", + "trueBody": { + "id": 3937, + "nodeType": "Block", + "src": "38457:376:1", + "statements": [ + { + "expression": { + "id": 3906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3899, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "38472:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3904, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "38549:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3901, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "38499:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3900, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "38484:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38484:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSellerDeposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9480, + "src": "38484:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256)" + } + }, + "id": 3905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38484:94:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38472:106:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3907, + "nodeType": "ExpressionStatement", + "src": "38472:106:1" + }, + { + "expression": { + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3908, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "38593:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3911, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3871, + "src": "38621:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3909, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "38607:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "38607:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38607:21:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38593:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3914, + "nodeType": "ExpressionStatement", + "src": "38593:35:1" + }, + { + "expression": { + "id": 3924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3915, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38718:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3917, + "indexExpression": { + "id": 3916, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "38725:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "38718:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3922, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "38752:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3918, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38734:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3920, + "indexExpression": { + "id": 3919, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "38741:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38734:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "38734:17:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38734:30:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38718:46:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3925, + "nodeType": "ExpressionStatement", + "src": "38718:46:1" + }, + { + "expression": { + "id": 3935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 3926, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38779:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3928, + "indexExpression": { + "id": 3927, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "38786:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "38779:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3933, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "38809:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "id": 3929, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "38793:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3931, + "indexExpression": { + "id": 3930, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "38800:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38793:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "38793:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38793:28:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38779:42:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3936, + "nodeType": "ExpressionStatement", + "src": "38779:42:1" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3939, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38849:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3940, + "name": "ETHTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5980, + "src": "38864:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38849:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3942, + "name": "paymentType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3878, + "src": "38874:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 3943, + "name": "TKNTKN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5986, + "src": "38889:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "38874:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "38849:46:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4002, + "nodeType": "IfStatement", + "src": "38845:730:1", + "trueBody": { + "id": 4001, + "nodeType": "Block", + "src": "38897:678:1", + "statements": [ + { + "assignments": [ + 3947 + ], + "declarations": [ + { + "constant": false, + "id": 3947, + "mutability": "mutable", + "name": "tokenDepositAddress", + "nodeType": "VariableDeclaration", + "scope": 4001, + "src": "38912:27:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3946, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38912:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 3954, + "initialValue": { + "arguments": [ + { + "id": 3952, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "39034:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3949, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "38974:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3948, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "38959:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38959:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getVoucherDepositToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 9462, + "src": "38959:52:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 3953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38959:108:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38912:155:1" + }, + { + "expression": { + "id": 3962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3955, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "39084:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3960, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "39161:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 3957, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "39111:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3956, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "39096:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 3958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39096:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getSellerDeposit", + "nodeType": "MemberAccess", + "referencedDeclaration": 9480, + "src": "39096:46:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) view external returns (uint256)" + } + }, + "id": 3961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39096:94:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39084:106:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3963, + "nodeType": "ExpressionStatement", + "src": "39084:106:1" + }, + { + "expression": { + "id": 3969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3964, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "39205:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3967, + "name": "_value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3871, + "src": "39233:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 3965, + "name": "depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3887, + "src": "39219:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 12382, + "src": "39219:13:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39219:21:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39205:35:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3970, + "nodeType": "ExpressionStatement", + "src": "39205:35:1" + }, + { + "expression": { + "id": 3984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3971, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39352:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3974, + "indexExpression": { + "id": 3972, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39365:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39352:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3975, + "indexExpression": { + "id": 3973, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "39386:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "39352:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3982, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "39440:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3976, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39395:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3978, + "indexExpression": { + "id": 3977, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39408:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39395:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3980, + "indexExpression": { + "id": 3979, + "name": "_from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3865, + "src": "39429:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39395:40:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 12348, + "src": "39395:44:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39395:57:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39352:100:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3985, + "nodeType": "ExpressionStatement", + "src": "39352:100:1" + }, + { + "expression": { + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 3986, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39467:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3989, + "indexExpression": { + "id": 3987, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39480:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39467:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3990, + "indexExpression": { + "id": 3988, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39501:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "39467:38:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3997, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3890, + "src": "39551:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "baseExpression": { + "baseExpression": { + "id": 3991, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "39508:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 3993, + "indexExpression": { + "id": 3992, + "name": "tokenDepositAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3947, + "src": "39521:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39508:33:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 3995, + "indexExpression": { + "id": 3994, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39542:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39508:38:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 12326, + "src": "39508:42:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39508:55:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "39467:96:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4000, + "nodeType": "ExpressionStatement", + "src": "39467:96:1" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4007, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3869, + "src": "39657:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 4008, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39686:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 4004, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "39602:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4003, + "name": "IVoucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9643, + "src": "39587:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IVoucherKernel_$9643_$", + "typeString": "type(contract IVoucherKernel)" + } + }, + "id": 4005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39587:29:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 4006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setSupplyHolderOnTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 9420, + "src": "39587:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address) external" + } + }, + "id": 4009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39587:113:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4010, + "nodeType": "ExpressionStatement", + "src": "39587:113:1" + }, + { + "expression": { + "arguments": [ + { + "id": 4015, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3867, + "src": "39769:3:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 4012, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "39726:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4011, + "name": "IBosonRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8660, + "src": "39713:12:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IBosonRouter_$8660_$", + "typeString": "type(contract IBosonRouter)" + } + }, + "id": 4013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39713:32:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IBosonRouter_$8660", + "typeString": "contract IBosonRouter" + } + }, + "id": 4014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "incrementCorrelationId", + "nodeType": "MemberAccess", + "referencedDeclaration": 8633, + "src": "39713:55:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39713:60:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4017, + "nodeType": "ExpressionStatement", + "src": "39713:60:1" + } + ] + }, + "documentation": { + "id": 3863, + "nodeType": "StructuredDocumentation", + "src": "37585:421:1", + "text": " @notice After the transfer happens the _tokenSupplyId should be updated in the promise. Escrow funds for the seller's deposits (If in ETH) should be allocated to the new owner as well.\n @param _from prev owner of the _tokenSupplyId\n @param _to nex owner of the _tokenSupplyId\n @param _tokenSupplyId _tokenSupplyId for transfer\n @param _value qty which has been transferred" + }, + "functionSelector": "5711fd77", + "id": 4019, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3875, + "modifierName": { + "id": 3874, + "name": "onlyTokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1753, + "src": "38168:18:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "38168:18:1" + } + ], + "name": "onERC1155Transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3873, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38159:8:1" + }, + "parameters": { + "id": 3872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3865, + "mutability": "mutable", + "name": "_from", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38049:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3864, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38049:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3867, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38073:11:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3866, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "38073:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3869, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38095:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3868, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38095:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3871, + "mutability": "mutable", + "name": "_value", + "nodeType": "VariableDeclaration", + "scope": 4019, + "src": "38128:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38128:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38038:111:1" + }, + "returnParameters": { + "id": 3876, + "nodeType": "ParameterList", + "parameters": [], + "src": "38187:0:1" + }, + "scope": 4105, + "src": "38012:1769:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 4031, + "nodeType": "Block", + "src": "39900:77:1", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 4024, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "39919:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "39919:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 4026, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "39933:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "39919:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5041594545", + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "39953:15:1", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e5e5ab0b8db5cdc836d0a25c05428d3402358fcbc24bfa86b879a92a492268a", + "typeString": "literal_string \"INVALID_PAYEE\"" + }, + "value": "INVALID_PAYEE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e5e5ab0b8db5cdc836d0a25c05428d3402358fcbc24bfa86b879a92a492268a", + "typeString": "literal_string \"INVALID_PAYEE\"" + } + ], + "id": 4023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "39911:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39911:58:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4030, + "nodeType": "ExpressionStatement", + "src": "39911:58:1" + } + ] + }, + "documentation": { + "id": 4020, + "nodeType": "StructuredDocumentation", + "src": "39789:78:1", + "text": " @notice Only accept ETH via fallback from the BR Contract" + }, + "id": 4032, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4021, + "nodeType": "ParameterList", + "parameters": [], + "src": "39880:2:1" + }, + "returnParameters": { + "id": 4022, + "nodeType": "ParameterList", + "parameters": [], + "src": "39900:0:1" + }, + "scope": 4105, + "src": "39873:104:1", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8743 + ], + "body": { + "id": 4041, + "nodeType": "Block", + "src": "40309:39:1", + "statements": [ + { + "expression": { + "id": 4039, + "name": "voucherKernel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1629, + "src": "40327:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4038, + "id": 4040, + "nodeType": "Return", + "src": "40320:20:1" + } + ] + }, + "documentation": { + "id": 4033, + "nodeType": "StructuredDocumentation", + "src": "40061:122:1", + "text": " @notice Get the address of Voucher Kernel contract\n @return Address of Voucher Kernel contract" + }, + "functionSelector": "e3f5d2d5", + "id": 4042, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherKernelAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4035, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40268:8:1" + }, + "parameters": { + "id": 4034, + "nodeType": "ParameterList", + "parameters": [], + "src": "40221:2:1" + }, + "returnParameters": { + "id": 4038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4037, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4042, + "src": "40295:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40295:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "40294:9:1" + }, + "scope": 4105, + "src": "40189:159:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8749 + ], + "body": { + "id": 4051, + "nodeType": "Block", + "src": "40598:44:1", + "statements": [ + { + "expression": { + "id": 4049, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1631, + "src": "40616:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4048, + "id": 4050, + "nodeType": "Return", + "src": "40609:25:1" + } + ] + }, + "documentation": { + "id": 4043, + "nodeType": "StructuredDocumentation", + "src": "40356:118:1", + "text": " @notice Get the address of Boson Router contract\n @return Address of Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 4052, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4045, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40557:8:1" + }, + "parameters": { + "id": 4044, + "nodeType": "ParameterList", + "parameters": [], + "src": "40510:2:1" + }, + "returnParameters": { + "id": 4048, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4047, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4052, + "src": "40584:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4046, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40584:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "40583:9:1" + }, + "scope": 4105, + "src": "40480:162:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8755 + ], + "body": { + "id": 4061, + "nodeType": "Block", + "src": "40897:47:1", + "statements": [ + { + "expression": { + "id": 4059, + "name": "tokensContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1633, + "src": "40915:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4058, + "id": 4060, + "nodeType": "Return", + "src": "40908:28:1" + } + ] + }, + "documentation": { + "id": 4053, + "nodeType": "StructuredDocumentation", + "src": "40650:120:1", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 4062, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4055, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40856:8:1" + }, + "parameters": { + "id": 4054, + "nodeType": "ParameterList", + "parameters": [], + "src": "40809:2:1" + }, + "returnParameters": { + "id": 4058, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4057, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4062, + "src": "40883:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4056, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "40883:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "40882:9:1" + }, + "scope": 4105, + "src": "40776:168:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8761 + ], + "body": { + "id": 4071, + "nodeType": "Block", + "src": "41146:39:1", + "statements": [ + { + "expression": { + "id": 4069, + "name": "disasterState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1635, + "src": "41164:13:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4068, + "id": 4070, + "nodeType": "Return", + "src": "41157:20:1" + } + ] + }, + "documentation": { + "id": 4063, + "nodeType": "StructuredDocumentation", + "src": "40952:121:1", + "text": " @notice Ensure whether or not contract has been set to disaster state \n @return disasterState" + }, + "functionSelector": "598e2e0c", + "id": 4072, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDisasterStateSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4065, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41123:8:1" + }, + "parameters": { + "id": 4064, + "nodeType": "ParameterList", + "parameters": [], + "src": "41106:2:1" + }, + "returnParameters": { + "id": 4068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4072, + "src": "41140:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4066, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "41140:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "41139:6:1" + }, + "scope": 4105, + "src": "41079:106:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8699 + ], + "body": { + "id": 4085, + "nodeType": "Block", + "src": "41498:42:1", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 4081, + "name": "escrow", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1643, + "src": "41516:6:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4083, + "indexExpression": { + "id": 4082, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4075, + "src": "41523:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41516:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4080, + "id": 4084, + "nodeType": "Return", + "src": "41509:23:1" + } + ] + }, + "documentation": { + "id": 4073, + "nodeType": "StructuredDocumentation", + "src": "41193:174:1", + "text": " @notice Get the amount in escrow of an address\n @param _account The address of an account to query\n @return The balance in escrow" + }, + "functionSelector": "d1358365", + "id": 4086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEscrowAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4077, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41457:8:1" + }, + "parameters": { + "id": 4076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4075, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "41398:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41398:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41397:18:1" + }, + "returnParameters": { + "id": 4080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "41484:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4078, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41484:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41483:9:1" + }, + "scope": 4105, + "src": "41373:167:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 8771 + ], + "body": { + "id": 4103, + "nodeType": "Block", + "src": "41930:56:1", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "id": 4097, + "name": "escrowTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1649, + "src": "41948:12:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 4099, + "indexExpression": { + "id": 4098, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4089, + "src": "41961:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41948:20:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4101, + "indexExpression": { + "id": 4100, + "name": "_account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4091, + "src": "41969:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41948:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4096, + "id": 4102, + "nodeType": "Return", + "src": "41941:37:1" + } + ] + }, + "documentation": { + "id": 4087, + "nodeType": "StructuredDocumentation", + "src": "41548:229:1", + "text": " @notice Get the amount in escrow of an address\n @param _token The address of a token to query\n @param _account The address of an account to query\n @return The balance in escrow" + }, + "functionSelector": "2a950716", + "id": 4104, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEscrowTokensAmount", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4093, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41889:8:1" + }, + "parameters": { + "id": 4092, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4089, + "mutability": "mutable", + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 4104, + "src": "41814:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4088, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41814:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4091, + "mutability": "mutable", + "name": "_account", + "nodeType": "VariableDeclaration", + "scope": 4104, + "src": "41830:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41830:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41813:34:1" + }, + "returnParameters": { + "id": 4096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4095, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 4104, + "src": "41916:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41916:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41915:9:1" + }, + "scope": 4105, + "src": "41783:203:1", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4106, + "src": "789:41200:1" + } + ], + "src": "47:41944:1" + }, + "compiler": { + "name": "solc", + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0xe6e743e535fe193128a1e1839b7c1f313bb203d9cbb58e4c955d5e9a8a8f0fc2": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_payment", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum Cashier.PaymentType", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogAmountDistribution", + "type": "event" + }, + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0xdf38caf468609827a33cd8703b08fca23e51107a2ad8d4f7587bc0be15a2ee9e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "_disasterState", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogDisasterStateSet", + "type": "event" + }, + "0xb04d37d3296a34ef094bb4da3e1025abae58c3f53fd6b638c1d0174b3a9d509b": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogWithdrawEthOnDisaster", + "type": "event" + }, + "0x7e5dd3919ea79fc8c93a49edf5656ab20f89df3e419fde48c90a90765f7605a6": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogWithdrawTokensOnDisaster", + "type": "event" + }, + "0x0ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_payment", + "type": "uint256" + } + ], + "name": "LogWithdrawal", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + } + }, + "links": {}, + "address": "0xd8D3446162Ba9e5acd84F54D67cb5219e37B6a02", + "transactionHash": "0x59edc9c4cd3bb934fed4e420e2df48b28b755421e590fd068d1b8edb230dc852" + }, + "5777": { + "events": { + "0xe6e743e535fe193128a1e1839b7c1f313bb203d9cbb58e4c955d5e9a8a8f0fc2": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_payment", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum Cashier.PaymentType", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogAmountDistribution", + "type": "event", + "signature": "0xe6e743e535fe193128a1e1839b7c1f313bb203d9cbb58e4c955d5e9a8a8f0fc2" + }, + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event", + "signature": "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0" + }, + "0xdf38caf468609827a33cd8703b08fca23e51107a2ad8d4f7587bc0be15a2ee9e": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "_disasterState", + "type": "bool" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogDisasterStateSet", + "type": "event", + "signature": "0xdf38caf468609827a33cd8703b08fca23e51107a2ad8d4f7587bc0be15a2ee9e" + }, + "0xb04d37d3296a34ef094bb4da3e1025abae58c3f53fd6b638c1d0174b3a9d509b": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogWithdrawEthOnDisaster", + "type": "event", + "signature": "0xb04d37d3296a34ef094bb4da3e1025abae58c3f53fd6b638c1d0174b3a9d509b" + }, + "0x7e5dd3919ea79fc8c93a49edf5656ab20f89df3e419fde48c90a90765f7605a6": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogWithdrawTokensOnDisaster", + "type": "event", + "signature": "0x7e5dd3919ea79fc8c93a49edf5656ab20f89df3e419fde48c90a90765f7605a6" + }, + "0x0ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_payment", + "type": "uint256" + } + ], + "name": "LogWithdrawal", + "type": "event", + "signature": "0x0ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event", + "signature": "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event", + "signature": "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa" + }, + "0x7b81c5e3a8e5647e11ccd172baaaf534f02cb16cd563be7c3c70c9354215bdb1": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newTokenContract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogTokenContractSet", + "type": "event", + "signature": "0x7b81c5e3a8e5647e11ccd172baaaf534f02cb16cd563be7c3c70c9354215bdb1" + } + }, + "links": {}, + "address": "0xfF96C1ccdD531171646261019bdD1f42b30aF32a", + "transactionHash": "0x8edbb4f96160d4b96d5450b4fc767b57580cd91aa0ea6ecb6f2a29f66aa4c3b0" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T10:31:40.108Z", + "networkType": "ethereum", + "devdoc": { + "kind": "dev", + "methods": { + "addEscrowAmount(address)": { + "params": { + "_account": "The address of an account to update" + } + }, + "addEscrowTokensAmount(address,address,uint256)": { + "params": { + "_account": "The address of an account to query", + "_newAmount": "New amount to be set", + "_token": "The address of a token to query" + } + }, + "getBosonRouterAddress()": { + "returns": { + "_0": "Address of Boson Router contract" + } + }, + "getEscrowAmount(address)": { + "params": { + "_account": "The address of an account to query" + }, + "returns": { + "_0": "The balance in escrow" + } + }, + "getEscrowTokensAmount(address,address)": { + "params": { + "_account": "The address of an account to query", + "_token": "The address of a token to query" + }, + "returns": { + "_0": "The balance in escrow" + } + }, + "getTokensContractAddress()": { + "returns": { + "_0": "Address of ERC1155ERC721 contract" + } + }, + "getVoucherKernelAddress()": { + "returns": { + "_0": "Address of Voucher Kernel contract" + } + }, + "isDisasterStateSet()": { + "returns": { + "_0": "disasterState" + } + }, + "onERC1155Transfer(address,address,uint256,uint256)": { + "params": { + "_from": "prev owner of the _tokenSupplyId", + "_to": "nex owner of the _tokenSupplyId", + "_tokenSupplyId": "_tokenSupplyId for transfer", + "_value": "qty which has been transferred" + } + }, + "onERC721Transfer(address,address,uint256)": { + "params": { + "_from": "prev owner of the _tokenIdVoucher", + "_to": "next owner of the _tokenIdVoucher", + "_tokenIdVoucher": "_tokenIdVoucher that has been transferred" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setBosonRouterAddress(address)": { + "params": { + "_bosonRouterAddress": "The address of the Boson Route contract" + } + }, + "setTokenContractAddress(address)": { + "params": { + "_tokensContractAddress": "The address of the ERC1155ERC721 contract" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "withdraw(uint256)": { + "details": "This function would be optimized a lot, here verbose for readability.", + "params": { + "_tokenIdVoucher": "ID of a voucher token (ERC-721) to try withdraw funds from" + } + }, + "withdrawDepositsSe(uint256,uint256,address)": { + "params": { + "_burnedQty": "burned quantity that the deposits should be withdrawn for", + "_msgSender": "owner of the voucher set", + "_tokenIdSupply": "an ID of a supply token (ERC-1155) which will be burned and deposits will be returned for" + } + }, + "withdrawTokensOnDisaster(address)": { + "params": { + "token": "address of a token, that the caller sent the funds, while interacting with voucher or voucher-set" + } + } + }, + "title": "Contract for managing funds Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addEscrowAmount(address)": { + "notice": "Update the amount in escrow of an address with the new value, based on VoucherSet/Voucher interaction" + }, + "addEscrowTokensAmount(address,address,uint256)": { + "notice": "Update the amount in escrowTokens of an address with the new value, based on VoucherSet/Voucher interaction" + }, + "canUnpause()": { + "notice": "If once disaster state has been set to true, the contract could never be unpaused." + }, + "getBosonRouterAddress()": { + "notice": "Get the address of Boson Router contract" + }, + "getEscrowAmount(address)": { + "notice": "Get the amount in escrow of an address" + }, + "getEscrowTokensAmount(address,address)": { + "notice": "Get the amount in escrow of an address" + }, + "getTokensContractAddress()": { + "notice": "Get the address of ERC1155ERC721 contract" + }, + "getVoucherKernelAddress()": { + "notice": "Get the address of Voucher Kernel contract" + }, + "isDisasterStateSet()": { + "notice": "Ensure whether or not contract has been set to disaster state " + }, + "onERC1155Transfer(address,address,uint256,uint256)": { + "notice": "After the transfer happens the _tokenSupplyId should be updated in the promise. Escrow funds for the seller's deposits (If in ETH) should be allocated to the new owner as well." + }, + "onERC721Transfer(address,address,uint256)": { + "notice": "Hook which will be triggered when a _tokenIdVoucher will be transferred. Escrow funds should be allocated to the new owner." + }, + "pause()": { + "notice": "Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function." + }, + "setBosonRouterAddress(address)": { + "notice": "Set the address of the BR contract" + }, + "setDisasterState()": { + "notice": "Once this functions is triggered, contracts cannot be unpaused anymore Only BR contract is in control of this function." + }, + "setTokenContractAddress(address)": { + "notice": "Set the address of the ERC1155ERC721 contract" + }, + "unpause()": { + "notice": "Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function." + }, + "withdraw(uint256)": { + "notice": "Trigger withdrawals of what funds are releasable The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas." + }, + "withdrawDepositsSe(uint256,uint256,address)": { + "notice": "External function for withdrawing deposits. Caller must be the seller of the goods, otherwise reverts.Seller triggers withdrawals of remaining deposits for a given supply, in case the voucher set is no longer in exchange." + }, + "withdrawEthOnDisaster()": { + "notice": "In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrow for the address provided. Funds are sent in ETH" + }, + "withdrawTokensOnDisaster(address)": { + "notice": "In case of a disaster this function allow the caller to withdraw all pooled funds kept in the escrowTokens for the address provided." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/external/lambdas/triggerWithdrawals/src/abis/VoucherKernel.json b/external/lambdas/triggerWithdrawals/src/abis/VoucherKernel.json new file mode 100644 index 00000000..ce42ce3c --- /dev/null +++ b/external/lambdas/triggerWithdrawals/src/abis/VoucherKernel.json @@ -0,0 +1,61300 @@ +{ + "contractName": "VoucherKernel", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_tokensContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositSe", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositBu", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + } + ], + "name": "createTokenSupplyID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, + { + "internalType": "address", + "name": "_tokenPrice", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenDeposits", + "type": "address" + } + ], + "name": "createPaymentMethod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_paymentMethod", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "fillOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_qty", + "type": "uint256" + } + ], + "name": "burnSupplyOnPause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "redeem", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "complain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_msgSender", + "type": "address" + } + ], + "name": "cancelOrFault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "cancelOrFaultVoucherSet", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "setPaymentReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "setDepositsReleased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "triggerExpiration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "triggerFinalizeVoucher", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_newSeller", + "type": "address" + } + ], + "name": "setSupplyHolderOnTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_bosonRouterAddress", + "type": "address" + } + ], + "name": "setBosonRouterAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_cashierAddress", + "type": "address" + } + ], + "name": "setCashierAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_complainPeriod", + "type": "uint256" + } + ], + "name": "setComplainPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cancelFaultPeriod", + "type": "uint256" + } + ], + "name": "setCancelFaultPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "getPromiseKey", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getIdSupplyFromVoucher", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getPromiseIdFromVoucherId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenSupplyId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "getRemQtyForSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getBuyerOrderCosts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSellerDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getSupplyHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_promiseKey", + "type": "bytes32" + } + ], + "name": "getPromiseData", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getVoucherStatus", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "getVoucherHolder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPriceToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherDepositToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getVoucherPaymentMethod", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isInValidityPeriod", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "isVoucherTransferable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getBosonRouterAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCashierAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + } + ], + "name": "getTokenNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTypeId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getComplainPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getCancelFaultPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + } + ], + "name": "getPromiseIdFromSupplyId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, + { + "inputs": [], + "name": "getTokensContractAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.1+commit.f4a555be\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokensContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newBosonRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogBosonRouterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newCancelFaultPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCancelFaultPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newCashier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogCashierSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newComplainPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogComplainPeriodChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogExpirationTriggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_triggeredBy\",\"type\":\"address\"}],\"name\":\"LogFinalizeVoucher\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_type\",\"type\":\"uint8\"}],\"name\":\"LogFundsReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"LogPromiseCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherComplain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"LogVoucherDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_promiseId\",\"type\":\"bytes32\"}],\"name\":\"LogVoucherRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"LogVoucherRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"LogVoucherSetFaultCancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_qty\",\"type\":\"uint256\"}],\"name\":\"burnSupplyOnPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"cancelOrFault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"}],\"name\":\"cancelOrFaultVoucherSet\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"complain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_tokenPrice\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenDeposits\",\"type\":\"address\"}],\"name\":\"createPaymentMethod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_validFrom\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_validTo\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositSe\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_depositBu\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_quantity\",\"type\":\"uint256\"}],\"name\":\"createTokenSupplyID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_issuer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_holder\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_paymentMethod\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_correlationId\",\"type\":\"uint256\"}],\"name\":\"fillOrder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBosonRouterAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getBuyerOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCancelFaultPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCashierAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getComplainPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getIdSupplyFromVoucher\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getOrderCosts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_promiseKey\",\"type\":\"bytes32\"}],\"name\":\"getPromiseData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromSupplyId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getPromiseIdFromVoucherId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"getPromiseKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenSupplyId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getRemQtyForSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSellerDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getSupplyHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"getTokenNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokensContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTypeId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherDepositToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPaymentMethod\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"}],\"name\":\"getVoucherPriceToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"getVoucherStatus\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isInValidityPeriod\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"isVoucherTransferable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_msgSender\",\"type\":\"address\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bosonRouterAddress\",\"type\":\"address\"}],\"name\":\"setBosonRouterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_cancelFaultPeriod\",\"type\":\"uint256\"}],\"name\":\"setCancelFaultPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_cashierAddress\",\"type\":\"address\"}],\"name\":\"setCashierAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_complainPeriod\",\"type\":\"uint256\"}],\"name\":\"setComplainPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setDepositsReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"setPaymentReleased\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdSupply\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_newSeller\",\"type\":\"address\"}],\"name\":\"setSupplyHolderOnTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerExpiration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenIdVoucher\",\"type\":\"uint256\"}],\"name\":\"triggerFinalizeVoucher\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\",\"kind\":\"dev\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"details\":\"Token ID is derived following the same principles for both ERC-1155 and ERC-721\",\"params\":{\"_issuer\":\"The address of the token issuer\",\"_qty\":\"qty that should be burned\",\"_tokenIdSupply\":\"ID of the token type\"}},\"cancelOrFault(uint256,address)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher\"}},\"cancelOrFaultVoucherSet(uint256,address)\":{\"params\":{\"_issuer\":\"owner of the voucher\",\"_tokenIdSupply\":\"ID of the voucher set\"}},\"complain(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"createPaymentMethod(uint256,uint8,address,address)\":{\"params\":{\"_paymentMethod\":\"might be ETHETH, ETHTKN, TKNETH or TKNTKN\",\"_tokenDeposits\":\"token address which will hold the funds for the deposits of the voucher\",\"_tokenIdSupply\":\"_tokenIdSupply of the voucher set this is related to\",\"_tokenPrice\":\"token address which will hold the funds for the price of the voucher\"}},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"_depositBu\":\"Buyer's deposit\",\"_depositSe\":\"Seller's deposit\",\"_price\":\"Price (payment amount)\",\"_seller\":\"seller of the promise\",\"_validFrom\":\"Start of valid period\",\"_validTo\":\"End of valid period\"}},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"params\":{\"_correlationId\":\"ID of the current interaction with the smart contract for a specific user\",\"_holder\":\"Address of the recipient of the voucher (ERC-721)\",\"_issuer\":\"Address of the token's issuer\",\"_paymentMethod\":\"method being used for that particular order that needs to be fulfilled\",\"_tokenIdSupply\":\"ID of the supply token (ERC-1155)\"}},\"getBosonRouterAddress()\":{\"returns\":{\"_0\":\"Address of the Boson Router contract\"}},\"getBuyerOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Buyer's deposit)\"}},\"getCancelFaultPeriod()\":{\"returns\":{\"_0\":\"cancel or fault period\"}},\"getCashierAddress()\":{\"returns\":{\"_0\":\"Address of the Cashier contract\"}},\"getComplainPeriod()\":{\"returns\":{\"_0\":\"complain period\"}},\"getIdSupplyFromVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the supply token\"}},\"getOrderCosts(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\"}},\"getPromiseData(bytes32)\":{\"params\":{\"_promiseKey\":\"ID of the promise\"},\"returns\":{\"_0\":\"promise data not returned by other accessor methods\"}},\"getPromiseIdFromSupplyId(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseIdFromVoucherId(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"ID of the promise\"}},\"getPromiseKey(uint256)\":{\"params\":{\"_idx\":\"Index in the array of promise keys\"},\"returns\":{\"_0\":\"Promise ID\"}},\"getRemQtyForSupply(uint256,address)\":{\"params\":{\"_owner\":\"holder of the Token Supply\",\"_tokenSupplyId\":\"Token supply ID\"},\"returns\":{\"_0\":\"remaining quantity\"}},\"getSellerDeposit(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the supply token\"},\"returns\":{\"_0\":\"returns sellers deposit\"}},\"getSupplyHolder(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getTokenNonce(address)\":{\"params\":{\"_seller\":\"Address of the seller\"},\"returns\":{\"_0\":\"The seller's nonce\"}},\"getTokensContractAddress()\":{\"returns\":{\"_0\":\"Address of ERC1155ERC721 contract\"}},\"getTypeId()\":{\"returns\":{\"_0\":\"type Id\"}},\"getVoucherDepositToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherHolder(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Address of the holder\"}},\"getVoucherPaymentMethod(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"payment method\"}},\"getVoucherPriceToken(uint256)\":{\"params\":{\"_tokenIdSupply\":\"ID of the voucher supply token\"},\"returns\":{\"_0\":\"Address of the token\"}},\"getVoucherStatus(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"},\"returns\":{\"_0\":\"Status of the voucher (via enum)\"}},\"isInValidityPeriod(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"isVoucherTransferable(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"redeem(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"refund(uint256,address)\":{\"params\":{\"_msgSender\":\"account called the fn from the BR contract\",\"_tokenIdVoucher\":\"ID of the voucher\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setBosonRouterAddress(address)\":{\"params\":{\"_bosonRouterAddress\":\"The address of the BR contract\"}},\"setCancelFaultPeriod(uint256)\":{\"params\":{\"_cancelFaultPeriod\":\"the new value for cancelOrFault period (in number of seconds)\"}},\"setCashierAddress(address)\":{\"params\":{\"_cashierAddress\":\"The address of the BR contract\"}},\"setComplainPeriod(uint256)\":{\"params\":{\"_complainPeriod\":\"the new value for complain period (in number of seconds)\"}},\"setDepositsReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setPaymentReleased(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"setSupplyHolderOnTransfer(uint256,address)\":{\"params\":{\"_newSeller\":\"new holder of the supply\",\"_tokenIdSupply\":\"_tokenIdSupply which will be transferred\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"triggerExpiration(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}},\"triggerFinalizeVoucher(uint256)\":{\"params\":{\"_tokenIdVoucher\":\"ID of the voucher token\"}}},\"title\":\"VoucherKernel contract is controlling the core business logic\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burnSupplyOnPause(address,uint256,uint256)\":{\"notice\":\"Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\"},\"cancelOrFault(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\"},\"cancelOrFaultVoucherSet(uint256,address)\":{\"notice\":\"Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\"},\"complain(uint256,address)\":{\"notice\":\"Issue a complain for a voucher\"},\"createPaymentMethod(uint256,uint8,address,address)\":{\"notice\":\"Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\"},\"createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future).\"},\"fillOrder(uint256,address,address,uint8,uint256)\":{\"notice\":\"Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\"},\"getBosonRouterAddress()\":{\"notice\":\"Get address of the Boson Router to which this contract points\"},\"getBuyerOrderCosts(uint256)\":{\"notice\":\"Get Buyer costs required to make an order for a supply token\"},\"getCancelFaultPeriod()\":{\"notice\":\"Get the cancel or fault period\"},\"getCashierAddress()\":{\"notice\":\"Get address of the Cashier contract to which this contract points\"},\"getComplainPeriod()\":{\"notice\":\"Get the complain period\"},\"getIdSupplyFromVoucher(uint256)\":{\"notice\":\"Get the supply token ID from a voucher token\"},\"getOrderCosts(uint256)\":{\"notice\":\"Get all necessary funds for a supply token\"},\"getPromiseData(bytes32)\":{\"notice\":\"Get promise data not retrieved by other accessor functions\"},\"getPromiseIdFromSupplyId(uint256)\":{\"notice\":\"Get the promise ID from a voucher set\"},\"getPromiseIdFromVoucherId(uint256)\":{\"notice\":\"Get the promise ID from a voucher token\"},\"getPromiseKey(uint256)\":{\"notice\":\"Get the promise ID at specific index\"},\"getRemQtyForSupply(uint256,address)\":{\"notice\":\"Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\"},\"getSellerDeposit(uint256)\":{\"notice\":\"Get Seller deposit\"},\"getSupplyHolder(uint256)\":{\"notice\":\"Get the holder of a supply\"},\"getTokenNonce(address)\":{\"notice\":\"Get the token nonce for a seller\"},\"getTokensContractAddress()\":{\"notice\":\"Get the address of ERC1155ERC721 contract\"},\"getTypeId()\":{\"notice\":\"Get the current type Id\"},\"getVoucherDepositToken(uint256)\":{\"notice\":\"Get the address of the token where the deposits for the supply are held\"},\"getVoucherHolder(uint256)\":{\"notice\":\"Get the holder of a voucher\"},\"getVoucherPaymentMethod(uint256)\":{\"notice\":\"Get the payment method for a particular _tokenIdSupply\"},\"getVoucherPriceToken(uint256)\":{\"notice\":\"Get the address of the token where the price for the supply is held\"},\"getVoucherStatus(uint256)\":{\"notice\":\"Get the current status of a voucher\"},\"isInValidityPeriod(uint256)\":{\"notice\":\"Checks whether a voucher is in valid period for redemption (between start date and end date)\"},\"isVoucherTransferable(uint256)\":{\"notice\":\"Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\"},\"pause()\":{\"notice\":\"Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function.\"},\"redeem(uint256,address)\":{\"notice\":\"Redemption of the vouchers promise\"},\"refund(uint256,address)\":{\"notice\":\"Refunding a voucher\"},\"setBosonRouterAddress(address)\":{\"notice\":\"Set the address of the Boson Router contract\"},\"setCancelFaultPeriod(uint256)\":{\"notice\":\"Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setCashierAddress(address)\":{\"notice\":\"Set the address of the Cashier contract\"},\"setComplainPeriod(uint256)\":{\"notice\":\"Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\"},\"setDepositsReleased(uint256)\":{\"notice\":\"Mark voucher token that the deposits were released\"},\"setPaymentReleased(uint256)\":{\"notice\":\"Mark voucher token that the payment was released\"},\"setSupplyHolderOnTransfer(uint256,address)\":{\"notice\":\"Set the address of the new holder of a _tokenIdSupply on transfer\"},\"triggerExpiration(uint256)\":{\"notice\":\"Mark voucher token as expired\"},\"triggerFinalizeVoucher(uint256)\":{\"notice\":\"Mark voucher token to the final status\"},\"unpause()\":{\"notice\":\"Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":\"VoucherKernel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol\":{\"keccak256\":\"0x867daada4cae6f8f547fc7eba2db9f8aa282228901c125e773dfd808943a235a\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://e50dc3939a48de65fd3ba74d54c20d2370adad18ddc97c8dca721839d20e0224\",\"dweb:/ipfs/QmcL6Z8wCcQfgcTQ2UH4vyJ84hYckJW7LGpN6oKg2kQKBm\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol\":{\"keccak256\":\"0x3d7decc1350a42e2a425ef915c8d0ddf5143289ee9e578c64727cf1393969836\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://fb17e7fca89026ae4fdfed6887bf9027341161038f1a4f5693257874b42102f3\",\"dweb:/ipfs/QmckQ5mpGzPjVSv8u2ZD6zkv5JDf1THuQMSodaW75HwFQJ\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol\":{\"keccak256\":\"0x34796b446a93c5ac705507913582dcab993b7cc86429c5e272b99597b64e51d9\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://51ba6851cc9c12c62f8ba7f20780880d590f1030c265edee05158064b9f67a36\",\"dweb:/ipfs/QmNidTbLJeMMFFk3iftCeWP9pLsFxdSHsckvakXgKnxoKC\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol\":{\"keccak256\":\"0xb4b2da06924caa82a63fa15eebec3357f13bd6693a9601fc3e37689e8aca80fc\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://ee602fbf4081c7db5fab98da408eb74c5c3e49a843acf142f259ebf788012bc8\",\"dweb:/ipfs/QmQ6ASnm4weSxGmcy9PU4oGZAmnDKdrW4AQN4dDmuZJUii\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x39c55885f7e34a407316f0f15d337baaf69723252f154d7c727c97f818b23e5e\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://3c297eddef2d21c163eecc6758ae3fe9872594025eff98f22d3cb84d4771df9f\",\"dweb:/ipfs/QmTvQ8URMHEHy1GTBfYqkQZXcu1jb9DpxTWUbNFX7BrEX8\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol\":{\"keccak256\":\"0xff346a09a5d08dfe7196c4516d78522da0dec1bde99e04e0f3b269f96796d29f\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://197cdfdd6994addd3ef4702e3b367d4563f907106c6be50b2932cb7d336daf0c\",\"dweb:/ipfs/QmSKe383xVyeY8ecpEPHdvEevMVDR121Qqq4udmeaipXQe\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol\":{\"keccak256\":\"0x7b8243200a7630a258025cc2a9fa2fec0ec9f009b0f6e4b7dc0b0bdcb64b2761\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7a1037cfbea713ba1649ec7c9c44570e012cf3f2eafcec3fd7e8da323e81248b\",\"dweb:/ipfs/QmaZzB7rN4RyPhGgfn9Fkvf5K6ynd4owHj6vA8iMH2k3N9\"]},\"/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol\":{\"keccak256\":\"0xf5ac0b5b4450035d326b6858dece8a25edba7547ebf5ce9d68ee996d129b3eb5\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://7332c21a7cc7788731570c68654eebf19e3251d611056c9a4bf3d42e69209254\",\"dweb:/ipfs/QmccRFFb7uBibhMSxFUkDU3uLgRUKvqWewjuKspPe9Qgym\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x549c5343ad9f7e3f38aa4c4761854403502574bbc15b822db2ce892ff9b79da7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://19c0dfbf7bb7744af0c03156e372d0096e0d07de8805ead7722243b8b42276a3\",\"dweb:/ipfs/QmPEFDvi6mJZ3sVii3uBs3CQzAARXPFwCKiHG5zkiCmC4V\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xe22a1fc7400ae196eba2ad1562d0386462b00a6363b742d55a2fd2021a58586f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4a635cec58fb4141a16cfd408f1a21ac944c335a3beaba541c35d2e95c04536f\",\"dweb:/ipfs/QmXWcz73UenN1ji8jiWMbzxHjjfLbNQwLVKTEB5zNFE34K\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf89f005a3d98f7768cdee2583707db0ac725cf567d455751af32ee68132f3db3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f963d438177764b5f43f637c02311c951c0f0025d12fe1ac7e62e295bf416c41\",\"dweb:/ipfs/QmcfVb9JsWrYeTwFUJsKVHpKB7EaWBKydAH9S4sKg2pzcK\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x4c5617b558186dc4b2b994b18ab9236410cd2dd1d9ad1213bbcca2e1d5321ce8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://27b103fe3d550cf3717751a2c67e14008806af25baa3916b5717eeb68a2767ad\",\"dweb:/ipfs/QmS6gG9XVCx3qco7ewaSgJdcQRfZuurqxqPnKmRJ3Dj7Fg\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620041fc380380620041fc833981810160405260208110156200003757600080fd5b5051600062000045620000ce565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b039290921691909117905562093a80600c819055600d55620000d2565b3390565b61411a80620000e26000396000f3fe608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102305760003560e01c8063065ef53e146102355780631af2a6a81461024f5780631cf7955d1461026c5780631f38585f1461029f578063325a7a84146102d85780633f4ba83a14610324578063455e42f21461032e57806346aee52e1461035a5780635b479d1a146103775780635c975abb146103a857806365c303bc146103b057806366db9a09146103cd578063715018a6146103f957806374898e82146104015780637554951614610433578063797f2a26146104505780637ad226dc1461049a5780637bde82f2146104c657806381dc8119146104f25780638456cb591461050f578063881063231461051757806388c25607146105345780638990834b146105605780638da5cb5b1461057d578063911e3f461461058557806392924d851461058d57806397f9e52a146105955780639a0271e11461059d5780639a751bbd146105ba578063a1e5e3f9146105d7578063b0df130d1461061f578063bc0d753d14610664578063bd17de4014610681578063c099a7c4146106a7578063c98d9b83146106cd578063cf5c9008146106d5578063d40ffcf814610712578063d887b4e71461072f578063e31a00791461076a578063e875a61314610796578063ea5416a5146107b3578063ebba1b29146107d9578063ede80897146107f6578063f2fde38b14610813578063f5d7aa1814610839578063f75951ce14610865578063f9d9309914610882578063fad4ee941461088a575b600080fd5b61023d6108c0565b60408051918252519081900360200190f35b61023d6004803603602081101561026557600080fd5b50356108c6565b6102896004803603602081101561028257600080fd5b50356108d7565b6040805160ff9092168252519081900360200190f35b6102bc600480360360208110156102b557600080fd5b50356108ec565b604080516001600160a01b039092168252519081900360200190f35b6102f5600480360360208110156102ee57600080fd5b5035610917565b6040805160ff909616865293151560208601529115158484015260608401526080830152519081900360a00190f35b61032c61094f565b005b61023d6004803603604081101561034457600080fd5b50803590602001356001600160a01b03166109f8565b61023d6004803603602081101561037057600080fd5b5035610c57565b6103946004803603602081101561038d57600080fd5b5035610c69565b604080519115158252519081900360200190f35b610394610ca6565b61032c600480360360208110156103c657600080fd5b5035610cb6565b61032c600480360360408110156103e357600080fd5b50803590602001356001600160a01b0316610f59565b61032c6115bb565b61032c6004803603606081101561041757600080fd5b506001600160a01b038135169060208101359060400135611655565b61032c6004803603602081101561044957600080fd5b50356117bc565b61023d600480360360e081101561046657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a08101359060c001356118e5565b61032c600480360360408110156104b057600080fd5b50803590602001356001600160a01b0316611cd3565b61032c600480360360408110156104dc57600080fd5b50803590602001356001600160a01b0316611f76565b61023d6004803603602081101561050857600080fd5b50356122c5565b61032c6122e6565b61023d6004803603602081101561052d57600080fd5b503561238d565b61032c6004803603604081101561054a57600080fd5b50803590602001356001600160a01b03166123af565b61032c6004803603602081101561057657600080fd5b503561248b565b6102bc61252f565b61023d61253e565b61023d612544565b6102bc61254a565b610394600480360360208110156105b357600080fd5b5035612559565b6102bc600480360360208110156105d057600080fd5b5035612698565b6105f4600480360360208110156105ed57600080fd5b50356126b6565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61032c600480360360a081101561063557600080fd5b508035906001600160a01b03602082013581169160408101359091169060ff606082013516906080013561275a565b61023d6004803603602081101561067a57600080fd5b50356128e4565b61032c6004803603602081101561069757600080fd5b50356001600160a01b0316612957565b61032c600480360360208110156106bd57600080fd5b50356001600160a01b0316612a64565b6102bc612b71565b61032c600480360360808110156106eb57600080fd5b5080359060ff602082013516906001600160a01b0360408201358116916060013516612b80565b61032c6004803603602081101561072857600080fd5b5035612d07565b61074c6004803603602081101561074557600080fd5b5035612e8c565b60408051938452602084019290925282820152519081900360600190f35b61023d6004803603604081101561078057600080fd5b50803590602001356001600160a01b0316612ebb565b6102bc600480360360208110156107ac57600080fd5b5035612f44565b61023d600480360360208110156107c957600080fd5b50356001600160a01b0316612f64565b61032c600480360360208110156107ef57600080fd5b5035612f7f565b61032c6004803603602081101561080c57600080fd5b50356130ad565b61032c6004803603602081101561082957600080fd5b50356001600160a01b0316613151565b61032c6004803603604081101561084f57600080fd5b50803590602001356001600160a01b0316613241565b6102bc6004803603602081101561087b57600080fd5b50356136af565b6102bc61372d565b6108a7600480360360208110156108a057600080fd5b503561373c565b6040805192835260208301919091528051918290030190f35b600c5490565b6001600160801b031981165b919050565b60009081526006602052604090205460ff1690565b600090815260086020908152604080832054835260049091529020600201546001600160a01b031690565b60009081526009602052604090208054600182015460029092015460ff80831694610100840482169462010000909404909116929190565b6002546001600160a01b031661099d576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146109ee576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613766565b565b6002546000906001600160a01b0316610a49576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314610a9a576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b610aa2610ca6565b15610ae7576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b816001600160a01b0316610afa846108ec565b6001600160a01b031614610b48576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b6000610b548484612ebb565b905060008111610b99576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201889052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b158015610bf557600080fd5b505af1158015610c09573d6000803e3d6000fd5b5050604080518781526001600160a01b038716602082015281517fd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f9450908190039091019150a19392505050565b60009081526008602052604090205490565b600081815260096020526040812054610100900460ff1680610c9f575060008281526009602052604090205462010000900460ff165b1592915050565b600054600160a01b900460ff1690565b80610cf9576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b60008181526009602052604090205460ff16610d16816001613809565b15610d5c576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6000610d66613fe6565b60046000610d73866128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b031691830191909152600380820154606084015260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150610e01908490613809565b15610e4557610e11836002613809565b15610e1f5760019150610e40565b600d54600085815260096020526040902060020154014210610e4057600191505b610ee3565b610e50836002613809565b8015610e715750600c54600085815260096020526040902060010154014210155b15610e7f5760019150610ee3565b610e888361381a565b80610e975750610e9783613841565b15610ec157600c54600085815260096020526040902060010154014210610e405760019150610ee3565b610eca83613859565b15610ee357600c548160800151014210610ee357600191505b8115610f5357610ef483600161386d565b600085815260096020908152604091829020805460ff191660ff94909416939093179092558051868152339281019290925280517f28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa9281900390910190a15b50505050565b610f61610ca6565b15610fa6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316610ff4576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611045576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b15801561109857600080fd5b505afa1580156110ac573d6000803e3d6000fd5b505050506040513d60208110156110c257600080fd5b50516001600160a01b031614611110576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b60008481526009602052604090205461112d9060ff166003613809565b15611174576040805162461bcd60e51b81526020600482015260126024820152711053149150511657d0d3d35413105253915160721b604482015290519081900360640190fd5b6000848152600960205260409020546111919060ff166001613809565b156111d7576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6111df613fe6565b600460006111ec876128e4565b8152602080820192909252604090810160009081208251610120810184528154815260018201548186015260028201546001600160a01b0316818501526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600890910154610100820152888252600990935220549091506112809060ff1661381a565b806112a157506000858152600960205260409020546112a19060ff16613841565b156113ff576000858152600960205260409020546112c39060ff166002613809565b61132857600d54600c546000878152600960205260409020600101540101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b611380565b600c5460008681526009602052604090206001015401421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020426002820155546113a39060ff16600361386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455929181900390910190a16115b4565b60008581526009602052604090205461141a9060ff16613859565b156114da5760008581526009602052604090205461143c9060ff166002613809565b61148f57600d54600c5482608001510101421115611323576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b600c54816080015101421115611380576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546114f79060ff166002613809565b1561157157600c5460008681526009602052604090206001015401421115611554576040805162461bcd60e51b81526020600482015260166024820152600080516020614065833981519152604482015290519081900360640190fd5b6000858152600960205260409020546113a39060ff16600361386d565b6040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b5050505050565b6115c361387a565b6001600160a01b03166115d461252f565b6001600160a01b03161461161d576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116906000805160206140a5833981519152908390a3600080546001600160a01b0319169055565b61165d610ca6565b6116a5576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6003546001600160a01b03166116f3576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b03163314611743576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b60015460408051637a94c56560e11b81526001600160a01b03868116600483015260248201869052604482018590529151919092169163f5298aca91606480830192600092919082900301818387803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b50505050505050565b6003546001600160a01b031661180a576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461185a576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b8061189d576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000818152600960209081526040808320805461ff00191661010017905580518481529182019290925281516000805160206140c5833981519152929181900390910190a150565b6002546000906001600160a01b0316611936576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611987576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b858711156119d4576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b4261012c01861015611a23576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b6001600160a01b03881660009081526005602090815260409182902080546001810190915582516001600160601b031960608d901b16818401526034810191909152605481018a905260748082018a9052835180830390910181526094909101909252815191012060075415611b0b57600081815260046020526040902060080154600780548392908110611ab457fe5b90600052602060002001541415611b0b576040805162461bcd60e51b815260206004820152601660248201527550524f4d4953455f414c52454144595f45584953545360501b604482015290519081900360640190fd5b604051806101200160405280828152602001600560008c6001600160a01b03166001600160a01b031681526020019081526020016000205481526020018a6001600160a01b0316815260200189815260200188815260200187815260200186815260200185815260200160078054905081525060046000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e0820151816007015561010082015181600801559050506007819080600181540180825580915050600190039060005260206000200160009091909190915055886001600160a01b0316600560008b6001600160a01b03166001600160a01b0316815260200190815260200160002054827fc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e08b8b60016007805490500360405180848152602001838152602001828152602001935050505060405180910390a4611cc689828561387e565b9998505050505050505050565b611cdb610ca6565b15611d20576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316611d6e576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314611dbf576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b158015611e1257600080fd5b505afa158015611e26573d6000803e3d6000fd5b505050506040513d6020811015611e3c57600080fd5b50516001600160a01b031614611e8a576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b600084815260096020526040902054611ea59060ff16613a19565b611eec576040805162461bcd60e51b8152602060048201526013602482015272494e4150504c494341424c455f53544154555360681b604482015290519081900360640190fd5b611ef584612559565b50600084815260096020526040902042600182015554611f199060ff16600561386d565b600085815260096020908152604091829020805460ff191660ff9490941693909317909255805186815290517f66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff929181900390910190a150505050565b611f7e610ca6565b15611fc3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6002546001600160a01b0316612011576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612062576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b600154604080516331a9108f60e11b8152600481018590529051849284926001600160a01b0380851693921691636352211e91602480820192602092909190829003018186803b1580156120b557600080fd5b505afa1580156120c9573d6000803e3d6000fd5b505050506040513d60208110156120df57600080fd5b50516001600160a01b03161461212d576040805162461bcd60e51b815260206004820152600e60248201526d2aa720aaaa2427a924ad22a22fab60911b604482015290519081900360640190fd5b6000848152600960205260409020546121489060ff16613a19565b61218d576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d41493d0d154d4d151607a1b604482015290519081900360640190fd5b61219684612559565b5061219f613fe6565b600460006121ac876128e4565b815260208082019290925260409081016000908120825161012081018452815481526001808301548287015260028301546001600160a01b0316828601526003830154606083015260048301546080830152600583015460a083015260068084015460c0840152600784015460e08401526008909301546101008301528a8452600990955292909120429381019390935591549092506122519160ff9091169061386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255825181518881526001600160a01b0388169381019390935282820152517f43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c916060908290030190a15050505050565b6000600782815481106122d457fe5b90600052602060002001549050919050565b6002546001600160a01b0316612334576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612385576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6109f6613a27565b6000908152600860209081526040808320548352600490915290206006015490565b6003546001600160a01b03166123fd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461244d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b6000918252600860209081526040808420548452600490915290912060020180546001600160a01b0319166001600160a01b03909216919091179055565b61249361387a565b6001600160a01b03166124a461252f565b6001600160a01b0316146124ed576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600c8190556040805182815233602082015281517f08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca929181900390910190a150565b6000546001600160a01b031690565b600b5490565b600d5490565b6002546001600160a01b031690565b6000612563613fe6565b60046000612570856128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830181905260048201546080840152600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152909150421015612640576040805162461bcd60e51b8152602060048201526015602482015274494e56414c49445f56414c49444954595f46524f4d60581b604482015290519081900360640190fd5b428160800151101561268f576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f56414c49444954595f544f60681b604482015290519081900360640190fd5b50600192915050565b6000908152600660205260409020600101546001600160a01b031690565b60008060008060006126c6613fe6565b50505060009384525050600460208181526040938490208451610120810186528154808252600183015493820184905260028301546001600160a01b0316968201969096526003820154606082018190529382015460808201819052600583015460a0830152600683015460c0830152600783015460e0830152600890920154610100909101819052949591949293509190565b6002546001600160a01b03166127a8576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b031633146127f9576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b6000612804866108d7565b90508260ff168160ff161461285b576040805162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd0814185e5b595b9d0813595d1a1bd960421b604482015290519081900360640190fd5b612866868686613ab0565b6000612873868689613d48565b9050867fce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a68288886128a3866128e4565b604080519485526001600160a01b0393841660208601529190921683820152606083019190915260808201879052519081900360a00190a250505050505050565b600081612929576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b6000612934836108c6565b600090815260086020908152604080832054835260049091529020549392505050565b61295f61387a565b6001600160a01b031661297061252f565b6001600160a01b0316146129b9576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612a0a576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af09281900390910190a150565b612a6c61387a565b6001600160a01b0316612a7d61252f565b6001600160a01b031614612ac6576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b038116612b17576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040805191825233602083015280517fcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b889281900390910190a150565b6001546001600160a01b031690565b6002546001600160a01b0316612bce576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6002546001600160a01b03163314612c1f576040805162461bcd60e51b815260206004820152600f60248201526e2aa720aaaa2427a924ad22a22fa12960891b604482015290519081900360640190fd5b60008360ff16118015612c36575060048360ff1611155b612c80576040805162461bcd60e51b8152602060048201526016602482015275125395905312510814105653515395081351551213d160521b604482015290519081900360640190fd5b6040805160608101825260ff94851681526001600160a01b0393841660208083019182529385168284019081526000978852600690945291909520945185549151841661010002610100600160a81b03199190951660ff199092169190911716929092178355905160019092018054929091166001600160a01b0319909216919091179055565b80612d4a576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b612d52613fe6565b60046000612d5f846128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b03169183019190915260038101546060830152600481015460808301819052600582015460a0840152600682015460c0840152600782015460e084015260089091015461010083015290915042118015612e075750600082815260096020526040902054612e079060ff16613a19565b15612e8857600082815260096020526040902054612e299060ff16600461386d565b600083815260096020908152604091829020805460ff191660ff94909416939093179092558051848152339281019290925280517f0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f67409281900390910190a15b5050565b600090815260086020908152604080832054835260049091529020600581015460068201546007909201549092565b60015460408051627eeac760e11b81526001600160a01b038481166004830152602482018690529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015612f1157600080fd5b505afa158015612f25573d6000803e3d6000fd5b505050506040513d6020811015612f3b57600080fd5b50519392505050565b60009081526006602052604090205461010090046001600160a01b031690565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b0316612fcd576040805162461bcd60e51b815260206004820152600e60248201526d2aa729a822a1a4a324a2a22fa12960911b604482015290519081900360640190fd5b6003546001600160a01b0316331461301d576040805162461bcd60e51b815260206004820152600e60248201526d554e415554484f52495a45445f4360901b604482015290519081900360640190fd5b80613060576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b600081815260096020908152604091829020805462ff0000191662010000179055815183815260019181019190915281516000805160206140c5833981519152929181900390910190a150565b6130b561387a565b6001600160a01b03166130c661252f565b6001600160a01b03161461310f576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b600d8190556040805182815233602082015281517fff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12929181900390910190a150565b61315961387a565b6001600160a01b031661316a61252f565b6001600160a01b0316146131b3576040805162461bcd60e51b81526020600482018190526024820152600080516020614085833981519152604482015290519081900360640190fd5b6001600160a01b0381166131f85760405162461bcd60e51b815260040180806020018281038252602681526020018061403f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206140a583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b613249610ca6565b1561328e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000613299836108c6565b9050816001600160a01b03166132ae826108ec565b6001600160a01b0316146132fc576040805162461bcd60e51b815260206004820152601060248201526f2aa720aaaa2427a924ad22a22fa1a7a360811b604482015290519081900360640190fd5b60008381526009602052604090205460ff16613319816002613809565b15613361576040805162461bcd60e51b81526020600482015260136024820152721053149150511657d0d05390d1531190555315606a1b604482015290519081900360640190fd5b61336c816001613809565b156133b2576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d19253905312569151607a1b604482015290519081900360640190fd5b6133ba613fe6565b600460006133c7876128e4565b815260208082019290925260409081016000208151610120810183528154815260018201549381019390935260028101546001600160a01b0316918301919091526003810154606083015260048101546080830152600581015460a083015260068082015460c0840152600782015460e0840152600890910154610100830152909150613455908390613809565b806134665750613466826005613809565b1561355957613476826003613809565b6134f657600d54600c5460008781526009602052604090206001015401014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b600085815260096020526040902042600190910155613554565b600d5460008681526009602052604090206002015401421115613554576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b613646565b613564826004613809565b156135cd57613574826003613809565b6134f657600d54600c54826080015101014211156134dc576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6135d682613a19565b1561157157600d54600c5482608001510101421115613630576040805162461bcd60e51b815260206004820152601160248201527010d3d19411549253d117d1561412549151607a1b604482015290519081900360640190fd5b6000858152600960205260409020426001909101555b61365182600261386d565b600086815260096020908152604091829020805460ff191660ff9490941693909317909255805187815290517f125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709929181900390910190a15050505050565b600154604080516331a9108f60e11b81526004810184905290516000926001600160a01b031691636352211e916024808301926020929190829003018186803b1580156136fb57600080fd5b505afa15801561370f573d6000803e3d6000fd5b505050506040513d602081101561372557600080fd5b505192915050565b6003546001600160a01b031690565b60009081526008602090815260408083205483526004909152902060058101546007909101549091565b61376e610ca6565b6137b6576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6137ec61387a565b604080516001600160a01b039092168252519081900360200190a1565b60ff91821691161c60019081161490565b600061383261382b6000600761386d565b600661386d565b60ff168260ff16149050919050565b60006138326138526000600761386d565b600561386d565b600061383261386a6000600761386d565b60045b600160ff919091161b1790565b3390565b6000826138c8576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f50524f4d49534560681b604482015290519081900360640190fd5b6000838152600460205260409020600201546001600160a01b0385811691161461392b576040805162461bcd60e51b815260206004820152600f60248201526e554e415554484f52495a45445f434f60881b604482015290519081900360640190fd5b60008211613973576040805162461bcd60e51b815260206004820152601060248201526f494e56414c49445f5155414e5449545960801b604482015290519081900360640190fd5b600061397f6001613fb0565b600081815260086020526040808220879055600154815163731133e960e01b81526001600160a01b038a8116600483015260248201869052604482018990526080606483015260848201859052925194955091169263731133e99260c48084019391929182900301818387803b1580156139f857600080fd5b505af1158015613a0c573d6000803e3d6000fd5b5092979650505050505050565b60006138326000600761386d565b613a2f610ca6565b15613a74576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137ec61387a565b82613af3576040805162461bcd60e51b815260206004820152600e60248201526d155394d41150d25192515117d25160921b604482015290519081900360640190fd5b613b05816001600160a01b0316613fe0565b15613bd257604080516301ffc9a760e01b8152630a85bd0160e11b600482015290516001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b158015613b5757600080fd5b505afa158015613b6b573d6000803e3d6000fd5b505050506040513d6020811015613b8157600080fd5b5051613bd2576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001600160a01b038116613c23576040805162461bcd60e51b8152602060048201526013602482015272554e5350454349464945445f4144445245535360681b604482015290519081900360640190fd5b60015460408051627eeac760e11b81526001600160a01b038581166004830152602482018790529151600093929092169162fdd58e91604480820192602092909190829003018186803b158015613c7957600080fd5b505afa158015613c8d573d6000803e3d6000fd5b505050506040513d6020811015613ca357600080fd5b505111613ce5576040805162461bcd60e51b815260206004820152600b60248201526a4f464645525f454d50545960a81b604482015290519081900360640190fd5b60008381526008602090815260408083205480845260049283905292200154421115610f53576040805162461bcd60e51b815260206004820152600d60248201526c13d191915497d1561412549151609a1b604482015290519081900360640190fd5b6000613d5c836001600160a01b0316613fe0565b15613e525760408051630a85bd0160e11b8082526001600160a01b0387811660048401523360248401526044830186905260806064840152600060848401819052935191939087169263150b7a029260c48083019360209383900390910190829087803b158015613dcc57600080fd5b505af1158015613de0573d6000803e3d6000fd5b505050506040513d6020811015613df657600080fd5b50516001600160e01b03191614613e52576040805162461bcd60e51b815260206004820152601b60248201527a155394d5541413d495115117d15490cdcc8c57d49150d152559151602a1b604482015290519081900360640190fd5b6001805460408051637a94c56560e11b81526001600160a01b0388811660048301526024820187905260448201949094529051929091169163f5298aca9160648082019260009290919082900301818387803b158015613eb157600080fd5b505af1158015613ec5573d6000803e3d6000fd5b5050506000838152600a602090815260408083208054600101908190558617808452600990925290912054909150613f019060ff16600761386d565b6000828152600960209081526040808320805460ff191660ff959095169490941762ffff00191690935560015483516340c10f1960e01b81526001600160a01b03898116600483015260248201879052945194909116936340c10f1993604480840194938390030190829087803b158015613f7b57600080fd5b505af1158015613f8f573d6000803e3d6000fd5b505050506040513d6020811015613fa557600080fd5b509095945050505050565b600b8054600101905560008115613fd5576080600b54901b600160ff1b1790506108d2565b5050600b5460801b90565b3b151590565b604051806101200160405280600080191681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373434f4d504c41494e504552494f445f45585049524544000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554a26469706673582212206e21c8516e1e3fc7ede5eac570d0a10a32146819d70fd63c00a8e96cc9a1626e64736f6c63430007010033", + "sourceMap": "1169:47176:6:-:0;;;7484:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7484:169:6;867:17:22;887:12;:10;:12::i;:::-;909:6;:18;;-1:-1:-1;;;;;;909:18:22;-1:-1:-1;;;;;909:18:22;;;;;;;942:43;;909:18;;-1:-1:-1;909:18:22;942:43;;909:6;;942:43;-1:-1:-1;928:5:29;918:15;;-1:-1:-1;;;;918:15:29;;;-1:-1:-1;7532:32:6;;-1:-1:-1;;;;;;7532:32:6;-1:-1:-1;;;;;7532:32:6;;;;;;;;;;7594:10;7577:14;:27;;;7615:17;:30;1169:47176;;598:104:27;685:10;598:104;:::o;1169:47176:6:-;;;;;;;", + "deployedSourceMap": "1169:47176:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47239:151;;;:::i;:::-;;;;;;;;;;;;;;;;38179:190;;;;;;;;;;;;;;;;-1:-1:-1;38179:190:6;;:::i;44418:205::-;;;;;;;;;;;;;;;;-1:-1:-1;44418:205:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;41358:243;;;;;;;;;;;;;;;;-1:-1:-1;41358:243:6;;:::i;:::-;;;;-1:-1:-1;;;;;41358:243:6;;;;;;;;;;;;;;42355:589;;;;;;;;;;;;;;;;-1:-1:-1;42355:589:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8074:81;;;:::i;:::-;;29860:573;;;;;;;;;;;;;;;;-1:-1:-1;29860:573:6;;;;;;-1:-1:-1;;;;;29860:573:6;;:::i;47851:196::-;;;;;;;;;;;;;;;;-1:-1:-1;47851:196:6;;:::i;45673:295::-;;;;;;;;;;;;;;;;-1:-1:-1;45673:295:6;;:::i;:::-;;;;;;;;;;;;;;;;;;1035:84:29;;;:::i;32613:2261:6:-;;;;;;;;;;;;;;;;-1:-1:-1;32613:2261:6;;:::i;21299:4356::-;;;;;;;;;;;;;;;;-1:-1:-1;21299:4356:6;;;;;;-1:-1:-1;;;;;21299:4356:6;;:::i;1700:145:22:-;;;:::i;17796:246:6:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;17796:246:6;;;;;;;;;;;;;:::i;30666:396::-;;;;;;;;;;;;;;;;-1:-1:-1;30666:396:6;;:::i;8614:1740::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8614:1740:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;20288:816::-;;;;;;;;;;;;;;;;-1:-1:-1;20288:816:6;;;;;;-1:-1:-1;;;;;20288:816:6;;:::i;19015:1008::-;;;;;;;;;;;;;;;;-1:-1:-1;19015:1008:6;;;;;;-1:-1:-1;;;;;19015:1008:6;;:::i;37819:160::-;;;;;;;;;;;;;;;;-1:-1:-1;37819:160:6;;:::i;7835:77::-;;;:::i;40878:247::-;;;;;;;;;;;;;;;;-1:-1:-1;40878:247:6;;:::i;35210:258::-;;;;;;;;;;;;;;;;-1:-1:-1;35210:258:6;;;;;;-1:-1:-1;;;;;35210:258:6;;:::i;36815:234::-;;;;;;;;;;;;;;;;-1:-1:-1;36815:234:6;;:::i;1068:85:22:-;;;:::i;47006:135:6:-;;;:::i;47502:157::-;;;:::i;46125:160::-;;;:::i;44813:623::-;;;;;;;;;;;;;;;;-1:-1:-1;44813:623:6;;:::i;43997:213::-;;;;;;;;;;;;;;;;-1:-1:-1;43997:213:6;;:::i;41817:337::-;;;;;;;;;;;;;;;;-1:-1:-1;41817:337:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13347:790;;;;;;;;;;;;;;;;-1:-1:-1;13347:790:6;;;-1:-1:-1;;;;;13347:790:6;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;38559:438::-;;;;;;;;;;;;;;;;-1:-1:-1;38559:438:6;;:::i;35623:397::-;;;;;;;;;;;;;;;;-1:-1:-1;35623:397:6;-1:-1:-1;;;;;35623:397:6;;:::i;36166:387::-;;;;;;;;;;;;;;;;-1:-1:-1;36166:387:6;-1:-1:-1;;;;;36166:387:6;;:::i;48181:161::-;;;:::i;10896:572::-;;;;;;;;;;;;;;;;-1:-1:-1;10896:572:6;;;;;;;;;;-1:-1:-1;;;;;10896:572:6;;;;;;;;;;;;:::i;31739:736::-;;;;;;;;;;;;;;;;-1:-1:-1;31739:736:6;;:::i;39752:424::-;;;;;;;;;;;;;;;;-1:-1:-1;39752:424:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;39279:232;;;;;;;;;;;;;;;;-1:-1:-1;39279:232:6;;;;;;-1:-1:-1;;;;;39279:232:6;;:::i;43558:208::-;;;;;;;;;;;;;;;;-1:-1:-1;43558:208:6;;:::i;46747:169::-;;;;;;;;;;;;;;;;-1:-1:-1;46747:169:6;-1:-1:-1;;;;;46747:169:6;;:::i;31212:398::-;;;;;;;;;;;;;;;;-1:-1:-1;31212:398:6;;:::i;37324:252::-;;;;;;;;;;;;;;;;-1:-1:-1;37324:252:6;;:::i;1994:240:22:-;;;;;;;;;;;;;;;;-1:-1:-1;1994:240:22;-1:-1:-1;;;;;1994:240:22;;:::i;25836:3701:6:-;;;;;;;;;;;;;;;;-1:-1:-1;25836:3701:6;;;;;;-1:-1:-1;;;;;25836:3701:6;;:::i;43126:205::-;;;;;;;;;;;;;;;;-1:-1:-1;43126:205:6;;:::i;46441:151::-;;;:::i;40417:288::-;;;;;;;;;;;;;;;;-1:-1:-1;40417:288:6;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;47239:151;47368:14;;47239:151;:::o;38179:190::-;-1:-1:-1;;;;;;38334:27:6;;38179:190;;;;:::o;44418:205::-;44541:5;44571:30;;;:14;:30;;;;;:44;;;;44418:205::o;41358:243::-;41473:7;41519:29;;;:13;:29;;;;;;;;;41566:20;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;41566:27:6;;41358:243::o;42355:589::-;42486:5;42623:31;;;:14;:31;;;;;:38;;;42805:51;;;42740:50;42871:54;;;;42623:38;;;;;;42676:49;;;;;42740:50;;;;;;;;42805:51;42871:54;42355:589::o;8074:81::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8137:10:::1;:8;:10::i;:::-;8074:81::o:0;29860:573::-;6454:18;;30035:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;1349:8:29::1;:6;:8::i;:::-;1348:9;1340:38;;;::::0;;-1:-1:-1;;;1340:38:29;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;::::1;;30103:7:6::2;-1:-1:-1::0;;;;;30068:42:6::2;:31;30084:14;30068:15;:31::i;:::-;-1:-1:-1::0;;;;;30068:42:6::2;;30060:71;;;::::0;;-1:-1:-1;;;30060:71:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30060:71:6;;;;;;;;;;;;;::::2;;30144:14;30161:43;30180:14;30196:7;30161:18;:43::i;:::-;30144:60;;30234:1;30225:6;:10;30217:34;;;::::0;;-1:-1:-1;;;30217:34:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;30217:34:6;;;;;;;;;;;;;::::2;;30279:14;::::0;30264:68:::2;::::0;;-1:-1:-1;;;30264:68:6;;-1:-1:-1;;;;;30264:68:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;30279:14;;;::::2;::::0;30264:35:::2;::::0;:68;;;;;30279:14:::2;::::0;30264:68;;;;;;;30279:14;;30264:68;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;30350:49:6::2;::::0;;;;;-1:-1:-1;;;;;30350:49:6;::::2;;::::0;::::2;::::0;;;::::2;::::0;-1:-1:-1;30350:49:6;;;;;;;;-1:-1:-1;30350:49:6::2;30419:6:::0;29860:573;-1:-1:-1;;;29860:573:6:o;47851:196::-;47977:7;48010:29;;;:13;:29;;;;;;;47851:196::o;45673:295::-;45795:4;45839:31;;;:14;:31;;;;;:49;;;;;;;:120;;-1:-1:-1;45909:31:6;;;;:14;:31;;;;;:50;;;;;;45839:120;45837:123;;45673:295;-1:-1:-1;;45673:295:6:o;1035:84:29:-;1082:4;1105:7;-1:-1:-1;;;1105:7:29;;;;;1035:84::o;32613:2261:6:-;32707:20;32699:47;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;-1:-1:-1;;;32699:47:6;;;;;;;;;;;;;;;32849:13;32865:31;;;:14;:31;;;;;:38;;;32925:28;32865:38;;32925:8;:28::i;:::-;32924:29;32916:59;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;-1:-1:-1;;;32916:59:6;;;;;;;;;;;;;;;33070:9;33090:23;;:::i;:::-;33129:8;:52;33138:42;33164:15;33138:25;:42::i;:::-;33129:52;;;;;;;;;;;;;;-1:-1:-1;33129:52:6;33090:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33090:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33198:31:6;;33207:7;;33198:8;:31::i;:::-;33194:1432;;;33250:35;33259:7;488:1:5;33250:8:6;:35::i;:::-;33246:418;;;33363:4;33356:11;;33246:418;;;33525:17;;33447:31;;;;:14;:31;;;;;:54;;;:95;33411:15;:131;33389:275;;33644:4;33637:11;;33389:275;33194:1432;;;33699:35;33708:7;488:1:5;33699:8:6;:35::i;:::-;:152;;;;-1:-1:-1;33837:14:6;;33783:31;;;;:14;:31;;;;;:51;;;:68;33751:15;:100;;33699:152;33681:945;;;33941:4;33934:11;;33681:945;;;33981:32;34005:7;33981:23;:32::i;:::-;:60;;;;34017:24;34033:7;34017:15;:24::i;:::-;33963:663;;;34296:14;;34221:31;;;;:14;:31;;;;;:51;;;:89;34185:15;:125;34163:209;;34352:4;34345:11;;33963:663;;;34393:23;34408:7;34393:14;:23::i;:::-;34389:237;;;34553:14;;34534:8;:16;;;:33;34515:15;:52;34511:104;;34595:4;34588:11;;34511:104;34642:4;34638:229;;;34704:84;34738:7;532:1:5;34704:15:6;:84::i;:::-;34663:31;;;;:14;:31;;;;;;;;;:125;;-1:-1:-1;;34663:125:6;;;;;;;;;;;;;34808:47;;;;;34844:10;34808:47;;;;;;;;;;;;;;;;;;;34638:229;32613:2261;;;;:::o;21299:4356::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;21471:15;;21488:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;21548:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;21539:62:::3;::::0;21548:38:::3;;437:1:5;21539:8:6;:62::i;:::-;21538:63;21516:131;;;::::0;;-1:-1:-1;;;21516:131:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21516:131:6;;;;;;;;;;;;;::::3;;21772:31;::::0;;;:14:::3;:31;::::0;;;;:38;21763:59:::3;::::0;21772:38:::3;;::::0;21763:8:::3;:59::i;:::-;21762:60;21740:127;;;::::0;;-1:-1:-1;;;21740:127:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;21740:127:6;;;;;;;;;;;;;::::3;;22011:23;;:::i;:::-;22050:8;:52;22059:42;22085:15;22059:25;:42::i;:::-;22050:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;22050:52:6;;;22011:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;22011:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;22192:31;;;:14:::3;:31:::0;;;;:38;22011:91;;-1:-1:-1;22168:63:6::3;::::0;22192:38:::3;;22168:23;:63::i;:::-;:135;;;-1:-1:-1::0;22264:31:6::3;::::0;;;:14:::3;:31;::::0;;;;:38;22248:55:::3;::::0;22264:38:::3;;22248:15;:55::i;:::-;22150:3498;;;22384:31;::::0;;;:14:::3;:31;::::0;;;;:38;22353:127:::3;::::0;22384:38:::3;;488:1:5;22353:8:6;:127::i;:::-;22330:921;;22718:17;::::0;22672:14:::3;::::0;22589:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;:146;22545:15;:190;;22515:286;;;::::0;;-1:-1:-1;;;22515:286:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22515:286:6;;;;;;;;;;;;;::::3;;22330:921;;;23077:14;::::0;22994:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:97:::3;22950:15;:141;;22920:237;;;::::0;;-1:-1:-1;;;22920:237:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;22920:237:6;;;;;;;;;;;;;::::3;;23267:31;::::0;;;:14:::3;:31;::::0;;;;23324:33:::3;23267:54;::::0;::::3;:90:::0;23447:38;23413:118:::3;::::0;23447:38:::3;;437:1:5;23413:15:6;:118::i;:::-;23372:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:159;;-1:-1:-1;;23372:159:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;23553:35;;;;;;;::::3;::::0;;;;;;;;;::::3;22150:3498;;;23653:31;::::0;;;:14:::3;:31;::::0;;;;:38;23638:54:::3;::::0;23653:38:::3;;23638:14;:54::i;:::-;23634:2014;;;23763:31;::::0;;;:14:::3;:31;::::0;;;;:38;23732:127:::3;::::0;23763:38:::3;;488:1:5;23732:8:6;:127::i;:::-;23709:739;;24004:17;;23987:14;;23968:8;:16;;;:33;:53;23924:15;:97;;23894:193;;;::::0;;-1:-1:-1;;;23894:193:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;23894:193:6;;;;;;;;;;;;;::::3;23709:739;24274:14;;24255:8;:16;;;:33;24236:15;:52;;24206:148;;;::::0;;-1:-1:-1;;;24206:148:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24206:148:6;;;;;;;;;;;;;::::3;23634:2014;24864:31;::::0;;;:14:::3;:31;::::0;;;;:38;24855:66:::3;::::0;24864:38:::3;;488:1:5;24855:8:6;:66::i;:::-;24837:811;;;25093:14;::::0;25014:31:::3;::::0;;;:14:::3;:31;::::0;;;;:51:::3;;::::0;:93:::3;24974:15;:133;;24948:217;;;::::0;;-1:-1:-1;;;24948:217:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;;;;;;;;;24948:217:6;;;;;;;;;;;;;::::3;;25337:31;::::0;;;:14:::3;:31;::::0;;;;:38;25303:118:::3;::::0;25337:38:::3;;437:1:5;25303:15:6;:118::i;24837:811::-;25511:29;::::0;;-1:-1:-1;;;25511:29:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;25511:29:6;;;;;;;;;;;;;::::3;24837:811;7467:1;6761::::2;;21299:4356:::0;;:::o;1700:145:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;1806:1:::1;1790:6:::0;;1769:40:::1;::::0;-1:-1:-1;;;;;1790:6:22;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1769:40:22;1806:1;;1769:40:::1;1836:1;1819:19:::0;;-1:-1:-1;;;;;;1819:19:22::1;::::0;;1700:145::o;17796:246:6:-;1614:8:29;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;6824:14:6::1;::::0;-1:-1:-1;;;;;6824:14:6::1;6816:55;;;::::0;;-1:-1:-1;;;6816:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;::::1;;6994:14;::::0;-1:-1:-1;;;;;6994:14:6::1;6980:10;:28;6972:55;;;::::0;;-1:-1:-1;;;6972:55:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;::::1;;17983:14:::2;::::0;17968:66:::2;::::0;;-1:-1:-1;;;17968:66:6;;-1:-1:-1;;;;;17968:66:6;;::::2;;::::0;::::2;::::0;;;;;;;;;;;;;;;17983:14;;;::::2;::::0;17968:35:::2;::::0;:66;;;;;17983:14:::2;::::0;17968:66;;;;;;;17983:14;;17968:66;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;17796:246:::0;;;:::o;30666:396::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;30804:20;30796:47:::1;;;::::0;;-1:-1:-1;;;30796:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;30796:47:6;;;;;;;;;;;;;::::1;;30944:31;::::0;;;:14:::1;:31;::::0;;;;;;;:56;;-1:-1:-1;;30944:56:6::1;;;::::0;;31018:36;;;;;;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31018:36:6;;;;;;;;;::::1;30666:396:::0;:::o;8614:1740::-;6454:18;;8885:7;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;8927:8:::1;8913:10;:22;;8905:56;;;::::0;;-1:-1:-1;;;8905:56:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;8905:56:6;;;;;;;;;;;;;::::1;;9130:15;9148:9;9130:27;9118:8;:39;;9110:71;;;::::0;;-1:-1:-1;;;9110:71:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9110:71:6;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;9450:20:6;::::1;9372:11;9450:20:::0;;;:11:::1;:20;::::0;;;;;;;;:22;;::::1;::::0;::::1;::::0;;;9424:71;;-1:-1:-1;;;;;;9424:71:6::1;::::0;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9400:106;;;::::1;::::0;9523:11:::1;:18:::0;:22;9519:176:::1;;9600:13;::::0;;;:8:::1;:13;::::0;;;;:17:::1;;::::0;9588:11:::1;:30:::0;;9622:3;;9600:17;9588:30;::::1;;;;;;;;;;;;;:37;;9562:121;;;::::0;;-1:-1:-1;;;9562:121:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;9562:121:6;;;;;;;;;;;;;::::1;;9723:327;;;;;;;;9757:3;9723:327;;;;9782:11;:20;9794:7;-1:-1:-1::0;;;;;9782:20:6::1;-1:-1:-1::0;;;;;9782:20:6::1;;;;;;;;;;;;;9723:327;;;;9825:7;-1:-1:-1::0;;;;;9723:327:6::1;;;;;9858:10;9723:327;;;;9892:8;9723:327;;;;9922:6;9723:327;;;;9954:10;9723:327;;;;9990:10;9723:327;;;;10020:11;:18;;;;9723:327;;::::0;9707:8:::1;:13;9716:3;9707:13;;;;;;;;;;;:343;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;-1:-1:-1::0;;;;;9707:343:6::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10063:11;10080:3;10063:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10187:7;-1:-1:-1::0;;;;;10102:188:6::1;10152:11;:20;10164:7;-1:-1:-1::0;;;;;10152:20:6::1;-1:-1:-1::0;;;;;10152:20:6::1;;;;;;;;;;;;;10134:3;10102:188;10209:10;10234:8;10278:1;10257:11;:18;;;;:22;10102:188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10310:36;10322:7;10331:3;10336:9;10310:11;:36::i;:::-;10303:43:::0;8614:1740;-1:-1:-1;;;;;;;;;8614:1740:6:o;20288:816::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;20458:15;;20475:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;20542:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;20525:56:::3;::::0;20542:38:::3;;20525:16;:56::i;:::-;20503:125;;;::::0;;-1:-1:-1;;;20503:125:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;20503:125:6;;;;;;;;;;;;;::::3;;20770:35;20789:15;20770:18;:35::i;:::-;-1:-1:-1::0;20818:31:6::3;::::0;;;:14:::3;:31;::::0;;;;20872:15:::3;20818:51;::::0;::::3;:69:::0;20969:38;20939:104:::3;::::0;20969:38:::3;;345:1:5;20939:15:6;:104::i;:::-;20898:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;20898:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;21061:35;;;;;;;::::3;::::0;;;;;;;;;::::3;6761:1:::2;;20288:816:::0;;:::o;19015:1008::-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;6454:18:6::1;::::0;-1:-1:-1;;;;;6454:18:6::1;6446:59;;;::::0;;-1:-1:-1;;;6446:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;::::1;;6628:18;::::0;-1:-1:-1;;;;;6628:18:6::1;6614:10;:32;6606:60;;;::::0;;-1:-1:-1;;;6606:60:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;::::1;;7279:14:::2;::::0;7271:48:::2;::::0;;-1:-1:-1;;;7271:48:6;;::::2;::::0;::::2;::::0;;;;;19185:15;;19202:10;;-1:-1:-1;;;;;7271:59:6;;::::2;::::0;7279:14;::::2;::::0;7271:31:::2;::::0;:48;;;;;::::2;::::0;;;;;;;;;7279:14;7271:48;::::2;;::::0;::::2;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;-1:-1:-1::0;7271:48:6;-1:-1:-1;;;;;7271:59:6::2;;7249:123;;;::::0;;-1:-1:-1;;;7249:123:6;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;7249:123:6;;;;;;;;;;;;;::::2;;19293:31:::3;::::0;;;:14:::3;:31;::::0;;;;:38;19276:56:::3;::::0;19293:38:::3;;19276:16;:56::i;:::-;19254:123;;;::::0;;-1:-1:-1;;;19254:123:6;;::::3;;::::0;::::3;::::0;::::3;::::0;;;;-1:-1:-1;;;19254:123:6;;;;;;;;;;;;;::::3;;19505:35;19524:15;19505:18;:35::i;:::-;;19551:23;;:::i;:::-;19590:8;:52;19599:42;19625:15;19599:25;:42::i;:::-;19590:52:::0;;::::3;::::0;;::::3;::::0;;;;;;;;-1:-1:-1;19590:52:6;;;19551:91;;::::3;::::0;::::3;::::0;;;;;;::::3;::::0;;::::3;::::0;;;::::3;::::0;::::3;::::0;::::3;::::0;-1:-1:-1;;;;;19551:91:6::3;::::0;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;;;;;::::3;::::0;::::3;::::0;;;;;::::3;::::0;;::::3;::::0;::::3;::::0;;;19655:31;;;:14:::3;:31:::0;;;;;;;19709:15:::3;19655:51:::0;;::::3;:69:::0;;;;19806:38;;19551:91;;-1:-1:-1;19776:104:6::3;::::0;19806:38:::3;::::0;;::::3;::::0;19776:15:::3;:104::i;:::-;19735:31;::::0;;;:14:::3;:31;::::0;;;;;;;;:145;;-1:-1:-1;;19735:145:6::3;;::::0;;;::::3;::::0;;;::::3;::::0;;;19986:18;;19898:117;;;;;-1:-1:-1;;;;;19898:117:6;::::3;::::0;;::::3;::::0;;;;;;;;;::::3;::::0;;;;;;;;::::3;7467:1;6761::::2;;19015:1008:::0;;:::o;37819:160::-;37922:7;37954:11;37966:4;37954:17;;;;;;;;;;;;;;;;37947:24;;37819:160;;;:::o;7835:77::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;7896:8:::1;:6;:8::i;40878:247::-:0;40994:7;41040:29;;;:13;:29;;;;;;;;;41087:20;;:8;:20;;;;;:30;;;;40878:247::o;35210:258::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;35359:18:::1;35380:29:::0;;;:13:::1;:29;::::0;;;;;;;;35420:20;;:8:::1;:20:::0;;;;;;:27:::1;;:40:::0;;-1:-1:-1;;;;;;35420:40:6::1;-1:-1:-1::0;;;;;35420:40:6;;::::1;::::0;;;::::1;::::0;;35210:258::o;36815:234::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;36938:14:6::1;:32:::0;;;36988:53:::1;::::0;;;;;37030:10:::1;36988:53;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;36815:234:::0;:::o;1068:85:22:-;1114:7;1140:6;-1:-1:-1;;;;;1140:6:22;1068:85;:::o;47006:135:6:-;47127:6;;47006:135;:::o;47502:157::-;47634:17;;47502:157;:::o;46125:160::-;46259:18;;-1:-1:-1;;;;;46259:18:6;46125:160;:::o;44813:623::-;44932:4;44987:23;;:::i;:::-;45026:8;:52;45035:42;45061:15;45035:25;:42::i;:::-;45026:52;;;;;;;;;;;;;;-1:-1:-1;45026:52:6;44987:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;44987:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;45119:15:6;-1:-1:-1;45097:37:6;45089:71;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;-1:-1:-1;;;45089:71:6;;;;;;;;;;;;;;;45282:15;45262:8;:16;;;:35;;45254:67;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;-1:-1:-1;;;45254:67:6;;;;;;;;;;;;;;;-1:-1:-1;45424:4:6;;44813:623;-1:-1:-1;;44813:623:6:o;43997:213::-;44119:7;44151:30;;;:14;:30;;;;;:51;;;-1:-1:-1;;;;;44151:51:6;;43997:213::o;41817:337::-;41930:7;41939;41948;41957;41966;41992:23;;:::i;:::-;-1:-1:-1;;;42018:21:6;;;;-1:-1:-1;;42018:8:6;:21;;;;;;;;;41992:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;41992:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41992:47:6;;41817:337::o;13347:790::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;13566:19:::1;13588:39;13612:14;13588:23;:39::i;:::-;13566:61;;13683:14;13666:31;;:13;:31;;;13658:68;;;::::0;;-1:-1:-1;;;13658:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;13658:68:6;;;;;;;;;;;;;::::1;;13737:52;13756:14;13772:7;13781;13737:18;:52::i;:::-;13825:22;13850:44;13861:7;13870;13879:14;13850:10;:44::i;:::-;13825:69;;13946:14;13912:217;13975:14;14004:7;14026;14048:41;14074:14;14048:25;:41::i;:::-;13912:217;::::0;;;;;-1:-1:-1;;;;;13912:217:6;;::::1;;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;::::1;6761:1;;13347:790:::0;;;;;:::o;38559:438::-;38685:7;38718:20;38710:47;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;-1:-1:-1;;;38710:47:6;;;;;;;;;;;;;;;38860:21;38884:39;38907:15;38884:22;:39::i;:::-;38941:38;38950:28;;;:13;:28;;;;;;;;;38941:38;;:8;:38;;;;;:48;;38559:438;-1:-1:-1;;;38559:438:6:o;35623:397::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;35744:33:6;::::1;35736:65;;;::::0;;-1:-1:-1;;;35736:65:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;35736:65:6;;;;;;;;;;;;;::::1;;35904:18;:40:::0;;-1:-1:-1;;;;;;35904:40:6::1;-1:-1:-1::0;;;;;35904:40:6;::::1;::::0;;::::1;::::0;;;35962:50:::1;::::0;;;;;36001:10:::1;35962:50;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;35623:397:::0;:::o;36166:387::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;36297:29:6;::::1;36289:61;;;::::0;;-1:-1:-1;;;36289:61:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;36289:61:6;;;;;;;;;;;;;::::1;;36453:14;:32:::0;;-1:-1:-1;;;;;;36453:32:6::1;-1:-1:-1::0;;;;;36453:32:6;::::1;::::0;;::::1;::::0;;;36503:42:::1;::::0;;;;;36534:10:::1;36503:42;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;36166:387:::0;:::o;48181:161::-;48320:14;;-1:-1:-1;;;;;48320:14:6;48181:161;:::o;10896:572::-;6454:18;;-1:-1:-1;;;;;6454:18:6;6446:59;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;-1:-1:-1;;;6446:59:6;;;;;;;;;;;;;;;6628:18;;-1:-1:-1;;;;;6628:18:6;6614:10;:32;6606:60;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;-1:-1:-1;;;6606:60:6;;;;;;;;;;;;;;;11142:1:::1;11125:14;:18;;;:58;;;;;11182:1;11164:14;:19;;;;11125:58;11103:130;;;::::0;;-1:-1:-1;;;11103:130:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;11103:130:6;;;;;;;;;;;;;::::1;;11287:173;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;11287:173:6;;::::1;;::::0;;::::1;::::0;;;;;::::1;::::0;;;;;;-1:-1:-1;11254:30:6;;;:14:::1;:30:::0;;;;;;;:206;;;;;;;::::1;;;-1:-1:-1::0;;;;;;11254:206:6;;;::::1;-1:-1:-1::0;;11254:206:6;;::::1;::::0;;;::::1;;::::0;;;::::1;::::0;;;;;;;::::1;::::0;;;;;::::1;-1:-1:-1::0;;;;;;11254:206:6;;::::1;::::0;;;::::1;::::0;;10896:572::o;31739:736::-;31828:20;31820:47;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;-1:-1:-1;;;31820:47:6;;;;;;;;;;;;;;;31970:23;;:::i;:::-;32009:8;:52;32018:42;32044:15;32018:25;:42::i;:::-;32009:52;;;;;;;;;;;;;;-1:-1:-1;32009:52:6;31970:91;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;31970:91:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32111:15:6;-1:-1:-1;32092:107:6;;;;-1:-1:-1;32160:31:6;;;;:14;:31;;;;;:38;32143:56;;32160:38;;32143:16;:56::i;:::-;32074:394;;;32301:31;;;;:14;:31;;;;;:38;32267:116;;32301:38;;390:1:5;32267:15:6;:116::i;:::-;32226:31;;;;:14;:31;;;;;;;;;:157;;-1:-1:-1;;32226:157:6;;;;;;;;;;;;;32405:51;;;;;32445:10;32405:51;;;;;;;;;;;;;;;;;;;32074:394;31739:736;;:::o;39752:424::-;39879:7;39979:29;;;:13;:29;;;;;;;;;40041:20;;:8;:20;;;;;:26;;;;40082:30;;;;40127;;;;;40041:26;;39752:424::o;39279:232::-;39454:14;;39445:58;;;-1:-1:-1;;;39445:58:6;;-1:-1:-1;;;;;39445:58:6;;;;;;;;;;;;;;;39413:7;;39454:14;;;;;39445:34;;:58;;;;;;;;;;;;;;;39454:14;39445:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;39445:58:6;;39279:232;-1:-1:-1;;;39279:232:6:o;43558:208::-;43678:7;43710:30;;;:14;:30;;;;;:48;;;;-1:-1:-1;;;;;43710:48:6;;43558:208::o;46747:169::-;-1:-1:-1;;;;;46888:20:6;46855:7;46888:20;;;:11;:20;;;;;;;46747:169::o;31212:398::-;6824:14;;-1:-1:-1;;;;;6824:14:6;6816:55;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;-1:-1:-1;;;6816:55:6;;;;;;;;;;;;;;;6994:14;;-1:-1:-1;;;;;6994:14:6;6980:10;:28;6972:55;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;-1:-1:-1;;;6972:55:6;;;;;;;;;;;;;;;31351:20;31343:47:::1;;;::::0;;-1:-1:-1;;;31343:47:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;31343:47:6;;;;;;;;;;;;;::::1;;31491:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:57;;-1:-1:-1;;31491:57:6::1;::::0;::::1;::::0;;31566:36;;;;;31544:4:::1;31566:36:::0;;::::1;::::0;;;;;;-1:-1:-1;;;;;;;;;;;31566:36:6;;;;;;;;;::::1;31212:398:::0;:::o;37324:252::-;1291:12:22;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;37453:17:6::1;:38:::0;;;37509:59:::1;::::0;;;;;37557:10:::1;37509:59;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;;::::1;37324:252:::0;:::o;1994:240:22:-;1291:12;:10;:12::i;:::-;-1:-1:-1;;;;;1280:23:22;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1280:23:22;;1272:68;;;;;-1:-1:-1;;;1272:68:22;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1272:68:22;;;;;;;;;;;;;;;-1:-1:-1;;;;;2082:22:22;::::1;2074:73;;;;-1:-1:-1::0;;;2074:73:22::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2183:6;::::0;;2162:38:::1;::::0;-1:-1:-1;;;;;2162:38:22;;::::1;::::0;2183:6;::::1;::::0;-1:-1:-1;;;;;;;;;;;2162:38:22;::::1;2210:6;:17:::0;;-1:-1:-1;;;;;;2210:17:22::1;-1:-1:-1::0;;;;;2210:17:22;;;::::1;::::0;;;::::1;::::0;;1994:240::o;25836:3701:6:-;1349:8:29;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;25979:21:6::1;26003:39;26026:15;26003:22;:39::i;:::-;25979:63;;26109:10;-1:-1:-1::0;;;;;26075:44:6::1;:30;26091:13;26075:15;:30::i;:::-;-1:-1:-1::0;;;;;26075:44:6::1;;26053:110;;;::::0;;-1:-1:-1;;;26053:110:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26053:110:6;;;;;;;;;;;;;::::1;;26260:13;26276:31:::0;;;:14:::1;:31;::::0;;;;:38;::::1;;26336:35;26276:38:::0;488:1:5::1;26336:8:6;:35::i;:::-;26335:36;26327:68;;;::::0;;-1:-1:-1;;;26327:68:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26327:68:6;;;;;;;;;;;;;::::1;;26497:28;26506:7;532:1:5;26497:8:6;:28::i;:::-;26496:29;26488:59;;;::::0;;-1:-1:-1;;;26488:59:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26488:59:6;;;;;;;;;;;;;::::1;;26642:23;;:::i;:::-;26681:8;:52;26690:42;26716:15;26690:25;:42::i;:::-;26681:52:::0;;::::1;::::0;;::::1;::::0;;;;;;;;-1:-1:-1;26681:52:6;26642:91;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;-1:-1:-1;;;;;26642:91:6::1;::::0;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;-1:-1:-1;26750:29:6::1;::::0;26759:7;;26750:8:::1;:29::i;:::-;:62;;;;26783:29;26792:7;345:1:5;26783:8:6;:29::i;:::-;26746:2595;;;26873:31;26882:7;437:1:5;26873:8:6;:31::i;:::-;26868:931;;27128:17;::::0;27082:14:::1;::::0;26999:31:::1;::::0;;;:14:::1;:31;::::0;;;;:51:::1;;::::0;:97:::1;:146;26955:15;:190;;26925:281;;;::::0;;-1:-1:-1;;;26925:281:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;26925:281:6;;;;;;;;;;;;;::::1;;27303:31;::::0;;;:14:::1;:31;::::0;;;;27357:37:::1;27303:51;::::0;;::::1;:91:::0;26868:931:::1;;;27627:17;::::0;27541:31:::1;::::0;;;:14:::1;:31;::::0;;;;:54:::1;;::::0;:103:::1;27497:15;:147;;27467:238;;;::::0;;-1:-1:-1;;;27467:238:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27467:238:6;;;;;;;;;;;;;::::1;;26746:2595;;;27820:29;27829:7;390:1:5;27820:8:6;:29::i;:::-;27816:1525;;;27897:31;27906:7;437:1:5;27897:8:6;:31::i;:::-;27892:806;;28059:17;;28042:14;;28023:8;:16;;;:33;:53;27979:15;:97;;27949:188;;;::::0;;-1:-1:-1;;;27949:188:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;27949:188:6;;;;;;;;;;;;;::::1;27816:1525;28719:25;28736:7;28719:16;:25::i;:::-;28715:626;;;28896:17;;28879:14;;28860:8;:16;;;:33;:53;28820:15;:93;;28794:172;;;::::0;;-1:-1:-1;;;28794:172:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;28794:172:6;;;;;;;;;;;;;::::1;;29059:31;::::0;;;:14:::1;:31;::::0;;;;29113:33:::1;29059:51;::::0;;::::1;:87:::0;28715:626:::1;29394:79;29424:7;488:1:5;29394:15:6;:79::i;:::-;29353:31;::::0;;;:14:::1;:31;::::0;;;;;;;;:120;;-1:-1:-1;;29353:120:6::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;29491:38;;;;;;;::::1;::::0;;;;;;;;;::::1;1388:1:29;;;25836:3701:6::0;;:::o;43126:205::-;43283:14;;43275:48;;;-1:-1:-1;;;43275:48:6;;;;;;;;;;43243:7;;-1:-1:-1;;;;;43283:14:6;;43275:31;;:48;;;;;;;;;;;;;;43283:14;43275:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43275:48:6;;43126:205;-1:-1:-1;;43126:205:6:o;46441:151::-;46570:14;;-1:-1:-1;;;;;46570:14:6;46441:151;:::o;40417:288::-;40535:7;40590:29;;;:13;:29;;;;;;;;;40638:20;;:8;:20;;;;;:26;;;;40666:30;;;;;40638:26;;40417:288::o;2047:117:29:-;1614:8;:6;:8::i;:::-;1606:41;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;-1:-1:-1;;;1606:41:29;;;;;;;;;;;;;;;2115:5:::1;2105:15:::0;;-1:-1:-1;;;;2105:15:29::1;::::0;;2135:22:::1;2144:12;:10;:12::i;:::-;2135:22;::::0;;-1:-1:-1;;;;;2135:22:29;;::::1;::::0;;;;;;;::::1;::::0;;::::1;2047:117::o:0;3510:128:5:-;3603:15;;;;;;;210:1;3602:23;;;:28;;3510:128::o;2321:205::-;2419:4;2459:59;2475:30;2491:1;255;2475:15;:30::i;:::-;300:1;2459:15;:59::i;:::-;2448:70;;:7;:70;;;2441:77;;2321:205;;;:::o;2733:165::-;2796:4;2831:59;2847:30;2863:1;255;2847:15;:30::i;:::-;345:1;2831:15;:59::i;3104:164::-;3166:4;3201:59;3217:30;3233:1;255;3217:15;:30::i;:::-;390:1;3779:175;210:1;3928:17;;;;;;3917:29;;3779:175::o;598:104:27:-;685:10;598:104;:::o;11858:938:6:-;11986:7;12014:24;12006:56;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;-1:-1:-1;;;12006:56:6;;;;;;;;;;;;;;;12171:20;;;;:8;:20;;;;;:27;;;-1:-1:-1;;;;;12171:38:6;;;:27;;:38;12163:66;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;-1:-1:-1;;;12163:66:6;;;;;;;;;;;;;;;12344:1;12332:9;:13;12324:42;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;-1:-1:-1;;;12324:42:6;;;;;;;;;;;;;;;12462:21;12486:23;12504:4;12486:17;:23::i;:::-;12564:28;;;;:13;:28;;;;;;:41;;;12633:14;;12618:137;;-1:-1:-1;;;12618:137:6;;-1:-1:-1;;;;;12618:137:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12462:47;;-1:-1:-1;12633:14:6;;;12618:35;;:137;;;;;12564:28;;12618:137;;;;;;12564:28;12633:14;12618:137;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12775:13:6;;11858:938;-1:-1:-1;;;;;;;11858:938:6:o;1969:137:5:-;2033:4;2068:30;2084:1;255;2068:15;:30::i;1800:115:29:-;1349:8;:6;:8::i;:::-;1348:9;1340:38;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;-1:-1:-1;;;1340:38:29;;;;;;;;;;;;;;;1859:7:::1;:14:::0;;-1:-1:-1;;;;1859:14:29::1;-1:-1:-1::0;;;1859:14:29::1;::::0;;1888:20:::1;1895:12;:10;:12::i;14430:1142:6:-:0;14583:19;14575:46;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;-1:-1:-1;;;14575:46:6;;;;;;;;;;;;;;;14728:20;:7;-1:-1:-1;;;;;14728:18:6;;:20::i;:::-;14724:282;;;14791:46;;;-1:-1:-1;;;14791:46:6;;-1:-1:-1;;;14791:46:6;;;;;;-1:-1:-1;;;;;14791:34:6;;;;;:46;;;;;;;;;;;;;;:34;:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14791:46:6;14765:135;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;-1:-1:-1;;;14765:135:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15026:21:6;;15018:53;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;-1:-1:-1;;;15018:53:6;;;;;;;;;;;;;;;15203:14;;15194:59;;;-1:-1:-1;;;15194:59:6;;-1:-1:-1;;;;;15194:59:6;;;;;;;;;;;;;;;15256:1;;15203:14;;;;;15194:34;;:59;;;;;;;;;;;;;;;15203:14;15194:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15194:59:6;:63;15172:124;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;-1:-1:-1;;;15172:124:6;;;;;;;;;;;;;;;15391:18;15412:29;;;:13;:29;;;;;;;;;15476:20;;;:8;:20;;;;;;:28;;15508:15;-1:-1:-1;15476:47:6;15454:110;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;-1:-1:-1;;;15454:110:6;;;;;;;;;;;;;;16023:1393;16149:7;16173:16;:3;-1:-1:-1;;;;;16173:14:6;;:16::i;:::-;16169:545;;;16232:185;;;-1:-1:-1;;;16232:185:6;;;-1:-1:-1;;;;;16232:185:6;;;;;;;16326:10;16232:185;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;;;;;;;;16421:50;;16232:41;;;;16421:50;;16232:185;;;;;;;;;;;;;;;;:41;:185;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16232:185:6;-1:-1:-1;;;;;;16232:239:6;;16206:328;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;-1:-1:-1;;;16206:328:6;;;;;;;;;;;;;;;16741:14;;;16726:63;;;-1:-1:-1;;;16726:63:6;;-1:-1:-1;;;;;16726:63:6;;;;;;;;;;;;;;;;;;;;;;16741:14;;;;;16726:35;;:63;;;;;16741:14;;16726:63;;;;;;;;16741:14;;16726:63;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16868:22:6;16925:28;;;:12;:28;;;;;;;;16923:30;;;;;;;;16906:47;;17058:30;;;:14;:30;;;;;;:37;16906:47;;-1:-1:-1;17028:103:6;;17058:37;;255:1:5;17028:15:6;:103::i;:::-;16988:30;;;;:14;:30;;;;;;;;:143;;-1:-1:-1;;16988:143:6;;;;;;;;;;-1:-1:-1;;17209:57:6;;;;-1:-1:-1;17333:14:6;17318:56;;-1:-1:-1;;;17318:56:6;;-1:-1:-1;;;;;17318:56:6;;;;;;;;;;;;;;;17333:14;;;;;17318:35;;:56;;;;;16988:30;17318:56;;;;;;;17333:14;17318:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17394:14:6;;16023:1393;-1:-1:-1;;;;;16023:1393:6:o;18319:468::-;18439:6;:8;;;;;;18403:18;18460:290;;;;18533:3;18523:6;;:13;;-1:-1:-1;;;18508:29:6;18495:42;;18460:290;;;-1:-1:-1;;18651:6:6;;18661:3;18651:13;;18319:468::o;718:413:26:-;1078:20;1116:8;;;718:413::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\r\n\r\npragma solidity 0.7.1;\r\n\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\r\nimport \"@openzeppelin/contracts/utils/Pausable.sol\";\r\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\r\nimport \"./interfaces/IERC1155.sol\";\r\nimport \"./interfaces/IERC165.sol\";\r\nimport \"./interfaces/IERC721.sol\";\r\nimport \"./interfaces/IERC1155ERC721.sol\";\r\nimport \"./interfaces/IERC721TokenReceiver.sol\";\r\nimport \"./interfaces/IVoucherKernel.sol\";\r\nimport \"./UsingHelpers.sol\";\r\n\r\n//preparing for ERC-1066, ERC-1444, EIP-838\r\n\r\n/**\r\n * @title VoucherKernel contract is controlling the core business logic\r\n * @dev Notes:\r\n * - Since this is a reference app, it is not yet optimized.\r\n * In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\r\n * - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\r\n * See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931\r\n */\r\n// solhint-disable-next-line\r\ncontract VoucherKernel is IVoucherKernel, Ownable, Pausable, UsingHelpers {\r\n using Address for address;\r\n using SafeMath for uint256;\r\n\r\n //AssetRegistry assetRegistry;\r\n address private tokensContract;\r\n\r\n //promise for an asset could be reusable, but simplified here for brevity\r\n struct Promise {\r\n bytes32 promiseId;\r\n uint256 nonce; //the asset that is offered\r\n address seller; //the seller who created the promise\r\n //we simplify the value for the demoapp, otherwise voucher details would be packed in one bytes32 field value\r\n uint256 validFrom;\r\n uint256 validTo;\r\n uint256 price;\r\n uint256 depositSe;\r\n uint256 depositBu;\r\n uint256 idx;\r\n }\r\n\r\n struct VoucherPaymentMethod {\r\n uint8 paymentMethod;\r\n address addressTokenPrice;\r\n address addressTokenDeposits;\r\n }\r\n\r\n address private bosonRouterAddress; //address of the Boson Router contract\r\n address private cashierAddress; //address of the Cashier contract\r\n\r\n mapping(bytes32 => Promise) private promises; //promises to deliver goods or services\r\n mapping(address => uint256) private tokenNonces; //mapping between seller address and its own nonces. Every time seller creates supply ID it gets incremented. Used to avoid duplicate ID's\r\n mapping(uint256 => VoucherPaymentMethod) private paymentDetails; // tokenSupplyId to VoucherPaymentMethod\r\n\r\n bytes32[] private promiseKeys;\r\n\r\n mapping(uint256 => bytes32) private ordersPromise; //mapping between an order (supply a.k.a. VoucherSet token) and a promise\r\n\r\n mapping(uint256 => VoucherStatus) private vouchersStatus; //recording the vouchers evolution\r\n\r\n //ID reqs\r\n mapping(uint256 => uint256) private typeCounters; //counter for ID of a particular type of NFT\r\n uint256 private constant MASK_TYPE = uint256(uint128(~0)) << 128; //the type mask in the upper 128 bits\r\n //1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private constant MASK_NF_INDEX = uint128(~0); //the non-fungible index mask in the lower 128\r\n //0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\r\n\r\n uint256 private constant TYPE_NF_BIT = 1 << 255; //the first bit represents an NFT type\r\n //1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n\r\n uint256 private typeId; //base token type ... 127-bits cover 1.701411835*10^38 types (not differentiating between FTs and NFTs)\r\n /* Token IDs:\r\n Fungibles: 0, followed by 127-bit FT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <0>\r\n \r\n Non-fungible VoucherSets (supply tokens): 1, followed by 127-bit NFT type ID, in the upper 128 bits, followed by 0 in lower 128-bits\r\n <1>\r\n */\r\n\r\n uint256 private complainPeriod;\r\n uint256 private cancelFaultPeriod;\r\n\r\n event LogPromiseCreated(\r\n bytes32 indexed _promiseId,\r\n uint256 indexed _nonce,\r\n address indexed _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _idx\r\n );\r\n\r\n event LogVoucherDelivered(\r\n uint256 indexed _tokenIdSupply,\r\n uint256 _tokenIdVoucher,\r\n address _issuer,\r\n address _holder,\r\n bytes32 _promiseId,\r\n uint256 _correlationId\r\n );\r\n\r\n event LogVoucherRedeemed(\r\n uint256 _tokenIdVoucher,\r\n address _holder,\r\n bytes32 _promiseId\r\n );\r\n\r\n event LogVoucherRefunded(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherComplain(uint256 _tokenIdVoucher);\r\n\r\n event LogVoucherFaultCancel(uint256 _tokenIdVoucher);\r\n\r\n event LogExpirationTriggered(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogFinalizeVoucher(uint256 _tokenIdVoucher, address _triggeredBy);\r\n\r\n event LogBosonRouterSet(address _newBosonRouter, address _triggeredBy);\r\n\r\n event LogCashierSet(address _newCashier, address _triggeredBy);\r\n\r\n event LogComplainPeriodChanged(\r\n uint256 _newComplainPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogCancelFaultPeriodChanged(\r\n uint256 _newCancelFaultPeriod,\r\n address _triggeredBy\r\n );\r\n\r\n event LogVoucherSetFaultCancel(uint256 _tokenIdSupply, address _issuer);\r\n\r\n event LogFundsReleased(\r\n uint256 _tokenIdVoucher,\r\n uint8 _type //0 .. payment, 1 .. deposits\r\n );\r\n\r\n modifier onlyFromRouter() {\r\n require(bosonRouterAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == bosonRouterAddress, \"UNAUTHORIZED_BR\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyFromCashier() {\r\n require(cashierAddress != address(0), \"UNSPECIFIED_BR\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(msg.sender == cashierAddress, \"UNAUTHORIZED_C\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n modifier onlyVoucherOwner(uint256 _tokenIdVoucher, address _sender) {\r\n //check authorization\r\n require(\r\n IERC721(tokensContract).ownerOf(_tokenIdVoucher) == _sender,\r\n \"UNAUTHORIZED_V\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n _;\r\n }\r\n\r\n constructor(address _tokensContract) {\r\n tokensContract = _tokensContract;\r\n\r\n complainPeriod = 7 * 1 days;\r\n cancelFaultPeriod = 7 * 1 days;\r\n }\r\n\r\n /**\r\n * @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\r\n * Only BR contract is in control of this function.\r\n */\r\n function pause() external override onlyFromRouter {\r\n _pause();\r\n }\r\n\r\n /**\r\n * @notice Unpause the process of interaction with voucherID's (ERC-721).\r\n * Only BR contract is in control of this function.\r\n */\r\n function unpause() external override onlyFromRouter {\r\n _unpause();\r\n }\r\n\r\n /**\r\n * @notice Creating a new promise for goods or services.\r\n * Can be reused, e.g. for making different batches of these (in the future).\r\n * @param _seller seller of the promise\r\n * @param _validFrom Start of valid period\r\n * @param _validTo End of valid period\r\n * @param _price Price (payment amount)\r\n * @param _depositSe Seller's deposit\r\n * @param _depositBu Buyer's deposit\r\n */\r\n function createTokenSupplyID(\r\n address _seller,\r\n uint256 _validFrom,\r\n uint256 _validTo,\r\n uint256 _price,\r\n uint256 _depositSe,\r\n uint256 _depositBu,\r\n uint256 _quantity\r\n ) external override onlyFromRouter returns (uint256) {\r\n require(_validFrom <= _validTo, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n // solhint-disable-next-line not-rely-on-time\r\n require(_validTo >= block.timestamp + 5 minutes, \"INVALID_VALIDITY_TO\"); //\"Minimum order validity is set to prevent any potential attack from flash-loans or similar.\" //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n bytes32 key;\r\n key = keccak256(\r\n abi.encodePacked(_seller, tokenNonces[_seller]++, _validFrom, _validTo)\r\n );\r\n\r\n if (promiseKeys.length > 0) {\r\n require(\r\n promiseKeys[promises[key].idx] != key,\r\n \"PROMISE_ALREADY_EXISTS\"\r\n );\r\n }\r\n\r\n promises[key] = Promise({\r\n promiseId: key,\r\n nonce: tokenNonces[_seller],\r\n seller: _seller,\r\n validFrom: _validFrom,\r\n validTo: _validTo,\r\n price: _price,\r\n depositSe: _depositSe,\r\n depositBu: _depositBu,\r\n idx: promiseKeys.length\r\n });\r\n\r\n promiseKeys.push(key);\r\n\r\n emit LogPromiseCreated(\r\n key,\r\n tokenNonces[_seller],\r\n _seller,\r\n _validFrom,\r\n _validTo,\r\n promiseKeys.length - 1\r\n );\r\n\r\n return createOrder(_seller, key, _quantity);\r\n }\r\n\r\n /**\r\n * @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\r\n * @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\r\n * @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\r\n * @param _tokenPrice token address which will hold the funds for the price of the voucher\r\n * @param _tokenDeposits token address which will hold the funds for the deposits of the voucher\r\n */\r\n function createPaymentMethod(\r\n uint256 _tokenIdSupply,\r\n uint8 _paymentMethod,\r\n address _tokenPrice,\r\n address _tokenDeposits\r\n ) external override onlyFromRouter {\r\n require(\r\n _paymentMethod > 0 &&\r\n _paymentMethod <= 4,\r\n \"INVALID PAYMENT METHOD\"\r\n );\r\n \r\n paymentDetails[_tokenIdSupply] = VoucherPaymentMethod({\r\n paymentMethod: _paymentMethod,\r\n addressTokenPrice: _tokenPrice,\r\n addressTokenDeposits: _tokenDeposits\r\n });\r\n }\r\n\r\n /**\r\n * @notice Create an order for offering a certain quantity of an asset\r\n * This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\r\n * @param _seller seller of the promise\r\n * @param _promiseId ID of a promise (simplified into asset for demo)\r\n * @param _quantity Quantity of assets on offer\r\n */\r\n function createOrder(\r\n address _seller,\r\n bytes32 _promiseId,\r\n uint256 _quantity\r\n ) private returns (uint256) {\r\n require(_promiseId != bytes32(0), \"UNSPECIFIED_PROMISE\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(promises[_promiseId].seller == _seller, \"UNAUTHORIZED_CO\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n require(_quantity > 0, \"INVALID_QUANTITY\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n uint256 tokenIdSupply = generateTokenType(true); //create & assign a new non-fungible type\r\n\r\n ordersPromise[tokenIdSupply] = _promiseId;\r\n\r\n IERC1155ERC721(tokensContract).mint(\r\n _seller,\r\n tokenIdSupply,\r\n _quantity,\r\n \"\"\r\n );\r\n\r\n return tokenIdSupply;\r\n }\r\n\r\n /**\r\n * @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\r\n * @param _tokenIdSupply ID of the supply token (ERC-1155)\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n * @param _paymentMethod method being used for that particular order that needs to be fulfilled\r\n * @param _correlationId ID of the current interaction with the smart contract for a specific user\r\n */\r\n function fillOrder(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder,\r\n uint8 _paymentMethod,\r\n uint256 _correlationId\r\n ) external override onlyFromRouter {\r\n uint8 paymentMethod = getVoucherPaymentMethod(_tokenIdSupply);\r\n\r\n //checks\r\n require(paymentMethod == _paymentMethod, \"Incorrect Payment Method\");\r\n checkOrderFillable(_tokenIdSupply, _issuer, _holder);\r\n\r\n //close order\r\n uint256 voucherTokenId = extract721(_issuer, _holder, _tokenIdSupply);\r\n\r\n emit LogVoucherDelivered(\r\n _tokenIdSupply,\r\n voucherTokenId,\r\n _issuer,\r\n _holder,\r\n getPromiseIdFromVoucherId(voucherTokenId),\r\n _correlationId\r\n );\r\n }\r\n\r\n /**\r\n * @notice Check order is fillable\r\n * @dev Will throw if checks don't pass\r\n * @param _tokenIdSupply ID of the supply token\r\n * @param _issuer Address of the token's issuer\r\n * @param _holder Address of the recipient of the voucher (ERC-721)\r\n */\r\n function checkOrderFillable(\r\n uint256 _tokenIdSupply,\r\n address _issuer,\r\n address _holder\r\n ) internal view {\r\n require(_tokenIdSupply != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n if (_holder.isContract()) {\r\n require(\r\n IERC165(_holder).supportsInterface(0x150b7a02),\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"31\"\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n require(_holder != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n require(\r\n IERC1155(tokensContract).balanceOf(_issuer, _tokenIdSupply) > 0,\r\n \"OFFER_EMPTY\"\r\n ); //hex\"40\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Unavailable)\r\n\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n\r\n require(\r\n promises[promiseKey].validTo >= block.timestamp,\r\n \"OFFER_EXPIRED\"\r\n );\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _to The address of the token holder\r\n * @param _tokenIdSupply ID of the token type\r\n * @return ID of the voucher token\r\n */\r\n function extract721(\r\n address _issuer,\r\n address _to,\r\n uint256 _tokenIdSupply\r\n ) internal returns (uint256) {\r\n if (_to.isContract()) {\r\n require(\r\n ERC721TokenReceiver(_to).onERC721Received(\r\n _issuer,\r\n msg.sender,\r\n _tokenIdSupply,\r\n \"\"\r\n ) == ERC721TokenReceiver(_to).onERC721Received.selector,\r\n \"UNSUPPORTED_ERC721_RECEIVED\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n //bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))\r\n }\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, 1); // This is hardcoded as 1 on purpose\r\n\r\n //calculate tokenId\r\n uint256 voucherTokenId =\r\n _tokenIdSupply | ++typeCounters[_tokenIdSupply];\r\n\r\n //set status\r\n vouchersStatus[voucherTokenId].status = determineStatus(\r\n vouchersStatus[voucherTokenId].status,\r\n IDX_COMMIT\r\n );\r\n vouchersStatus[voucherTokenId].isPaymentReleased = false;\r\n vouchersStatus[voucherTokenId].isDepositsReleased = false;\r\n\r\n //mint voucher NFT as ERC-721\r\n IERC1155ERC721(tokensContract).mint(_to, voucherTokenId);\r\n\r\n return voucherTokenId;\r\n }\r\n\r\n /**\r\n * @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\r\n * @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\r\n * @param _issuer The address of the token issuer\r\n * @param _tokenIdSupply ID of the token type\r\n * @param _qty qty that should be burned\r\n */\r\n function burnSupplyOnPause(\r\n address _issuer,\r\n uint256 _tokenIdSupply,\r\n uint256 _qty\r\n ) external override whenPaused onlyFromCashier {\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, _qty);\r\n }\r\n\r\n /**\r\n * @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\r\n * @param _isNonFungible Flag for generating NFT or FT\r\n * @return _tokenType Returns a newly generated token type\r\n */\r\n function generateTokenType(bool _isNonFungible)\r\n internal\r\n returns (uint256 _tokenType)\r\n {\r\n typeId++;\r\n\r\n if (_isNonFungible) {\r\n _tokenType = TYPE_NF_BIT | (typeId << 128); //upper bit is 1, followed by sequence, leaving lower 128-bits as 0\r\n } else {\r\n _tokenType = typeId << 128; //upper bit is not set, followed by sequence, leaving lower 128-bits as 0\r\n }\r\n\r\n return _tokenType;\r\n }\r\n\r\n /* solhint-disable */\r\n\r\n /**\r\n * @notice Redemption of the vouchers promise\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function redeem(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n //check status\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"ALREADY_PROCESSED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REDEEM\r\n );\r\n\r\n emit LogVoucherRedeemed(\r\n _tokenIdVoucher,\r\n _msgSender,\r\n tPromise.promiseId\r\n );\r\n }\r\n\r\n // // // // // // // //\r\n // UNHAPPY PATH\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Refunding a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function refund(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status),\r\n \"INAPPLICABLE_STATUS\"\r\n ); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n\r\n //check validity period\r\n isInValidityPeriod(_tokenIdVoucher);\r\n\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block.timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_REFUND\r\n );\r\n\r\n emit LogVoucherRefunded(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Issue a complain for a voucher\r\n * @param _tokenIdVoucher ID of the voucher\r\n * @param _msgSender account called the fn from the BR contract\r\n */\r\n function complain(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n onlyFromRouter\r\n onlyVoucherOwner(_tokenIdVoucher, _msgSender)\r\n {\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_COMPLAIN),\r\n \"ALREADY_COMPLAINED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(\r\n !isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_FINAL),\r\n \"ALREADY_FINALIZED\"\r\n ); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n //check if still in the complain period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n //if redeemed or refunded\r\n if (\r\n isStateRedemptionSigned(vouchersStatus[_tokenIdVoucher].status) ||\r\n isStateRefunded(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if expired\r\n } else if (isStateExpired(vouchersStatus[_tokenIdVoucher].status)) {\r\n if (\r\n !isStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_CANCEL_FAULT\r\n )\r\n ) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n } else {\r\n require(\r\n block.timestamp <= tPromise.validTo + complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart = block\r\n .timestamp;\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n\r\n //if cancelOrFault\r\n } else if (\r\n isStatus(vouchersStatus[_tokenIdVoucher].status, IDX_CANCEL_FAULT)\r\n ) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod,\r\n \"COMPLAINPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired));\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_COMPLAIN\r\n );\r\n\r\n emit LogVoucherComplain(_tokenIdVoucher);\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\r\n * @param _tokenIdVoucher ID of the voucher\r\n */\r\n function cancelOrFault(uint256 _tokenIdVoucher, address _msgSender)\r\n external\r\n override\r\n whenNotPaused\r\n {\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n require(\r\n getSupplyHolder(tokenIdSupply) == _msgSender,\r\n \"UNAUTHORIZED_COF\"\r\n ); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_CANCEL_FAULT), \"ALREADY_CANCELFAULT\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_REDEEM) || isStatus(tStatus, IDX_REFUND)) {\r\n //if redeemed or refunded\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //resetting the complain period\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStatus(tStatus, IDX_EXPIRE)) {\r\n //if expired\r\n if (!isStatus(tStatus, IDX_COMPLAIN)) {\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp;\r\n } else {\r\n require(\r\n block.timestamp <=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n }\r\n } else if (isStateCommitted(tStatus)) {\r\n //if committed only\r\n require(\r\n block.timestamp <=\r\n tPromise.validTo + complainPeriod + cancelFaultPeriod,\r\n \"COFPERIOD_EXPIRED\"\r\n ); //hex\"46\" FISSION.code(FISSION.Category.Availability, FISSION.Status.Expired)\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart = block\r\n .timestamp; //complain period starts\r\n } else {\r\n revert(\"INAPPLICABLE_STATUS\"); //hex\"18\" FISSION.code(FISSION.Category.Permission, FISSION.Status.NotApplicableToCurrentState)\r\n }\r\n\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_CANCEL_FAULT\r\n );\r\n\r\n emit LogVoucherFaultCancel(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\r\n * @param _tokenIdSupply ID of the voucher set\r\n * @param _issuer owner of the voucher\r\n */\r\n function cancelOrFaultVoucherSet(uint256 _tokenIdSupply, address _issuer)\r\n external\r\n override\r\n onlyFromRouter\r\n whenNotPaused\r\n returns (uint256)\r\n {\r\n require(getSupplyHolder(_tokenIdSupply) == _issuer, \"UNAUTHORIZED_COF\");\r\n\r\n uint256 remQty = getRemQtyForSupply(_tokenIdSupply, _issuer);\r\n\r\n require(remQty > 0, \"OFFER_EMPTY\");\r\n\r\n IERC1155ERC721(tokensContract).burn(_issuer, _tokenIdSupply, remQty);\r\n\r\n emit LogVoucherSetFaultCancel(_tokenIdSupply, _issuer);\r\n\r\n return remQty;\r\n }\r\n\r\n // // // // // // // //\r\n // BACK-END PROCESS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Mark voucher token that the payment was released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setPaymentReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 0);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token that the deposits were released\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function setDepositsReleased(uint256 _tokenIdVoucher)\r\n external\r\n override\r\n onlyFromCashier\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased = true;\r\n\r\n emit LogFundsReleased(_tokenIdVoucher, 1);\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token as expired\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerExpiration(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (\r\n tPromise.validTo < block.timestamp &&\r\n isStateCommitted(vouchersStatus[_tokenIdVoucher].status)\r\n ) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n vouchersStatus[_tokenIdVoucher].status,\r\n IDX_EXPIRE\r\n );\r\n\r\n emit LogExpirationTriggered(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /**\r\n * @notice Mark voucher token to the final status\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function triggerFinalizeVoucher(uint256 _tokenIdVoucher) external override {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint8 tStatus = vouchersStatus[_tokenIdVoucher].status;\r\n\r\n require(!isStatus(tStatus, IDX_FINAL), \"ALREADY_FINALIZED\"); //hex\"48\" FISSION.code(FISSION.Category.Availability, FISSION.Status.AlreadyDone)\r\n\r\n bool mark;\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n\r\n if (isStatus(tStatus, IDX_COMPLAIN)) {\r\n if (isStatus(tStatus, IDX_CANCEL_FAULT)) {\r\n //if COMPLAIN && COF: then final\r\n mark = true;\r\n } else if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart +\r\n cancelFaultPeriod\r\n ) {\r\n //if COMPLAIN: then final after cof period\r\n mark = true;\r\n }\r\n } else if (\r\n isStatus(tStatus, IDX_CANCEL_FAULT) &&\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart + complainPeriod\r\n ) {\r\n //if COF: then final after complain period\r\n mark = true;\r\n } else if (\r\n isStateRedemptionSigned(tStatus) || isStateRefunded(tStatus)\r\n ) {\r\n //if RDM/RFND NON_COMPLAIN: then final after complainPeriodStart + complainPeriod\r\n if (\r\n block.timestamp >=\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart +\r\n complainPeriod\r\n ) {\r\n mark = true;\r\n }\r\n } else if (isStateExpired(tStatus)) {\r\n //if EXP NON_COMPLAIN: then final after validTo + complainPeriod\r\n if (block.timestamp >= tPromise.validTo + complainPeriod) {\r\n mark = true;\r\n }\r\n }\r\n\r\n if (mark) {\r\n vouchersStatus[_tokenIdVoucher].status = determineStatus(\r\n tStatus,\r\n IDX_FINAL\r\n );\r\n emit LogFinalizeVoucher(_tokenIdVoucher, msg.sender);\r\n }\r\n }\r\n\r\n /* solhint-enable */\r\n\r\n // // // // // // // //\r\n // UTILS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Set the address of the new holder of a _tokenIdSupply on transfer\r\n * @param _tokenIdSupply _tokenIdSupply which will be transferred\r\n * @param _newSeller new holder of the supply\r\n */\r\n function setSupplyHolderOnTransfer(\r\n uint256 _tokenIdSupply,\r\n address _newSeller\r\n ) external override onlyFromCashier {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n promises[promiseKey].seller = _newSeller;\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Boson Router contract\r\n * @param _bosonRouterAddress The address of the BR contract\r\n */\r\n function setBosonRouterAddress(address _bosonRouterAddress)\r\n external\r\n onlyOwner\r\n {\r\n require(_bosonRouterAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n bosonRouterAddress = _bosonRouterAddress;\r\n\r\n emit LogBosonRouterSet(_bosonRouterAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the address of the Cashier contract\r\n * @param _cashierAddress The address of the BR contract\r\n */\r\n function setCashierAddress(address _cashierAddress)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n require(_cashierAddress != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n cashierAddress = _cashierAddress;\r\n\r\n emit LogCashierSet(_cashierAddress, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _complainPeriod the new value for complain period (in number of seconds)\r\n */\r\n function setComplainPeriod(uint256 _complainPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n complainPeriod = _complainPeriod;\r\n\r\n emit LogComplainPeriodChanged(_complainPeriod, msg.sender);\r\n }\r\n\r\n /**\r\n * @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\r\n * @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)\r\n */\r\n function setCancelFaultPeriod(uint256 _cancelFaultPeriod)\r\n external\r\n override\r\n onlyOwner\r\n {\r\n cancelFaultPeriod = _cancelFaultPeriod;\r\n\r\n emit LogCancelFaultPeriodChanged(_cancelFaultPeriod, msg.sender);\r\n }\r\n\r\n // // // // // // // //\r\n // GETTERS\r\n // // // // // // // //\r\n\r\n /**\r\n * @notice Get the promise ID at specific index\r\n * @param _idx Index in the array of promise keys\r\n * @return Promise ID\r\n */\r\n function getPromiseKey(uint256 _idx)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n return promiseKeys[_idx];\r\n }\r\n\r\n /**\r\n * @notice Get the supply token ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the supply token\r\n */\r\n function getIdSupplyFromVoucher(uint256 _tokenIdVoucher)\r\n public\r\n pure\r\n override\r\n returns (uint256)\r\n {\r\n return _tokenIdVoucher & MASK_TYPE;\r\n }\r\n\r\n /**\r\n * @notice Get the promise ID from a voucher token\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromVoucherId(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bytes32)\r\n {\r\n require(_tokenIdVoucher != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\r\n\r\n uint256 tokenIdSupply = getIdSupplyFromVoucher(_tokenIdVoucher);\r\n return promises[ordersPromise[tokenIdSupply]].promiseId;\r\n }\r\n\r\n /**\r\n * @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\r\n * @param _tokenSupplyId Token supply ID\r\n * @param _owner holder of the Token Supply\r\n * @return remaining quantity\r\n */\r\n function getRemQtyForSupply(uint256 _tokenSupplyId, address _owner)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return IERC1155(tokensContract).balanceOf(_owner, _tokenSupplyId);\r\n }\r\n\r\n /**\r\n * @notice Get all necessary funds for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)\r\n */\r\n function getOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (\r\n uint256,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (\r\n promises[promiseKey].price,\r\n promises[promiseKey].depositSe,\r\n promises[promiseKey].depositBu\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get Buyer costs required to make an order for a supply token\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns a tuple (Payment amount, Buyer's deposit)\r\n */\r\n function getBuyerOrderCosts(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256, uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return (promises[promiseKey].price, promises[promiseKey].depositBu);\r\n }\r\n\r\n /**\r\n * @notice Get Seller deposit\r\n * @param _tokenIdSupply ID of the supply token\r\n * @return returns sellers deposit\r\n */\r\n function getSellerDeposit(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].depositSe;\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a supply\r\n * @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\r\n * @return Address of the holder\r\n */\r\n function getSupplyHolder(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n bytes32 promiseKey = ordersPromise[_tokenIdSupply];\r\n return promises[promiseKey].seller;\r\n }\r\n\r\n /**\r\n * @notice Get promise data not retrieved by other accessor functions\r\n * @param _promiseKey ID of the promise\r\n * @return promise data not returned by other accessor methods\r\n */\r\n function getPromiseData(bytes32 _promiseKey)\r\n external\r\n view\r\n override\r\n returns (bytes32, uint256, uint256, uint256, uint256 )\r\n {\r\n Promise memory tPromise = promises[_promiseKey];\r\n return (tPromise.promiseId, tPromise.nonce, tPromise.validFrom, tPromise.validTo, tPromise.idx); \r\n }\r\n\r\n /**\r\n * @notice Get the current status of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Status of the voucher (via enum)\r\n */\r\n function getVoucherStatus(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (\r\n uint8,\r\n bool,\r\n bool,\r\n uint256,\r\n uint256\r\n )\r\n {\r\n return (\r\n vouchersStatus[_tokenIdVoucher].status,\r\n vouchersStatus[_tokenIdVoucher].isPaymentReleased,\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased,\r\n vouchersStatus[_tokenIdVoucher].complainPeriodStart,\r\n vouchersStatus[_tokenIdVoucher].cancelFaultPeriodStart\r\n );\r\n }\r\n\r\n /**\r\n * @notice Get the holder of a voucher\r\n * @param _tokenIdVoucher ID of the voucher token\r\n * @return Address of the holder\r\n */\r\n function getVoucherHolder(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return IERC721(tokensContract).ownerOf(_tokenIdVoucher);\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the price for the supply is held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherPriceToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenPrice;\r\n }\r\n\r\n /**\r\n * @notice Get the address of the token where the deposits for the supply are held\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return Address of the token\r\n */\r\n function getVoucherDepositToken(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (address)\r\n {\r\n return paymentDetails[_tokenIdSupply].addressTokenDeposits;\r\n }\r\n\r\n /**\r\n * @notice Get the payment method for a particular _tokenIdSupply\r\n * @param _tokenIdSupply ID of the voucher supply token\r\n * @return payment method\r\n */\r\n function getVoucherPaymentMethod(uint256 _tokenIdSupply)\r\n public\r\n view\r\n override\r\n returns (uint8)\r\n {\r\n return paymentDetails[_tokenIdSupply].paymentMethod;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isInValidityPeriod(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n //check validity period\r\n Promise memory tPromise =\r\n promises[getPromiseIdFromVoucherId(_tokenIdVoucher)];\r\n require(tPromise.validFrom <= block.timestamp, \"INVALID_VALIDITY_FROM\"); //hex\"26\" FISSION.code(FISSION.Category.Find, FISSION.Status.Above_Range_Overflow)\r\n require(tPromise.validTo >= block.timestamp, \"INVALID_VALIDITY_TO\"); //hex\"24\" FISSION.code(FISSION.Category.Find, FISSION.Status.BelowRange_Underflow)\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\r\n * @param _tokenIdVoucher ID of the voucher token\r\n */\r\n function isVoucherTransferable(uint256 _tokenIdVoucher)\r\n public\r\n view\r\n override\r\n returns (bool)\r\n {\r\n return\r\n !(vouchersStatus[_tokenIdVoucher].isPaymentReleased ||\r\n vouchersStatus[_tokenIdVoucher].isDepositsReleased);\r\n }\r\n\r\n /**\r\n * @notice Get address of the Boson Router to which this contract points\r\n * @return Address of the Boson Router contract\r\n */\r\n function getBosonRouterAddress()\r\n external\r\n view\r\n override\r\n returns (address) \r\n {\r\n return bosonRouterAddress;\r\n }\r\n\r\n /**\r\n * @notice Get address of the Cashier contract to which this contract points\r\n * @return Address of the Cashier contract\r\n */\r\n function getCashierAddress()\r\n external\r\n view\r\n override\r\n returns (address)\r\n {\r\n return cashierAddress;\r\n }\r\n\r\n /**\r\n * @notice Get the token nonce for a seller\r\n * @param _seller Address of the seller\r\n * @return The seller's nonce\r\n */\r\n function getTokenNonce(address _seller)\r\n external\r\n view\r\n override\r\n returns (uint256) \r\n {\r\n return tokenNonces[_seller];\r\n }\r\n\r\n /**\r\n * @notice Get the current type Id\r\n * @return type Id\r\n */\r\n function getTypeId()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return typeId;\r\n }\r\n\r\n /**\r\n * @notice Get the complain period\r\n * @return complain period\r\n */\r\n function getComplainPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return complainPeriod;\r\n }\r\n\r\n /**\r\n * @notice Get the cancel or fault period\r\n * @return cancel or fault period\r\n */\r\n function getCancelFaultPeriod()\r\n external\r\n view\r\n override\r\n returns (uint256)\r\n {\r\n return cancelFaultPeriod;\r\n }\r\n \r\n /**\r\n * @notice Get the promise ID from a voucher set\r\n * @param _tokenIdSupply ID of the voucher token\r\n * @return ID of the promise\r\n */\r\n function getPromiseIdFromSupplyId(uint256 _tokenIdSupply)\r\n external\r\n view\r\n override\r\n returns (bytes32) \r\n {\r\n return ordersPromise[_tokenIdSupply];\r\n }\r\n\r\n /**\r\n * @notice Get the address of ERC1155ERC721 contract\r\n * @return Address of ERC1155ERC721 contract\r\n */\r\n function getTokensContractAddress() \r\n external \r\n view \r\n override\r\n returns (address)\r\n {\r\n return tokensContract;\r\n }\r\n}\r\n", + "sourcePath": "E:/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "ast": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 6234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { + "hexValue": "30", + "id": 6233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3057:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6231, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3048:7:6", + "typeDescriptions": {} + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3048:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } + }, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6263, + "indexed": true, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5003:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6265, + "indexed": false, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5037:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6267, + "indexed": false, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5066:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5066:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6269, + "indexed": false, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5093:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5093:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4922:190:6" + }, + "src": "4899:214:6" + }, + { + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6287, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5386:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5375:96:6" + }, + "src": "5351:121:6" + }, + { + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5685:47:6" + }, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6313, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6315, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6001:75:6" + }, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6337, + "indexed": false, + "mutability": "mutable", + "name": "_newCancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6129:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6129:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6339, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6260:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6235:41:6" + }, + "src": "6205:72:6" + }, + { + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", + "parameters": { + "id": 6352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6318:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6318:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6351, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6352:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6350, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6352:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6307:93:6" + }, + "src": "6285:116:6" + }, + { + "body": { + "id": 6374, + "nodeType": "Block", + "src": "6435:335:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 6365, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:60:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6372, + "nodeType": "ExpressionStatement", + "src": "6606:60:6" + }, + { + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6824:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6824:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6386, + "nodeType": "ExpressionStatement", + "src": "6816:55:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6980:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6980:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7010:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + }, + "value": "UNAUTHORIZED_C" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + } + ], + "id": 6387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6972:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" + }, + { + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" + } + ] + }, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, + "nodeType": "ParameterList", + "parameters": [], + "src": "6802:2:6" + }, + "src": "6778:353:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6416, + "nodeType": "Block", + "src": "7207:269:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "7271:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7271:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7345:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + }, + "value": "UNAUTHORIZED_V" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + } + ], + "id": 6403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7249:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7249:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6414, + "nodeType": "ExpressionStatement", + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ + { + "expression": { + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6419, + "src": "7549:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7532:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6425, + "nodeType": "ExpressionStatement", + "src": "7532:32:6" + }, + { + "expression": { + "id": 6430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7577:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6431, + "nodeType": "ExpressionStatement", + "src": "7577:27:6" + }, + { + "expression": { + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7615:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8937:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 6484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8905:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8905:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6490, + "nodeType": "ExpressionStatement", + "src": "8905:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9118:39:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 6491, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9110:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6500, + "nodeType": "ExpressionStatement", + "src": "9110:71:6" + }, + { + "assignments": [ + 6502 + ], + "declarations": [ + { + "constant": false, + "id": 6502, + "mutability": "mutable", + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 6582, + "src": "9372:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9394:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "9400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9400:106:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9394:112:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + } + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10020:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6540, + "name": "Promise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6189, + "src": "9723:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" + } + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], + "nodeType": "FunctionCall", + "src": "9723:327:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "src": "9707:343:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6556, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10063:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" + } + }, + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" + } + }, + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31370:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32175:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32160:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ + { + "expression": { + "id": 7696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7685, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32226:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7687, + "indexExpression": { + "id": 7686, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32241:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32226:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32226:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7690, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32301:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7692, + "indexExpression": { + "id": 7691, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32316:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32301:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32301:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7694, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "32358:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7689, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "32267:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32267:116:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "32226:157:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7697, + "nodeType": "ExpressionStatement", + "src": "32226:157:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7699, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32428:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7698, + "name": "LogExpirationTriggered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6311, + "src": "32405:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32405:51:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7703, + "nodeType": "EmitStatement", + "src": "32400:56:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7652, + "nodeType": "StructuredDocumentation", + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "d40ffcf8", + "id": 7707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerExpiration", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, + "parameters": { + "id": 7655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7654, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7707, + "src": "31766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31765:25:6" + }, + "returnParameters": { + "id": 7657, + "nodeType": "ParameterList", + "parameters": [], + "src": "31809:0:6" + }, + "scope": 8454, + "src": "31739:736:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9412 + ], + "body": { + "id": 7860, + "nodeType": "Block", + "src": "32688:2186:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32726:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32707:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32729:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32699:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7720, + "nodeType": "ExpressionStatement", + "src": "32699:47:6" + }, + { + "assignments": [ + 7722 + ], + "declarations": [ + { + "constant": false, + "id": 7722, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "32849:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7721, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32849:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7727, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7723, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32865:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7725, + "indexExpression": { + "id": 7724, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32880:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32865:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32865:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32849:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "32924:29:6", + "subExpression": { + "arguments": [ + { + "id": 7730, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "32934:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7731, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "32943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7729, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "32925:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32925:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32955:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32916:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32916:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7736, + "nodeType": "ExpressionStatement", + "src": "32916:59:6" + }, + { + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" + }, + { + "assignments": [ + 7741 + ], + "declarations": [ + { + "constant": false, + "id": 7741, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33090:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7740, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "33090:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7747, + "initialValue": { + "baseExpression": { + "id": 7742, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "33129:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7746, + "indexExpression": { + "arguments": [ + { + "id": 7744, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33164:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7743, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "33138:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33138:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33129:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33090:91:6" + }, + { + "condition": { + "arguments": [ + { + "id": 7749, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33207:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7779, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7778, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33699:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33699:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7825, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7741, + "src": "34534:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "34534:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34534:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34515:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34595:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34352:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34345:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } + } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" + } + ] + } + }, + "id": 7840, + "nodeType": "IfStatement", + "src": "33194:1432:6", + "trueBody": { + "id": 7777, + "nodeType": "Block", + "src": "33231:444:6", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 7753, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33259:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ + { + "expression": { + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33363:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33356:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7759, + "nodeType": "ExpressionStatement", + "src": "33356:11:6" + } + ] + } + } + ] + } + }, + { + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7708, + "nodeType": "StructuredDocumentation", + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "65c303bc", + "id": 7861, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerFinalizeVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, + "parameters": { + "id": 7711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7710, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35255:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35244:69:6" + }, + "returnParameters": { + "id": 7871, + "nodeType": "ParameterList", + "parameters": [], + "src": "35348:0:6" + }, + "scope": 8454, + "src": "35210:258:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 7914, + "nodeType": "Block", + "src": "35725:295:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7895, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35744:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "35744:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35779:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35736:65:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7903, + "nodeType": "ExpressionStatement", + "src": "35736:65:6" + }, + { + "expression": { + "id": 7906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35904:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7907, + "nodeType": "ExpressionStatement", + "src": "35904:40:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7909, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35980:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7908, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "35962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35962:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7913, + "nodeType": "EmitStatement", + "src": "35957:55:6" + } + ] + }, + "documentation": { + "id": 7887, + "nodeType": "StructuredDocumentation", + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" + }, + "functionSelector": "bd17de40", + "id": 7915, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7892, + "modifierName": { + "id": 7891, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "35710:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35710:9:6" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7889, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 7915, + "src": "35654:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35654:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35653:29:6" + }, + "returnParameters": { + "id": 7893, + "nodeType": "ParameterList", + "parameters": [], + "src": "35725:0:6" + }, + "scope": 8454, + "src": "35623:397:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9432 + ], + "body": { + "id": 7944, + "nodeType": "Block", + "src": "36278:275:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" + } + ] + }, + "documentation": { + "id": 7946, + "nodeType": "StructuredDocumentation", + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + }, + "functionSelector": "8990834b", + "id": 7965, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, + "parameters": { + "id": 7949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7948, + "mutability": "mutable", + "name": "_complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 7965, + "src": "36842:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "36841:25:6" + }, + "returnParameters": { + "id": 7953, + "nodeType": "ParameterList", + "parameters": [], + "src": "36927:0:6" + }, + "scope": 8454, + "src": "36815:234:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9426 + ], + "body": { + "id": 7984, + "nodeType": "Block", + "src": "37442:134:6", + "statements": [ + { + "expression": { + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7980, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37557:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7978, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37954:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38737:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38718:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 8026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38740:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 8022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "38710:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38710:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8028, + "nodeType": "ExpressionStatement", + "src": "38710:47:6" + }, + { + "assignments": [ + 8030 + ], + "declarations": [ + { + "constant": false, + "id": 8030, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "38860:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38860:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8034, + "initialValue": { + "arguments": [ + { + "id": 8032, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38907:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8031, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "38884:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38884:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40136:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" + } + ] + }, + "documentation": { + "id": 8064, + "nodeType": "StructuredDocumentation", + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + }, + "functionSelector": "d887b4e7", + "id": 8097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, + "parameters": { + "id": 8067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8066, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39775:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39775:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39774:24:6" + }, + "returnParameters": { + "id": 8075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" + }, + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9472 + ], + "body": { + "id": 8124, + "nodeType": "Block", + "src": "40558:147:6", + "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ + { + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41040:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8128, + "src": "41054:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" + } + ] + }, + "documentation": { + "id": 8126, + "nodeType": "StructuredDocumentation", + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" + }, + "functionSelector": "88106323", + "id": 8146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSellerDeposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, + "parameters": { + "id": 8129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8128, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40904:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40904:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40903:24:6" + }, + "returnParameters": { + "id": 8133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" + }, + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9550 + ], + "body": { + "id": 8166, + "nodeType": "Block", + "src": "41487:114:6", + "statements": [ + { + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" + } + ] + }, + "documentation": { + "id": 8147, + "nodeType": "StructuredDocumentation", + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" + }, + "functionSelector": "1f38585f", + "id": 8167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupplyHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, + "parameters": { + "id": 8150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8149, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41383:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41382:24:6" + }, + "returnParameters": { + "id": 8154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" + }, + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9628 + ], + "body": { + "id": 8202, + "nodeType": "Block", + "src": "41981:173:6", + "statements": [ + { + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "42018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8200, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" + } + ] + }, + "documentation": { + "id": 8168, + "nodeType": "StructuredDocumentation", + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" + }, + "functionSelector": "a1e5e3f9", + "id": 8203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseData", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, + "parameters": { + "id": 8171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8170, + "mutability": "mutable", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41929:46:6" + }, + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" + }, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8263, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43588:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43588:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8267, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43678:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43678:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8278, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44119:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44119:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "44118:9:6" + }, + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, + "parameters": { + "id": 8294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8293, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44451:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8297, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44541:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8296, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "44541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "44540:7:6" + }, + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ + { + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" + } + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, + "parameters": { + "id": 8309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8308, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44841:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44840:25:6" + }, + "returnParameters": { + "id": 8313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44932:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8311, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44932:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "44931:6:6" + }, + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ + { + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "45704:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "45703:25:6" + }, + "returnParameters": { + "id": 8351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45795:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8370, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8375, + "src": "46226:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8385, + "src": "46538:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8388, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46770:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46770:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46769:17:6" + }, + "returnParameters": { + "id": 8393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8392, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46855:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "46855:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8409, + "src": "47095:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47095:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8419, + "src": "47336:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47336:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" + } + ] + }, + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, + "parameters": { + "id": 8433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47885:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" + }, + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "legacyAST": { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/VoucherKernel.sol", + "exportedSymbols": { + "VoucherKernel": [ + 8454 + ] + }, + "id": 8455, + "license": "LGPL-3.0-or-later", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6142, + "literals": [ + "solidity", + "0.7", + ".1" + ], + "nodeType": "PragmaDirective", + "src": "49:22:6" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "@openzeppelin/contracts/utils/Address.sol", + "id": 6143, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13087, + "src": "75:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 6144, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12145, + "src": "128:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Pausable.sol", + "file": "@openzeppelin/contracts/utils/Pausable.sol", + "id": 6145, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 13694, + "src": "182:52:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 6146, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 12500, + "src": "236:51:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155.sol", + "file": "./interfaces/IERC1155.sol", + "id": 6147, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8895, + "src": "289:35:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC165.sol", + "file": "./interfaces/IERC165.sol", + "id": 6148, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9007, + "src": "326:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721.sol", + "file": "./interfaces/IERC721.sol", + "id": 6149, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9232, + "src": "362:34:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC1155ERC721.sol", + "file": "./interfaces/IERC1155ERC721.sol", + "id": 6150, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 8957, + "src": "398:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IERC721TokenReceiver.sol", + "file": "./interfaces/IERC721TokenReceiver.sol", + "id": 6151, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9250, + "src": "441:47:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/interfaces/IVoucherKernel.sol", + "file": "./interfaces/IVoucherKernel.sol", + "id": 6152, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 9644, + "src": "490:41:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/E/Ludo/Documents/Developpement/BOSON/contracts/contracts/UsingHelpers.sol", + "file": "./UsingHelpers.sol", + "id": 6153, + "nodeType": "ImportDirective", + "scope": 8455, + "sourceUnit": 6141, + "src": "533:28:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6155, + "name": "IVoucherKernel", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 9643, + "src": "1195:14:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IVoucherKernel_$9643", + "typeString": "contract IVoucherKernel" + } + }, + "id": 6156, + "nodeType": "InheritanceSpecifier", + "src": "1195:14:6" + }, + { + "baseName": { + "id": 6157, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12144, + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$12144", + "typeString": "contract Ownable" + } + }, + "id": 6158, + "nodeType": "InheritanceSpecifier", + "src": "1211:7:6" + }, + { + "baseName": { + "id": 6159, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13693, + "src": "1220:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$13693", + "typeString": "contract Pausable" + } + }, + "id": 6160, + "nodeType": "InheritanceSpecifier", + "src": "1220:8:6" + }, + { + "baseName": { + "id": 6161, + "name": "UsingHelpers", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6140, + "src": "1230:12:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UsingHelpers_$6140", + "typeString": "contract UsingHelpers" + } + }, + "id": 6162, + "nodeType": "InheritanceSpecifier", + "src": "1230:12:6" + } + ], + "contractDependencies": [ + 6140, + 9643, + 12144, + 13109, + 13693 + ], + "contractKind": "contract", + "documentation": { + "id": 6154, + "nodeType": "StructuredDocumentation", + "src": "612:525:6", + "text": " @title VoucherKernel contract is controlling the core business logic\n @dev Notes:\n - Since this is a reference app, it is not yet optimized.\n In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain.\n - The usage of block.timestamp is honored since vouchers are defined currently with day-precision.\n See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931" + }, + "fullyImplemented": true, + "id": 8454, + "linearizedBaseContracts": [ + 8454, + 6140, + 13693, + 12144, + 13109, + 9643 + ], + "name": "VoucherKernel", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6165, + "libraryName": { + "id": 6163, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 13086, + "src": "1256:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$13086", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1250:26:6", + "typeName": { + "id": 6164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1268:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "id": 6168, + "libraryName": { + "id": 6166, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 12499, + "src": "1288:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$12499", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1282:27:6", + "typeName": { + "id": 6167, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1301:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 6170, + "mutability": "mutable", + "name": "tokensContract", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "1353:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1353:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "canonicalName": "VoucherKernel.Promise", + "id": 6189, + "members": [ + { + "constant": false, + "id": 6172, + "mutability": "mutable", + "name": "promiseId", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1497:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6171, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1497:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1525:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1525:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6176, + "mutability": "mutable", + "name": "seller", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1577:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6175, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1577:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6178, + "mutability": "mutable", + "name": "validFrom", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1758:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1758:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "validTo", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1786:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "price", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1812:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6184, + "mutability": "mutable", + "name": "depositSe", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1836:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1836:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6186, + "mutability": "mutable", + "name": "depositBu", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1864:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1864:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6188, + "mutability": "mutable", + "name": "idx", + "nodeType": "VariableDeclaration", + "scope": 6189, + "src": "1892:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "Promise", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1471:440:6", + "visibility": "public" + }, + { + "canonicalName": "VoucherKernel.VoucherPaymentMethod", + "id": 6196, + "members": [ + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1958:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6190, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1958:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "addressTokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "1988:25:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6192, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1988:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6195, + "mutability": "mutable", + "name": "addressTokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6196, + "src": "2024:28:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6194, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2024:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "VoucherPaymentMethod", + "nodeType": "StructDefinition", + "scope": 8454, + "src": "1919:141:6", + "visibility": "public" + }, + { + "constant": false, + "id": 6198, + "mutability": "mutable", + "name": "bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2068:34:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2068:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6200, + "mutability": "mutable", + "name": "cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2148:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2148:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6204, + "mutability": "mutable", + "name": "promises", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2221:44:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "typeName": { + "id": 6203, + "keyType": { + "id": 6201, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2221:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise)" + }, + "valueType": { + "id": 6202, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "2240:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6208, + "mutability": "mutable", + "name": "tokenNonces", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2312:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6207, + "keyType": { + "id": 6205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2320:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2312:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "paymentDetails", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2505:63:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "typeName": { + "id": 6211, + "keyType": { + "id": 6209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2513:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2505:40:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod)" + }, + "valueType": { + "id": 6210, + "name": "VoucherPaymentMethod", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6196, + "src": "2524:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "promiseKeys", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2618:29:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2618:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2618:9:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "ordersPromise", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2656:49:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "typeName": { + "id": 6218, + "keyType": { + "id": 6216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2664:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2656:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + }, + "valueType": { + "id": 6217, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "vouchersStatus", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2788:56:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "typeName": { + "id": 6222, + "keyType": { + "id": 6220, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2788:33:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus)" + }, + "valueType": { + "id": 6221, + "name": "VoucherStatus", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6028, + "src": "2807:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage_ptr", + "typeString": "struct UsingHelpers.VoucherStatus" + } + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6227, + "mutability": "mutable", + "name": "typeCounters", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "2903:48:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 6226, + "keyType": { + "id": 6224, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2911:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "2903:27:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 6225, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6239, + "mutability": "constant", + "name": "MASK_TYPE", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3003:64:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6228, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3003:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 6234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3056:2:6", + "subExpression": { + "hexValue": "30", + "id": 6233, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3057:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3048:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6231, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3048:7:6", + "typeDescriptions": {} + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3048:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 6230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3040:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 6229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3040:7:6", + "typeDescriptions": {} + } + }, + "id": 6236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6237, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3064:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "3040:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6246, + "mutability": "constant", + "name": "MASK_NF_INDEX", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3378:52:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3378:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "arguments": [ + { + "id": 6244, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "~", + "prefix": true, + "src": "3427:2:6", + "subExpression": { + "hexValue": "30", + "id": 6243, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "typeDescriptions": { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_minus_1_by_1", + "typeString": "int_const -1" + } + ], + "id": 6242, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3419:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6241, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "3419:7:6", + "typeDescriptions": {} + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:11:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "private" + }, + { + "constant": true, + "id": 6251, + "mutability": "constant", + "name": "TYPE_NF_BIT", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "3750:47:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6247, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3750:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + }, + "id": 6250, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31", + "id": 6248, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3789:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "323535", + "id": 6249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3794:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_255_by_1", + "typeString": "int_const 255" + }, + "value": "255" + }, + "src": "3789:8:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", + "typeString": "int_const 5789...(69 digits omitted)...9968" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6253, + "mutability": "mutable", + "name": "typeId", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4109:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6252, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6255, + "mutability": "mutable", + "name": "complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4820:30:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6254, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 8454, + "src": "4857:33:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6256, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4857:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "private" + }, + { + "anonymous": false, + "id": 6271, + "name": "LogPromiseCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 6270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6259, + "indexed": true, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4933:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6258, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6261, + "indexed": true, + "mutability": "mutable", + "name": "_nonce", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "4970:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6260, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6263, + "indexed": true, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5003:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5003:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6265, + "indexed": false, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5037:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6267, + "indexed": false, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5066:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5066:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6269, + "indexed": false, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 6271, + "src": "5093:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6268, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5093:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4922:190:6" + }, + "src": "4899:214:6" + }, + { + "anonymous": false, + "id": 6285, + "name": "LogVoucherDelivered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "indexed": true, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5157:30:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5157:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6275, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5198:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6274, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5198:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6277, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5232:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6276, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5232:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6279, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5258:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5258:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6281, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5284:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6280, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5284:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6283, + "indexed": false, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6285, + "src": "5313:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5313:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5146:196:6" + }, + "src": "5121:222:6" + }, + { + "anonymous": false, + "id": 6293, + "name": "LogVoucherRedeemed", + "nodeType": "EventDefinition", + "parameters": { + "id": 6292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6287, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5386:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6289, + "indexed": false, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5420:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5420:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6291, + "indexed": false, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6293, + "src": "5446:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6290, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "5375:96:6" + }, + "src": "5351:121:6" + }, + { + "anonymous": false, + "id": 6297, + "name": "LogVoucherRefunded", + "nodeType": "EventDefinition", + "parameters": { + "id": 6296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6295, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6297, + "src": "5505:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5505:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5504:25:6" + }, + "src": "5480:50:6" + }, + { + "anonymous": false, + "id": 6301, + "name": "LogVoucherComplain", + "nodeType": "EventDefinition", + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6299, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6301, + "src": "5563:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6298, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5563:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5562:25:6" + }, + "src": "5538:50:6" + }, + { + "anonymous": false, + "id": 6305, + "name": "LogVoucherFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6305, + "src": "5624:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6302, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5624:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5623:25:6" + }, + "src": "5596:53:6" + }, + { + "anonymous": false, + "id": 6311, + "name": "LogExpirationTriggered", + "nodeType": "EventDefinition", + "parameters": { + "id": 6310, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6307, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5686:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6306, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5686:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6309, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6311, + "src": "5711:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5711:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5685:47:6" + }, + "src": "5657:76:6" + }, + { + "anonymous": false, + "id": 6317, + "name": "LogFinalizeVoucher", + "nodeType": "EventDefinition", + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6313, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6315, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6317, + "src": "5791:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6314, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5791:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5765:47:6" + }, + "src": "5741:72:6" + }, + { + "anonymous": false, + "id": 6323, + "name": "LogBosonRouterSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6322, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6319, + "indexed": false, + "mutability": "mutable", + "name": "_newBosonRouter", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5845:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5845:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6321, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6323, + "src": "5870:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5870:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5844:47:6" + }, + "src": "5821:71:6" + }, + { + "anonymous": false, + "id": 6329, + "name": "LogCashierSet", + "nodeType": "EventDefinition", + "parameters": { + "id": 6328, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6325, + "indexed": false, + "mutability": "mutable", + "name": "_newCashier", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5920:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5920:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6327, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6329, + "src": "5941:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5941:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5919:43:6" + }, + "src": "5900:63:6" + }, + { + "anonymous": false, + "id": 6335, + "name": "LogComplainPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6331, + "indexed": false, + "mutability": "mutable", + "name": "_newComplainPeriod", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6012:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6012:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6333, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6335, + "src": "6049:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6332, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6049:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6001:75:6" + }, + "src": "5971:106:6" + }, + { + "anonymous": false, + "id": 6341, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "EventDefinition", + "parameters": { + "id": 6340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6337, + "indexed": false, + "mutability": "mutable", + "name": "_newCancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6129:29:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6336, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6129:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6339, + "indexed": false, + "mutability": "mutable", + "name": "_triggeredBy", + "nodeType": "VariableDeclaration", + "scope": 6341, + "src": "6169:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6169:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6118:78:6" + }, + "src": "6085:112:6" + }, + { + "anonymous": false, + "id": 6347, + "name": "LogVoucherSetFaultCancel", + "nodeType": "EventDefinition", + "parameters": { + "id": 6346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6343, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6236:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6236:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6345, + "indexed": false, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6347, + "src": "6260:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6260:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6235:41:6" + }, + "src": "6205:72:6" + }, + { + "anonymous": false, + "id": 6353, + "name": "LogFundsReleased", + "nodeType": "EventDefinition", + "parameters": { + "id": 6352, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6349, + "indexed": false, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6318:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6348, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6318:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6351, + "indexed": false, + "mutability": "mutable", + "name": "_type", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "6352:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6350, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6352:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6307:93:6" + }, + "src": "6285:116:6" + }, + { + "body": { + "id": 6374, + "nodeType": "Block", + "src": "6435:335:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6356, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6454:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6484:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6476:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6476:7:6", + "typeDescriptions": {} + } + }, + "id": 6360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6476:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6454:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6488:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6355, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6446:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6364, + "nodeType": "ExpressionStatement", + "src": "6446:59:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6366, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6614:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6614:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6368, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "6628:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:32:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f4252", + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6648:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + }, + "value": "UNAUTHORIZED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d74964594bc025886ff5bcef2e33845052a9330085a182179ea7b04b36730cd6", + "typeString": "literal_string \"UNAUTHORIZED_BR\"" + } + ], + "id": 6365, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6606:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6606:60:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6372, + "nodeType": "ExpressionStatement", + "src": "6606:60:6" + }, + { + "id": 6373, + "nodeType": "PlaceholderStatement", + "src": "6761:1:6" + } + ] + }, + "id": 6375, + "name": "onlyFromRouter", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6354, + "nodeType": "ParameterList", + "parameters": [], + "src": "6432:2:6" + }, + "src": "6409:361:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6396, + "nodeType": "Block", + "src": "6805:326:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6378, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6824:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6381, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6380, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6842:7:6", + "typeDescriptions": {} + } + }, + "id": 6382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6842:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6824:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4252", + "id": 6384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6854:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + }, + "value": "UNSPECIFIED_BR" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_18baaaaee96e1a52a1a9672a774ac9edad16efea4f02bd536aa73e966587bacf", + "typeString": "literal_string \"UNSPECIFIED_BR\"" + } + ], + "id": 6377, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6816:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6816:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6386, + "nodeType": "ExpressionStatement", + "src": "6816:55:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6980:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "6980:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6390, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "6994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6980:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f43", + "id": 6392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7010:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + }, + "value": "UNAUTHORIZED_C" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4285f49d3474576aa1214b2208fc063cca9fb8066c1dc66e1b2fc597a667635e", + "typeString": "literal_string \"UNAUTHORIZED_C\"" + } + ], + "id": 6387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6972:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6972:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6394, + "nodeType": "ExpressionStatement", + "src": "6972:55:6" + }, + { + "id": 6395, + "nodeType": "PlaceholderStatement", + "src": "7122:1:6" + } + ] + }, + "id": 6397, + "name": "onlyFromCashier", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6376, + "nodeType": "ParameterList", + "parameters": [], + "src": "6802:2:6" + }, + "src": "6778:353:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6416, + "nodeType": "Block", + "src": "7207:269:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6408, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6399, + "src": "7303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6405, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6404, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "7271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 6406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 6407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "7271:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 6409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7271:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6410, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6401, + "src": "7323:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7271:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f56", + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7345:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + }, + "value": "UNAUTHORIZED_V" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9ccf69668761bd89899c0c9012c57fbf9aa514461640630aa772878c5e0bf2e6", + "typeString": "literal_string \"UNAUTHORIZED_V\"" + } + ], + "id": 6403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7249:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7249:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6414, + "nodeType": "ExpressionStatement", + "src": "7249:123:6" + }, + { + "id": 6415, + "nodeType": "PlaceholderStatement", + "src": "7467:1:6" + } + ] + }, + "id": 6417, + "name": "onlyVoucherOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7165:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6398, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7165:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6401, + "mutability": "mutable", + "name": "_sender", + "nodeType": "VariableDeclaration", + "scope": 6417, + "src": "7190:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6400, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7190:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7164:42:6" + }, + "src": "7139:337:6", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6438, + "nodeType": "Block", + "src": "7521:132:6", + "statements": [ + { + "expression": { + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6422, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "7532:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6423, + "name": "_tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6419, + "src": "7549:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7532:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6425, + "nodeType": "ExpressionStatement", + "src": "7532:32:6" + }, + { + "expression": { + "id": 6430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6426, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "7577:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7594:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7598:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7594:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7577:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6431, + "nodeType": "ExpressionStatement", + "src": "7577:27:6" + }, + { + "expression": { + "id": 6436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6432, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "7615:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "id": 6435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "hexValue": "37", + "id": 6433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7635:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_7_by_1", + "typeString": "int_const 7" + }, + "value": "7" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "hexValue": "31", + "id": 6434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7639:6:6", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "src": "7635:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + } + }, + "src": "7615:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6437, + "nodeType": "ExpressionStatement", + "src": "7615:30:6" + } + ] + }, + "id": 6439, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6419, + "mutability": "mutable", + "name": "_tokensContract", + "nodeType": "VariableDeclaration", + "scope": 6439, + "src": "7496:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6418, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7496:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7495:25:6" + }, + "returnParameters": { + "id": 6421, + "nodeType": "ParameterList", + "parameters": [], + "src": "7521:0:6" + }, + "scope": 8454, + "src": "7484:169:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9286 + ], + "body": { + "id": 6449, + "nodeType": "Block", + "src": "7885:27:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6446, + "name": "_pause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13676, + "src": "7896:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7896:8:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6448, + "nodeType": "ExpressionStatement", + "src": "7896:8:6" + } + ] + }, + "documentation": { + "id": 6440, + "nodeType": "StructuredDocumentation", + "src": "7661:168:6", + "text": " @notice Pause the process of interaction with voucherID's (ERC-721), in case of emergency.\n Only BR contract is in control of this function." + }, + "functionSelector": "8456cb59", + "id": 6450, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6444, + "modifierName": { + "id": 6443, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "7870:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7870:14:6" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6442, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7861:8:6" + }, + "parameters": { + "id": 6441, + "nodeType": "ParameterList", + "parameters": [], + "src": "7849:2:6" + }, + "returnParameters": { + "id": 6445, + "nodeType": "ParameterList", + "parameters": [], + "src": "7885:0:6" + }, + "scope": 8454, + "src": "7835:77:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9290 + ], + "body": { + "id": 6460, + "nodeType": "Block", + "src": "8126:29:6", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6457, + "name": "_unpause", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13692, + "src": "8137:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8137:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6459, + "nodeType": "ExpressionStatement", + "src": "8137:10:6" + } + ] + }, + "documentation": { + "id": 6451, + "nodeType": "StructuredDocumentation", + "src": "7920:148:6", + "text": " @notice Unpause the process of interaction with voucherID's (ERC-721).\n Only BR contract is in control of this function." + }, + "functionSelector": "3f4ba83a", + "id": 6461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6455, + "modifierName": { + "id": 6454, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8111:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8111:14:6" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6453, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8102:8:6" + }, + "parameters": { + "id": 6452, + "nodeType": "ParameterList", + "parameters": [], + "src": "8090:2:6" + }, + "returnParameters": { + "id": 6456, + "nodeType": "ParameterList", + "parameters": [], + "src": "8126:0:6" + }, + "scope": 8454, + "src": "8074:81:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9310 + ], + "body": { + "id": 6582, + "nodeType": "Block", + "src": "8894:1460:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6485, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "8913:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 6486, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "8927:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8913:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 6488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8937:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 6484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8905:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8905:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6490, + "nodeType": "ExpressionStatement", + "src": "8905:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6492, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9118:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6493, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "9130:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6494, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "9130:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "35", + "id": 6495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9148:9:6", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "src": "9130:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9118:39:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 6498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9159:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 6491, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9110:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6500, + "nodeType": "ExpressionStatement", + "src": "9110:71:6" + }, + { + "assignments": [ + 6502 + ], + "declarations": [ + { + "constant": false, + "id": 6502, + "mutability": "mutable", + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 6582, + "src": "9372:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6503, + "nodeType": "VariableDeclarationStatement", + "src": "9372:11:6" + }, + { + "expression": { + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6504, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9394:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "id": 6508, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9441:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9450:22:6", + "subExpression": { + "baseExpression": { + "id": 6509, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9450:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6511, + "indexExpression": { + "id": 6510, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9450:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6513, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9474:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6514, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9486:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6506, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "9424:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "9424:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9424:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6505, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "9400:9:6", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9400:106:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9394:112:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6518, + "nodeType": "ExpressionStatement", + "src": "9394:112:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6519, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9523:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9523:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9544:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "9523:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6536, + "nodeType": "IfStatement", + "src": "9519:176:6", + "trueBody": { + "id": 6535, + "nodeType": "Block", + "src": "9547:148:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 6524, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "9588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6529, + "indexExpression": { + "expression": { + "baseExpression": { + "id": 6525, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9600:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6527, + "indexExpression": { + "id": 6526, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9609:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9600:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "9600:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9588:30:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6530, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9622:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9588:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "50524f4d4953455f414c52454144595f455849535453", + "id": 6532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9644:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + }, + "value": "PROMISE_ALREADY_EXISTS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cee9f386670e6cc4a9ff06e8f1c450d656d8d3ea0b981ea52ebdc31ead0bf71c", + "typeString": "literal_string \"PROMISE_ALREADY_EXISTS\"" + } + ], + "id": 6523, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9562:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9562:121:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6534, + "nodeType": "ExpressionStatement", + "src": "9562:121:6" + } + ] + } + }, + { + "expression": { + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6537, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "9707:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6539, + "indexExpression": { + "id": 6538, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9716:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9707:13:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6541, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "9757:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6542, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "9782:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6544, + "indexExpression": { + "id": 6543, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9782:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6545, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "9825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6546, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "9858:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6547, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "9892:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6548, + "name": "_price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6470, + "src": "9922:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6549, + "name": "_depositSe", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "9954:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6550, + "name": "_depositBu", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6474, + "src": "9990:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 6551, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10020:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10020:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6540, + "name": "Promise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6189, + "src": "9723:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Promise_$6189_storage_ptr_$", + "typeString": "type(struct VoucherKernel.Promise storage pointer)" + } + }, + "id": 6553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "promiseId", + "nonce", + "seller", + "validFrom", + "validTo", + "price", + "depositSe", + "depositBu", + "idx" + ], + "nodeType": "FunctionCall", + "src": "9723:327:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "src": "9707:343:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6555, + "nodeType": "ExpressionStatement", + "src": "9707:343:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6559, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10080:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6556, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10063:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "10063:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_bytes32_$returns$__$", + "typeString": "function (bytes32)" + } + }, + "id": 6560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10063:21:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6561, + "nodeType": "ExpressionStatement", + "src": "10063:21:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6563, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10134:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "baseExpression": { + "id": 6564, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "10152:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6566, + "indexExpression": { + "id": 6565, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10164:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10152:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6567, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10187:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "_validFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6466, + "src": "10209:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6569, + "name": "_validTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6468, + "src": "10234:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6570, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "10257:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "10257:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10278:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10257:22:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6562, + "name": "LogPromiseCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6271, + "src": "10102:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,address,uint256,uint256,uint256)" + } + }, + "id": 6574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6575, + "nodeType": "EmitStatement", + "src": "10097:193:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6577, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6464, + "src": "10322:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6578, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6502, + "src": "10331:3:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6579, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6476, + "src": "10336:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6576, + "name": "createOrder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6684, + "src": "10310:11:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,bytes32,uint256) returns (uint256)" + } + }, + "id": 6580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10310:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6483, + "id": 6581, + "nodeType": "Return", + "src": "10303:43:6" + } + ] + }, + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "8163:445:6", + "text": " @notice Creating a new promise for goods or services.\n Can be reused, e.g. for making different batches of these (in the future).\n @param _seller seller of the promise\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit" + }, + "functionSelector": "797f2a26", + "id": 6583, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6480, + "modifierName": { + "id": 6479, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "8861:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8861:14:6" + } + ], + "name": "createTokenSupplyID", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6478, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8852:8:6" + }, + "parameters": { + "id": 6477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6464, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8653:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6463, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8653:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6466, + "mutability": "mutable", + "name": "_validFrom", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8679:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8679:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6468, + "mutability": "mutable", + "name": "_validTo", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8708:16:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "_price", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8735:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8735:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "_depositSe", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8760:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8760:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6474, + "mutability": "mutable", + "name": "_depositBu", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8789:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8789:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6476, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8818:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6475, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8818:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8642:200:6" + }, + "returnParameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6583, + "src": "8885:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8884:9:6" + }, + "scope": 8454, + "src": "8614:1740:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9322 + ], + "body": { + "id": 6619, + "nodeType": "Block", + "src": "11092:376:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6599, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11125:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11142:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "11125:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6602, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11164:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "hexValue": "34", + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11182:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "11164:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11125:58:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c4944205041594d454e54204d4554484f44", + "id": 6606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11198:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + }, + "value": "INVALID PAYMENT METHOD" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_125609a240d06db7f083b02f6599cb5a3df9528fca01ef182cfb562a45700084", + "typeString": "literal_string \"INVALID PAYMENT METHOD\"" + } + ], + "id": 6598, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "11103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11103:130:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6608, + "nodeType": "ExpressionStatement", + "src": "11103:130:6" + }, + { + "expression": { + "id": 6617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6609, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "11254:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 6611, + "indexExpression": { + "id": 6610, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6586, + "src": "11269:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11254:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6613, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6588, + "src": "11338:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6614, + "name": "_tokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6590, + "src": "11386:11:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6615, + "name": "_tokenDeposits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6592, + "src": "11434:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6612, + "name": "VoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6196, + "src": "11287:20:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_VoucherPaymentMethod_$6196_storage_ptr_$", + "typeString": "type(struct VoucherKernel.VoucherPaymentMethod storage pointer)" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "paymentMethod", + "addressTokenPrice", + "addressTokenDeposits" + ], + "nodeType": "FunctionCall", + "src": "11287:173:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_memory_ptr", + "typeString": "struct VoucherKernel.VoucherPaymentMethod memory" + } + }, + "src": "11254:206:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "11254:206:6" + } + ] + }, + "documentation": { + "id": 6584, + "nodeType": "StructuredDocumentation", + "src": "10362:528:6", + "text": " @notice Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set.\n @param _tokenIdSupply _tokenIdSupply of the voucher set this is related to\n @param _paymentMethod might be ETHETH, ETHTKN, TKNETH or TKNTKN\n @param _tokenPrice token address which will hold the funds for the price of the voucher\n @param _tokenDeposits token address which will hold the funds for the deposits of the voucher" + }, + "functionSelector": "cf5c9008", + "id": 6620, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6596, + "modifierName": { + "id": 6595, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "11077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "11077:14:6" + } + ], + "name": "createPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6594, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11068:8:6" + }, + "parameters": { + "id": 6593, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6586, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10935:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6585, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10935:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6588, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10968:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6587, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10968:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6590, + "mutability": "mutable", + "name": "_tokenPrice", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "10999:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10999:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "_tokenDeposits", + "nodeType": "VariableDeclaration", + "scope": 6620, + "src": "11029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11029:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "10924:134:6" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "11092:0:6" + }, + "scope": 8454, + "src": "10896:572:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6683, + "nodeType": "Block", + "src": "11995:801:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6633, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12014:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12036:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12028:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6634, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12028:7:6", + "typeDescriptions": {} + } + }, + "id": 6637, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12028:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12014:24:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f50524f4d495345", + "id": 6639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12040:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + }, + "value": "UNSPECIFIED_PROMISE" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_792c2e9142854c982cac942d65b00dc6d3f3d4eff10c18677f7c86d71c7d70f7", + "typeString": "literal_string \"UNSPECIFIED_PROMISE\"" + } + ], + "id": 6632, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12006:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12006:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6641, + "nodeType": "ExpressionStatement", + "src": "12006:56:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6643, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "12171:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6645, + "indexExpression": { + "id": 6644, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12180:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12171:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "12171:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6647, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12202:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12171:38:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f", + "id": 6649, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12211:17:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + }, + "value": "UNAUTHORIZED_CO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_83c466e73df30fcb242d5e5dc7f8c37ecc275ffbfc628bb629cb0683570329da", + "typeString": "literal_string \"UNAUTHORIZED_CO\"" + } + ], + "id": 6642, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12163:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6651, + "nodeType": "ExpressionStatement", + "src": "12163:66:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6653, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12332:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6654, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12344:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12332:13:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f5155414e54495459", + "id": 6656, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12347:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + }, + "value": "INVALID_QUANTITY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e31c51dc6189444539a626c6dbd620d14aa64460972eca65d71d9401768af7ef", + "typeString": "literal_string \"INVALID_QUANTITY\"" + } + ], + "id": 6652, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "12324:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12324:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6658, + "nodeType": "ExpressionStatement", + "src": "12324:42:6" + }, + { + "assignments": [ + 6660 + ], + "declarations": [ + { + "constant": false, + "id": 6660, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6683, + "src": "12462:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6659, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12462:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6664, + "initialValue": { + "arguments": [ + { + "hexValue": "74727565", + "id": 6662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12504:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 6661, + "name": "generateTokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6964, + "src": "12486:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$returns$_t_uint256_$", + "typeString": "function (bool) returns (uint256)" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12486:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12462:47:6" + }, + { + "expression": { + "id": 6669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 6665, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "12564:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6667, + "indexExpression": { + "id": 6666, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12578:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12564:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6668, + "name": "_promiseId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6625, + "src": "12595:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12564:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6670, + "nodeType": "ExpressionStatement", + "src": "12564:41:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6675, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6623, + "src": "12668:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6676, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12690:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6677, + "name": "_quantity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6627, + "src": "12718:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6678, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12742:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6672, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "12633:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6671, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "12618:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8908, + "src": "12618:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,uint256,bytes memory) external" + } + }, + "id": 6679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12618:137:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6680, + "nodeType": "ExpressionStatement", + "src": "12618:137:6" + }, + { + "expression": { + "id": 6681, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6660, + "src": "12775:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6631, + "id": 6682, + "nodeType": "Return", + "src": "12768:20:6" + } + ] + }, + "documentation": { + "id": 6621, + "nodeType": "StructuredDocumentation", + "src": "11476:376:6", + "text": " @notice Create an order for offering a certain quantity of an asset\n This creates a listing in a marketplace, technically as an ERC-1155 non-fungible token with supply.\n @param _seller seller of the promise\n @param _promiseId ID of a promise (simplified into asset for demo)\n @param _quantity Quantity of assets on offer" + }, + "id": 6684, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "createOrder", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6623, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11889:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6622, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11889:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "_promiseId", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11915:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6624, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "11915:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6627, + "mutability": "mutable", + "name": "_quantity", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11944:17:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6626, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11944:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11878:90:6" + }, + "returnParameters": { + "id": 6631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6630, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6684, + "src": "11986:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11986:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11985:9:6" + }, + "scope": 8454, + "src": "11858:938:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 9400 + ], + "body": { + "id": 6739, + "nodeType": "Block", + "src": "13555:582:6", + "statements": [ + { + "assignments": [ + 6702 + ], + "declarations": [ + { + "constant": false, + "id": 6702, + "mutability": "mutable", + "name": "paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13566:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6701, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13566:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 6706, + "initialValue": { + "arguments": [ + { + "id": 6704, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13612:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6703, + "name": "getVoucherPaymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8305, + "src": "13588:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint8_$", + "typeString": "function (uint256) view returns (uint8)" + } + }, + "id": 6705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13588:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13566:61:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6708, + "name": "paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6702, + "src": "13666:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6709, + "name": "_paymentMethod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6693, + "src": "13683:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "13666:31:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "496e636f7272656374205061796d656e74204d6574686f64", + "id": 6711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13699:26:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + }, + "value": "Incorrect Payment Method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_48d86fbbde4e0fc20f69433aa3a7f255d6b23235d804c06af5f22c3f8a39fb20", + "typeString": "literal_string \"Incorrect Payment Method\"" + } + ], + "id": 6707, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "13658:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13658:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6713, + "nodeType": "ExpressionStatement", + "src": "13658:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6715, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13756:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6716, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13772:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6717, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13781:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6714, + "name": "checkOrderFillable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6813, + "src": "13737:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$_t_address_$returns$__$", + "typeString": "function (uint256,address,address) view" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13737:52:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6719, + "nodeType": "ExpressionStatement", + "src": "13737:52:6" + }, + { + "assignments": [ + 6721 + ], + "declarations": [ + { + "constant": false, + "id": 6721, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6739, + "src": "13825:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6720, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13825:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6727, + "initialValue": { + "arguments": [ + { + "id": 6723, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "13861:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6724, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "13870:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6725, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6722, + "name": "extract721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6906, + "src": "13850:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,address,uint256) returns (uint256)" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13850:44:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13825:69:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6729, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6687, + "src": "13946:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6730, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "13975:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6731, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6689, + "src": "14004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6732, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6691, + "src": "14026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 6734, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6721, + "src": "14074:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6733, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "14048:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14048:41:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6736, + "name": "_correlationId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6695, + "src": "14104:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6728, + "name": "LogVoucherDelivered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6285, + "src": "13912:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,address,address,bytes32,uint256)" + } + }, + "id": 6737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13912:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6738, + "nodeType": "EmitStatement", + "src": "13907:222:6" + } + ] + }, + "documentation": { + "id": 6685, + "nodeType": "StructuredDocumentation", + "src": "12804:537:6", + "text": " @notice Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder\n @param _tokenIdSupply ID of the supply token (ERC-1155)\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)\n @param _paymentMethod method being used for that particular order that needs to be fulfilled\n @param _correlationId ID of the current interaction with the smart contract for a specific user" + }, + "functionSelector": "b0df130d", + "id": 6740, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6699, + "modifierName": { + "id": 6698, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "13540:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "13540:14:6" + } + ], + "name": "fillOrder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6697, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13531:8:6" + }, + "parameters": { + "id": 6696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6687, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13376:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6689, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13409:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6688, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13409:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6691, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13435:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6690, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13435:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6693, + "mutability": "mutable", + "name": "_paymentMethod", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13461:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6692, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "13461:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6695, + "mutability": "mutable", + "name": "_correlationId", + "nodeType": "VariableDeclaration", + "scope": 6740, + "src": "13492:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13492:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13365:156:6" + }, + "returnParameters": { + "id": 6700, + "nodeType": "ParameterList", + "parameters": [], + "src": "13555:0:6" + }, + "scope": 8454, + "src": "13347:790:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6812, + "nodeType": "Block", + "src": "14564:1008:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6753, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6751, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "14583:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14601:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14583:19:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 6754, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14604:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 6750, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14575:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14575:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6756, + "nodeType": "ExpressionStatement", + "src": "14575:46:6" + }, + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6757, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14728:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "14728:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14728:20:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6771, + "nodeType": "IfStatement", + "src": "14724:282:6", + "trueBody": { + "id": 6770, + "nodeType": "Block", + "src": "14750:256:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30783135306237613032", + "id": 6765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14826:10:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + }, + "value": "0x150b7a02" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_353073666_by_1", + "typeString": "int_const 353073666" + } + ], + "expression": { + "arguments": [ + { + "id": 6762, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "14799:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6761, + "name": "IERC165", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9006, + "src": "14791:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC165_$9006_$", + "typeString": "type(contract IERC165)" + } + }, + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC165_$9006", + "typeString": "contract IERC165" + } + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 9005, + "src": "14791:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14791:46:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6767, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14856:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6760, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "14765:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14765:135:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6769, + "nodeType": "ExpressionStatement", + "src": "14765:135:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6773, + "name": "_holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6747, + "src": "15026:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6776, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15045:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15037:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6774, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15037:7:6", + "typeDescriptions": {} + } + }, + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15037:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "15026:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 6779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15049:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 6772, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15018:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15018:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "ExpressionStatement", + "src": "15018:53:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6787, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6745, + "src": "15229:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6788, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15238:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6784, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "15203:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6783, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "15194:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 6785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "15194:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 6789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15194:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 6790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15256:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "15194:63:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15272:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 6782, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15172:124:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6794, + "nodeType": "ExpressionStatement", + "src": "15172:124:6" + }, + { + "assignments": [ + 6796 + ], + "declarations": [ + { + "constant": false, + "id": 6796, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 6812, + "src": "15391:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6795, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "15391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6800, + "initialValue": { + "baseExpression": { + "id": 6797, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "15412:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 6799, + "indexExpression": { + "id": 6798, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6743, + "src": "15426:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15412:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15391:50:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 6802, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "15476:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 6804, + "indexExpression": { + "id": 6803, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6796, + "src": "15485:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "15476:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 6805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "15476:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 6806, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "15508:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 6807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "15508:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15476:47:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f45585049524544", + "id": 6809, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15538:15:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + }, + "value": "OFFER_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a74befa6e5e88163dcfc9f9aa11dec8458181ebc8f44064ec59ad9b923770678", + "typeString": "literal_string \"OFFER_EXPIRED\"" + } + ], + "id": 6801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15454:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15454:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6811, + "nodeType": "ExpressionStatement", + "src": "15454:110:6" + } + ] + }, + "documentation": { + "id": 6741, + "nodeType": "StructuredDocumentation", + "src": "14145:279:6", + "text": " @notice Check order is fillable\n @dev Will throw if checks don't pass\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the token's issuer\n @param _holder Address of the recipient of the voucher (ERC-721)" + }, + "id": 6813, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "checkOrderFillable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6743, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14468:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6742, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6745, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14501:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6744, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14501:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6747, + "mutability": "mutable", + "name": "_holder", + "nodeType": "VariableDeclaration", + "scope": 6813, + "src": "14527:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6746, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "14527:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "14457:92:6" + }, + "returnParameters": { + "id": 6749, + "nodeType": "ParameterList", + "parameters": [], + "src": "14564:0:6" + }, + "scope": 8454, + "src": "14430:1142:6", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6905, + "nodeType": "Block", + "src": "16158:1258:6", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6825, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16173:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 12810, + "src": "16173:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$bound_to$_t_address_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16173:16:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6849, + "nodeType": "IfStatement", + "src": "16169:545:6", + "trueBody": { + "id": 6848, + "nodeType": "Block", + "src": "16191:523:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6833, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 6834, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "16326:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "16326:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 6836, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 6837, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16396:2:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "arguments": [ + { + "id": 6830, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16252:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6829, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16232:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16232:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16232:185:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "arguments": [ + { + "id": 6840, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "16441:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6839, + "name": "ERC721TokenReceiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9249, + "src": "16421:19:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721TokenReceiver_$9249_$", + "typeString": "type(contract ERC721TokenReceiver)" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16421:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721TokenReceiver_$9249", + "typeString": "contract ERC721TokenReceiver" + } + }, + "id": 6842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 9248, + "src": "16421:41:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 6843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "16421:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "16232:239:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e535550504f525445445f4552433732315f5245434549564544", + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16490:29:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + }, + "value": "UNSUPPORTED_ERC721_RECEIVED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_93f4b73c3d86bd67195020f99055e3655658f7a9ebf8672f2b1df47f80c21821", + "typeString": "literal_string \"UNSUPPORTED_ERC721_RECEIVED\"" + } + ], + "id": 6828, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "16206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16206:328:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6847, + "nodeType": "ExpressionStatement", + "src": "16206:328:6" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6854, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6816, + "src": "16762:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6855, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16771:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "16787:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "arguments": [ + { + "id": 6851, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "16741:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6850, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "16726:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "16726:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "16726:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6858, + "nodeType": "ExpressionStatement", + "src": "16726:63:6" + }, + { + "assignments": [ + 6860 + ], + "declarations": [ + { + "constant": false, + "id": 6860, + "mutability": "mutable", + "name": "voucherTokenId", + "nodeType": "VariableDeclaration", + "scope": 6905, + "src": "16868:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16868:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6867, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6861, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16906:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "id": 6865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": true, + "src": "16923:30:6", + "subExpression": { + "baseExpression": { + "id": 6862, + "name": "typeCounters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6227, + "src": "16925:12:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 6864, + "indexExpression": { + "id": 6863, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6820, + "src": "16938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "16925:28:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "16906:47:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "16868:85:6" + }, + { + "expression": { + "id": 6879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6868, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "16988:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6870, + "indexExpression": { + "id": 6869, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17003:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "16988:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "16988:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6873, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17058:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6875, + "indexExpression": { + "id": 6874, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17073:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17058:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "17058:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6877, + "name": "IDX_COMMIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5956, + "src": "17110:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6872, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "17028:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17028:103:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "16988:143:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 6880, + "nodeType": "ExpressionStatement", + "src": "16988:143:6" + }, + { + "expression": { + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6881, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17142:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6883, + "indexExpression": { + "id": 6882, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17157:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17142:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "17142:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17193:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17142:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6887, + "nodeType": "ExpressionStatement", + "src": "17142:56:6" + }, + { + "expression": { + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 6888, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "17209:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6890, + "indexExpression": { + "id": 6889, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17224:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "17209:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "17209:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 6892, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "17261:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "17209:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6894, + "nodeType": "ExpressionStatement", + "src": "17209:57:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6899, + "name": "_to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6818, + "src": "17354:3:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6900, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17359:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6896, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17333:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6895, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17318:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 8928, + "src": "17318:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 6901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17318:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6902, + "nodeType": "ExpressionStatement", + "src": "17318:56:6" + }, + { + "expression": { + "id": 6903, + "name": "voucherTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6860, + "src": "17394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6824, + "id": 6904, + "nodeType": "Return", + "src": "17387:21:6" + } + ] + }, + "documentation": { + "id": 6814, + "nodeType": "StructuredDocumentation", + "src": "15580:437:6", + "text": " @notice Extract a standard non-fungible token ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _to The address of the token holder\n @param _tokenIdSupply ID of the token type\n @return ID of the voucher token" + }, + "id": 6906, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "extract721", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6821, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6816, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16053:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16053:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6818, + "mutability": "mutable", + "name": "_to", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16079:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "16079:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6820, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16101:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6819, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16101:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16042:88:6" + }, + "returnParameters": { + "id": 6824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 6906, + "src": "16149:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6822, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "16149:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "16148:9:6" + }, + "scope": 8454, + "src": "16023:1393:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9344 + ], + "body": { + "id": 6930, + "nodeType": "Block", + "src": "17957:85:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6925, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6909, + "src": "18004:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6926, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6911, + "src": "18013:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6927, + "name": "_qty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6913, + "src": "18029:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 6922, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "17983:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6921, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "17968:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "17968:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "17968:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6929, + "nodeType": "ExpressionStatement", + "src": "17968:66:6" + } + ] + }, + "documentation": { + "id": 6907, + "nodeType": "StructuredDocumentation", + "src": "17424:366:6", + "text": " @notice Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155\n @dev Token ID is derived following the same principles for both ERC-1155 and ERC-721\n @param _issuer The address of the token issuer\n @param _tokenIdSupply ID of the token type\n @param _qty qty that should be burned" + }, + "functionSelector": "74898e82", + "id": 6931, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6917, + "modifierName": { + "id": 6916, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13660, + "src": "17930:10:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17930:10:6" + }, + { + "id": 6919, + "modifierName": { + "id": 6918, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "17941:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "17941:15:6" + } + ], + "name": "burnSupplyOnPause", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6915, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "17921:8:6" + }, + "parameters": { + "id": 6914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6909, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17833:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6908, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "17833:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6911, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17859:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6910, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6913, + "mutability": "mutable", + "name": "_qty", + "nodeType": "VariableDeclaration", + "scope": 6931, + "src": "17892:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6912, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "17892:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "17822:89:6" + }, + "returnParameters": { + "id": 6920, + "nodeType": "ParameterList", + "parameters": [], + "src": "17957:0:6" + }, + "scope": 8454, + "src": "17796:246:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 6963, + "nodeType": "Block", + "src": "18428:359:6", + "statements": [ + { + "expression": { + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "18439:8:6", + "subExpression": { + "id": 6939, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18439:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6941, + "nodeType": "ExpressionStatement", + "src": "18439:8:6" + }, + { + "condition": { + "id": 6942, + "name": "_isNonFungible", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6934, + "src": "18464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 6959, + "nodeType": "Block", + "src": "18623:127:6", + "statements": [ + { + "expression": { + "id": 6957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6953, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18638:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6954, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18651:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6955, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18661:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18651:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6958, + "nodeType": "ExpressionStatement", + "src": "18638:26:6" + } + ] + }, + "id": 6960, + "nodeType": "IfStatement", + "src": "18460:290:6", + "trueBody": { + "id": 6952, + "nodeType": "Block", + "src": "18480:137:6", + "statements": [ + { + "expression": { + "id": 6950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6943, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18495:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6944, + "name": "TYPE_NF_BIT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6251, + "src": "18508:11:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "|", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6945, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "18523:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<<", + "rightExpression": { + "hexValue": "313238", + "id": 6946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "18533:3:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_128_by_1", + "typeString": "int_const 128" + }, + "value": "128" + }, + "src": "18523:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 6948, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "18522:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18508:29:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "18495:42:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6951, + "nodeType": "ExpressionStatement", + "src": "18495:42:6" + } + ] + } + }, + { + "expression": { + "id": 6961, + "name": "_tokenType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6937, + "src": "18769:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6938, + "id": 6962, + "nodeType": "Return", + "src": "18762:17:6" + } + ] + }, + "documentation": { + "id": 6932, + "nodeType": "StructuredDocumentation", + "src": "18050:263:6", + "text": " @notice Creating a new token type, serving as the base for tokenID generation for NFTs, and a de facto ID for FTs.\n @param _isNonFungible Flag for generating NFT or FT\n @return _tokenType Returns a newly generated token type" + }, + "id": 6964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "generateTokenType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6935, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6934, + "mutability": "mutable", + "name": "_isNonFungible", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18346:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 6933, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "18346:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "18345:21:6" + }, + "returnParameters": { + "id": 6938, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6937, + "mutability": "mutable", + "name": "_tokenType", + "nodeType": "VariableDeclaration", + "scope": 6964, + "src": "18403:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6936, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "18403:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "18402:20:6" + }, + "scope": 8454, + "src": "18319:468:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 9352 + ], + "body": { + "id": 7031, + "nodeType": "Block", + "src": "19219:804:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 6983, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19293:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 6985, + "indexExpression": { + "id": 6984, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19308:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19293:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 6986, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19293:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 6982, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "19276:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19276:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f50524f434553534544", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "19347:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + }, + "value": "ALREADY_PROCESSED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_85aa68df5043b4881d3b6873b2ac0da9afd51462b965ad79d44d506b45049ebd", + "typeString": "literal_string \"ALREADY_PROCESSED\"" + } + ], + "id": 6981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "19254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19254:123:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6990, + "nodeType": "ExpressionStatement", + "src": "19254:123:6" + }, + { + "expression": { + "arguments": [ + { + "id": 6992, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19524:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6991, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "19505:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19505:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6994, + "nodeType": "ExpressionStatement", + "src": "19505:35:6" + }, + { + "assignments": [ + 6996 + ], + "declarations": [ + { + "constant": false, + "id": 6996, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7031, + "src": "19551:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 6995, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "19551:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7002, + "initialValue": { + "baseExpression": { + "id": 6997, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "19590:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7001, + "indexExpression": { + "arguments": [ + { + "id": 6999, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19625:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6998, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "19599:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19599:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19590:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "19551:91:6" + }, + { + "expression": { + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7003, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19655:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7005, + "indexExpression": { + "id": 7004, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19670:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19655:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7006, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "19655:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7007, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "19709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "19709:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "19655:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7010, + "nodeType": "ExpressionStatement", + "src": "19655:69:6" + }, + { + "expression": { + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7011, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19735:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7013, + "indexExpression": { + "id": 7012, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19750:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19735:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19735:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7016, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "19806:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7018, + "indexExpression": { + "id": 7017, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19821:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "19806:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "19806:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7020, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "19859:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7015, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "19776:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19776:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "19735:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7023, + "nodeType": "ExpressionStatement", + "src": "19735:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7025, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19931:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7026, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19961:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7027, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6996, + "src": "19986:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7028, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "19986:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 7024, + "name": "LogVoucherRedeemed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6293, + "src": "19898:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (uint256,address,bytes32)" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "19898:117:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "EmitStatement", + "src": "19893:122:6" + } + ] + }, + "documentation": { + "id": 6965, + "nodeType": "StructuredDocumentation", + "src": "18824:185:6", + "text": " @notice Redemption of the vouchers promise\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7bde82f2", + "id": 7032, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6973, + "modifierName": { + "id": 6972, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "19121:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19121:13:6" + }, + { + "id": 6975, + "modifierName": { + "id": 6974, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "19144:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "19144:14:6" + }, + { + "arguments": [ + { + "id": 6977, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6967, + "src": "19185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6978, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6969, + "src": "19202:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 6979, + "modifierName": { + "id": 6976, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "19168:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "19168:45:6" + } + ], + "name": "redeem", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6971, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "19103:8:6" + }, + "parameters": { + "id": 6970, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6967, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19031:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "19031:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6969, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7032, + "src": "19056:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6968, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "19056:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "19030:45:6" + }, + "returnParameters": { + "id": 6980, + "nodeType": "ParameterList", + "parameters": [], + "src": "19219:0:6" + }, + "scope": 8454, + "src": "19015:1008:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9360 + ], + "body": { + "id": 7088, + "nodeType": "Block", + "src": "20492:612:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7051, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20542:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7053, + "indexExpression": { + "id": 7052, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20557:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20542:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20542:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7050, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "20525:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20525:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "20596:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7049, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "20503:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20503:125:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7058, + "nodeType": "ExpressionStatement", + "src": "20503:125:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7060, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20789:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7059, + "name": "isInValidityPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8343, + "src": "20770:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 7061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20770:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7062, + "nodeType": "ExpressionStatement", + "src": "20770:35:6" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7063, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20818:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7065, + "indexExpression": { + "id": 7064, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20833:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20818:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "20818:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7067, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "20872:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "20872:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "20818:69:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "20818:69:6" + }, + { + "expression": { + "id": 7082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7071, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20898:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7073, + "indexExpression": { + "id": 7072, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20913:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20898:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20898:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7076, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "20969:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7078, + "indexExpression": { + "id": 7077, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20984:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "20969:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7079, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "20969:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7080, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "21022:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7075, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "20939:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "20939:104:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "20898:145:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7083, + "nodeType": "ExpressionStatement", + "src": "20898:145:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7085, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "21080:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7084, + "name": "LogVoucherRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6297, + "src": "21061:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21061:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7087, + "nodeType": "EmitStatement", + "src": "21056:40:6" + } + ] + }, + "documentation": { + "id": 7033, + "nodeType": "StructuredDocumentation", + "src": "20112:170:6", + "text": " @notice Refunding a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "7ad226dc", + "id": 7089, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7041, + "modifierName": { + "id": 7040, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "20394:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20394:13:6" + }, + { + "id": 7043, + "modifierName": { + "id": 7042, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "20417:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "20417:14:6" + }, + { + "arguments": [ + { + "id": 7045, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7035, + "src": "20458:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7046, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7037, + "src": "20475:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7047, + "modifierName": { + "id": 7044, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "20441:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "20441:45:6" + } + ], + "name": "refund", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7039, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "20376:8:6" + }, + "parameters": { + "id": 7038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7035, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20304:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "20304:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7037, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7089, + "src": "20329:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7036, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "20329:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "20303:45:6" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "20492:0:6" + }, + "scope": 8454, + "src": "20288:816:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9368 + ], + "body": { + "id": 7329, + "nodeType": "Block", + "src": "21505:4150:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21538:63:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7108, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21548:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7110, + "indexExpression": { + "id": 7109, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21563:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21548:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21548:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7112, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "21588:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7107, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21539:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21539:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f434f4d504c41494e4544", + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21616:20:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + }, + "value": "ALREADY_COMPLAINED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_53494b53c753dedbccdbfa0c63e99e92e800f4df9983b45d49261662c2354c30", + "typeString": "literal_string \"ALREADY_COMPLAINED\"" + } + ], + "id": 7106, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21516:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21516:131:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7117, + "nodeType": "ExpressionStatement", + "src": "21516:131:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "21762:60:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7120, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "21772:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7122, + "indexExpression": { + "id": 7121, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21787:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "21772:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "21772:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7124, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "21812:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7119, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "21763:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21763:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "21837:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7118, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "21740:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "21740:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7129, + "nodeType": "ExpressionStatement", + "src": "21740:127:6" + }, + { + "assignments": [ + 7131 + ], + "declarations": [ + { + "constant": false, + "id": 7131, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7329, + "src": "22011:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7130, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "22011:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7137, + "initialValue": { + "baseExpression": { + "id": 7132, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "22050:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7136, + "indexExpression": { + "arguments": [ + { + "id": 7134, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22085:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7133, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "22059:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22059:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22050:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "22011:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7139, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22192:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7141, + "indexExpression": { + "id": 7140, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22207:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22192:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22192:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7138, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "22168:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22168:63:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7145, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7147, + "indexExpression": { + "id": 7146, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22279:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22264:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7148, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22264:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7144, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "22248:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22248:55:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "22168:135:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7217, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23653:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7219, + "indexExpression": { + "id": 7218, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23668:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23653:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23653:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7216, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "23638:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23638:54:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7284, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24864:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7286, + "indexExpression": { + "id": 7285, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24879:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24864:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24864:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7288, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "24904:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7283, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "24855:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24855:66:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7325, + "nodeType": "Block", + "src": "25496:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25518:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7321, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "25511:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25511:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7324, + "nodeType": "ExpressionStatement", + "src": "25511:29:6" + } + ] + }, + "id": 7326, + "nodeType": "IfStatement", + "src": "24837:811:6", + "trueBody": { + "id": 7320, + "nodeType": "Block", + "src": "24933:557:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7291, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24974:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24974:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7293, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25014:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7295, + "indexExpression": { + "id": 7294, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25029:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25014:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "25014:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7297, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "25093:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "25014:93:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24974:133:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "25126:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7290, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24948:217:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7302, + "nodeType": "ExpressionStatement", + "src": "24948:217:6" + }, + { + "expression": { + "id": 7314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7303, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25262:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7305, + "indexExpression": { + "id": 7304, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25277:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25262:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7306, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25262:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7308, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "25337:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7310, + "indexExpression": { + "id": 7309, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25352:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "25337:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7311, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "25337:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7312, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "25394:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7307, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "25303:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25303:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "25262:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7315, + "nodeType": "ExpressionStatement", + "src": "25262:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7317, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "25462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7316, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "25443:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "25443:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7319, + "nodeType": "EmitStatement", + "src": "25438:40:6" + } + ] + } + }, + "id": 7327, + "nodeType": "IfStatement", + "src": "23634:2014:6", + "trueBody": { + "id": 7282, + "nodeType": "Block", + "src": "23694:1137:6", + "statements": [ + { + "condition": { + "id": 7229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "23731:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7223, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23763:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7225, + "indexExpression": { + "id": 7224, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23778:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23763:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7226, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23763:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7227, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "23824:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7222, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "23732:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23732:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7255, + "nodeType": "Block", + "src": "24187:261:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7245, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24236:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7247, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "24255:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "24255:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7249, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "24274:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24255:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24236:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24311:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7244, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "24206:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24206:148:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7254, + "nodeType": "ExpressionStatement", + "src": "24206:148:6" + } + ] + }, + "id": 7256, + "nodeType": "IfStatement", + "src": "23709:739:6", + "trueBody": { + "id": 7243, + "nodeType": "Block", + "src": "23875:306:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7231, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23924:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7233, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7131, + "src": "23968:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7234, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "23968:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7235, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23987:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7237, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "24004:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23968:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23924:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "24044:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7230, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "23894:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23894:193:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7242, + "nodeType": "ExpressionStatement", + "src": "23894:193:6" + } + ] + } + }, + { + "expression": { + "id": 7263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7257, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24464:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7259, + "indexExpression": { + "id": 7258, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24479:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24464:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7260, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "24464:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7261, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "24521:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "24521:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "24464:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7264, + "nodeType": "ExpressionStatement", + "src": "24464:90:6" + }, + { + "expression": { + "id": 7276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7265, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24569:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7267, + "indexExpression": { + "id": 7266, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24584:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24569:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7268, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24569:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7270, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "24644:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7272, + "indexExpression": { + "id": 7271, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24659:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "24644:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "24644:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7274, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "24701:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7269, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "24610:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24610:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "24569:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7277, + "nodeType": "ExpressionStatement", + "src": "24569:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7279, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "24769:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7278, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "24750:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "24750:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7281, + "nodeType": "EmitStatement", + "src": "24745:40:6" + } + ] + } + }, + "id": 7328, + "nodeType": "IfStatement", + "src": "22150:3498:6", + "trueBody": { + "id": 7215, + "nodeType": "Block", + "src": "22315:1313:6", + "statements": [ + { + "condition": { + "id": 7158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "22352:128:6", + "subExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7152, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22384:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7154, + "indexExpression": { + "id": 7153, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22399:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22384:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7155, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "22384:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7156, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "22445:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7151, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "22353:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22353:127:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7188, + "nodeType": "Block", + "src": "22901:350:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7176, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22950:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22950:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7178, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22994:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7180, + "indexExpression": { + "id": 7179, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23009:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22994:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22994:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7182, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "23077:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22994:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22950:141:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "23114:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7175, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22920:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22920:237:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7187, + "nodeType": "ExpressionStatement", + "src": "22920:237:6" + } + ] + }, + "id": 7189, + "nodeType": "IfStatement", + "src": "22330:921:6", + "trueBody": { + "id": 7174, + "nodeType": "Block", + "src": "22496:399:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7160, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "22545:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "22545:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7162, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "22589:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7164, + "indexExpression": { + "id": 7163, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "22604:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "22589:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7165, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "22589:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7166, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "22672:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7168, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "22718:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22589:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "22545:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f4d504c41494e504552494f445f45585049524544", + "id": 7171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "22758:24:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + }, + "value": "COMPLAINPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6aa6e9903150cf6a99887becd04ad40e714d2c2e53062086a1ed6cb55f057a5", + "typeString": "literal_string \"COMPLAINPERIOD_EXPIRED\"" + } + ], + "id": 7159, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "22515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "22515:286:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7173, + "nodeType": "ExpressionStatement", + "src": "22515:286:6" + } + ] + } + }, + { + "expression": { + "id": 7196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7190, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23267:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7192, + "indexExpression": { + "id": 7191, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23267:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "23267:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7194, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "23324:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "23324:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "23267:90:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7197, + "nodeType": "ExpressionStatement", + "src": "23267:90:6" + }, + { + "expression": { + "id": 7209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7198, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23372:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7200, + "indexExpression": { + "id": 7199, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23387:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23372:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23372:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7203, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "23447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7205, + "indexExpression": { + "id": 7204, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "23447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "23447:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7207, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "23504:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7202, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "23413:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23413:118:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "23372:159:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7210, + "nodeType": "ExpressionStatement", + "src": "23372:159:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7212, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "23572:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7211, + "name": "LogVoucherComplain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6301, + "src": "23553:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "23553:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7214, + "nodeType": "EmitStatement", + "src": "23548:40:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7090, + "nodeType": "StructuredDocumentation", + "src": "21112:181:6", + "text": " @notice Issue a complain for a voucher\n @param _tokenIdVoucher ID of the voucher\n @param _msgSender account called the fn from the BR contract" + }, + "functionSelector": "66db9a09", + "id": 7330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7098, + "modifierName": { + "id": 7097, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "21407:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21407:13:6" + }, + { + "id": 7100, + "modifierName": { + "id": 7099, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "21430:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "21430:14:6" + }, + { + "arguments": [ + { + "id": 7102, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7092, + "src": "21471:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7103, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7094, + "src": "21488:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7104, + "modifierName": { + "id": 7101, + "name": "onlyVoucherOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6417, + "src": "21454:16:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_uint256_$_t_address_$", + "typeString": "modifier (uint256,address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "21454:45:6" + } + ], + "name": "complain", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "21389:8:6" + }, + "parameters": { + "id": 7095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7092, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21317:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "21317:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7094, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7330, + "src": "21342:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "21342:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "21316:45:6" + }, + "returnParameters": { + "id": 7105, + "nodeType": "ParameterList", + "parameters": [], + "src": "21505:0:6" + }, + "scope": 8454, + "src": "21299:4356:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9376 + ], + "body": { + "id": 7537, + "nodeType": "Block", + "src": "25968:3569:6", + "statements": [ + { + "assignments": [ + 7342 + ], + "declarations": [ + { + "constant": false, + "id": 7342, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "25979:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7341, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25979:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7346, + "initialValue": { + "arguments": [ + { + "id": 7344, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26026:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7343, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "26003:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 7345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26003:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "25979:63:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7349, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7342, + "src": "26091:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7348, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "26075:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26075:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7351, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7335, + "src": "26109:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "26075:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26134:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7347, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26053:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26053:110:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7355, + "nodeType": "ExpressionStatement", + "src": "26053:110:6" + }, + { + "assignments": [ + 7357 + ], + "declarations": [ + { + "constant": false, + "id": 7357, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26260:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7356, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "26260:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7362, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7358, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26276:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7360, + "indexExpression": { + "id": 7359, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26291:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26276:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "26276:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26260:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26335:36:6", + "subExpression": { + "arguments": [ + { + "id": 7365, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7366, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "26354:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7364, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26336:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26336:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f43414e43454c4641554c54", + "id": 7369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26373:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + }, + "value": "ALREADY_CANCELFAULT" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f70a5f26a12584c06a5ed05cce48137219718140f1a56ac906bad6e55eaaeb1e", + "typeString": "literal_string \"ALREADY_CANCELFAULT\"" + } + ], + "id": 7363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26327:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7371, + "nodeType": "ExpressionStatement", + "src": "26327:68:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26496:29:6", + "subExpression": { + "arguments": [ + { + "id": 7374, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26506:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7375, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "26515:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7373, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26497:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26497:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "26527:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26488:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26488:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7380, + "nodeType": "ExpressionStatement", + "src": "26488:59:6" + }, + { + "assignments": [ + 7382 + ], + "declarations": [ + { + "constant": false, + "id": 7382, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7537, + "src": "26642:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7381, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "26642:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7388, + "initialValue": { + "baseExpression": { + "id": 7383, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "26681:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7387, + "indexExpression": { + "arguments": [ + { + "id": 7385, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "26716:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7384, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "26690:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26690:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26681:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "26642:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7390, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26759:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7391, + "name": "IDX_REDEEM", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5959, + "src": "26768:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7389, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26750:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26750:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7394, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26792:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7395, + "name": "IDX_REFUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5962, + "src": "26801:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7393, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26783:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26783:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "26750:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7444, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27829:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7445, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "27838:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7443, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27820:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27820:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7491, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "28736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7490, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "28719:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28719:25:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7519, + "nodeType": "Block", + "src": "29189:152:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "hexValue": "494e4150504c494341424c455f535441545553", + "id": 7516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "29211:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + }, + "value": "INAPPLICABLE_STATUS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_d0faf1dea07f76cde9f53f3359618f66541a0b51c05040e220f0377fad18fdb4", + "typeString": "literal_string \"INAPPLICABLE_STATUS\"" + } + ], + "id": 7515, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "29204:6:6", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 7517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29204:29:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7518, + "nodeType": "ExpressionStatement", + "src": "29204:29:6" + } + ] + }, + "id": 7520, + "nodeType": "IfStatement", + "src": "28715:626:6", + "trueBody": { + "id": 7514, + "nodeType": "Block", + "src": "28746:437:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7494, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28820:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7496, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28860:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7497, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28860:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7498, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28879:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7500, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28896:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28860:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28820:93:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28932:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7493, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28794:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28794:172:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7505, + "nodeType": "ExpressionStatement", + "src": "28794:172:6" + }, + { + "expression": { + "id": 7512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7506, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29059:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7508, + "indexExpression": { + "id": 7507, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29074:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29059:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7509, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "29059:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7510, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "29113:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "29113:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "29059:87:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7513, + "nodeType": "ExpressionStatement", + "src": "29059:87:6" + } + ] + } + }, + "id": 7521, + "nodeType": "IfStatement", + "src": "27816:1525:6", + "trueBody": { + "id": 7489, + "nodeType": "Block", + "src": "27851:858:6", + "statements": [ + { + "condition": { + "id": 7451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "27896:32:6", + "subExpression": { + "arguments": [ + { + "id": 7448, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "27906:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7449, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "27915:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7447, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "27897:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27897:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7487, + "nodeType": "Block", + "src": "28347:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28396:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28396:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7477, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28440:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7479, + "indexExpression": { + "id": 7478, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28455:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28440:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7480, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "28440:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7481, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28526:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28440:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28396:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28566:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7474, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "28366:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "28366:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7486, + "nodeType": "ExpressionStatement", + "src": "28366:238:6" + } + ] + }, + "id": 7488, + "nodeType": "IfStatement", + "src": "27892:806:6", + "trueBody": { + "id": 7473, + "nodeType": "Block", + "src": "27930:411:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7461, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7453, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27979:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27979:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7455, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7382, + "src": "28023:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7456, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "28023:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7457, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "28042:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7459, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "28059:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28023:53:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27979:97:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "28099:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27949:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27949:188:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7464, + "nodeType": "ExpressionStatement", + "src": "27949:188:6" + }, + { + "expression": { + "id": 7471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7465, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "28234:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7467, + "indexExpression": { + "id": 7466, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "28249:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "28234:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "28234:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7469, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "28288:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "28288:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "28234:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7472, + "nodeType": "ExpressionStatement", + "src": "28234:91:6" + } + ] + } + } + ] + } + }, + "id": 7522, + "nodeType": "IfStatement", + "src": "26746:2595:6", + "trueBody": { + "id": 7442, + "nodeType": "Block", + "src": "26814:996:6", + "statements": [ + { + "condition": { + "id": 7402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "26872:32:6", + "subExpression": { + "arguments": [ + { + "id": 7399, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "26882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7400, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "26891:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7398, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "26873:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26873:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 7440, + "nodeType": "Block", + "src": "27448:351:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7428, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27497:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27497:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7430, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27541:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7432, + "indexExpression": { + "id": 7431, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27556:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27541:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7433, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "27541:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7434, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27627:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27541:103:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27497:147:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27667:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "27467:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "27467:238:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7439, + "nodeType": "ExpressionStatement", + "src": "27467:238:6" + } + ] + }, + "id": 7441, + "nodeType": "IfStatement", + "src": "26868:931:6", + "trueBody": { + "id": 7426, + "nodeType": "Block", + "src": "26906:536:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7404, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "26955:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "26955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7406, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "26999:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7408, + "indexExpression": { + "id": 7407, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27014:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "26999:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "26999:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7410, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "27082:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:97:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7412, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "27128:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26999:146:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "26955:190:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "434f46504552494f445f45585049524544", + "id": 7415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "27168:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + }, + "value": "COFPERIOD_EXPIRED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_998311e6678ffb95ded4ac1370bba3e13e3ec1cd4ac07133643384a4491916dc", + "typeString": "literal_string \"COFPERIOD_EXPIRED\"" + } + ], + "id": 7403, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "26925:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "26925:281:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7417, + "nodeType": "ExpressionStatement", + "src": "26925:281:6" + }, + { + "expression": { + "id": 7424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7418, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "27303:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7420, + "indexExpression": { + "id": 7419, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "27318:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "27303:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "27303:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "id": 7422, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "27357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "27357:37:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "27303:91:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7425, + "nodeType": "ExpressionStatement", + "src": "27303:91:6" + } + ] + } + } + ] + } + }, + { + "expression": { + "id": 7531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7523, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "29353:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7525, + "indexExpression": { + "id": 7524, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "29353:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "29353:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7528, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7357, + "src": "29424:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7529, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "29446:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7527, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "29394:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29394:79:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "29353:120:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7532, + "nodeType": "ExpressionStatement", + "src": "29353:120:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7534, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7333, + "src": "29513:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7533, + "name": "LogVoucherFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6305, + "src": "29491:21:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "29491:38:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7536, + "nodeType": "EmitStatement", + "src": "29486:43:6" + } + ] + }, + "documentation": { + "id": 7331, + "nodeType": "StructuredDocumentation", + "src": "25663:167:6", + "text": " @notice Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal\n @param _tokenIdVoucher ID of the voucher" + }, + "functionSelector": "f5d7aa18", + "id": 7538, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7339, + "modifierName": { + "id": 7338, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "25949:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "25949:13:6" + } + ], + "name": "cancelOrFault", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7337, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "25931:8:6" + }, + "parameters": { + "id": 7336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7333, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25859:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "25859:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7335, + "mutability": "mutable", + "name": "_msgSender", + "nodeType": "VariableDeclaration", + "scope": 7538, + "src": "25884:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7334, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "25884:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "25858:45:6" + }, + "returnParameters": { + "id": 7340, + "nodeType": "ParameterList", + "parameters": [], + "src": "25968:0:6" + }, + "scope": 8454, + "src": "25836:3701:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9386 + ], + "body": { + "id": 7592, + "nodeType": "Block", + "src": "30049:384:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7555, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30084:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7554, + "name": "getSupplyHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8167, + "src": "30068:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 7556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30068:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 7557, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30103:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "30068:42:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e415554484f52495a45445f434f46", + "id": 7559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30112:18:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + }, + "value": "UNAUTHORIZED_COF" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b9f9f283f8fc428e60cb969208985ed8e7933a404e10a1705db091f62778085a", + "typeString": "literal_string \"UNAUTHORIZED_COF\"" + } + ], + "id": 7553, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30060:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30060:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7561, + "nodeType": "ExpressionStatement", + "src": "30060:71:6" + }, + { + "assignments": [ + 7563 + ], + "declarations": [ + { + "constant": false, + "id": 7563, + "mutability": "mutable", + "name": "remQty", + "nodeType": "VariableDeclaration", + "scope": 7592, + "src": "30144:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30144:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7568, + "initialValue": { + "arguments": [ + { + "id": 7565, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30180:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7566, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30196:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7564, + "name": "getRemQtyForSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8063, + "src": "30161:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_address_$returns$_t_uint256_$", + "typeString": "function (uint256,address) view returns (uint256)" + } + }, + "id": 7567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30161:43:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "30144:60:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7570, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30225:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 7571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30234:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30225:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4f464645525f454d505459", + "id": 7573, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30237:13:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + }, + "value": "OFFER_EMPTY" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_6876f935fab011de6b034451c60bbcc0620e40b8eebb55c78ca705d7896ccee0", + "typeString": "literal_string \"OFFER_EMPTY\"" + } + ], + "id": 7569, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30217:34:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7575, + "nodeType": "ExpressionStatement", + "src": "30217:34:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7580, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30300:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 7581, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30309:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7582, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30325:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 7577, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "30279:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7576, + "name": "IERC1155ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8956, + "src": "30264:14:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155ERC721_$8956_$", + "typeString": "type(contract IERC1155ERC721)" + } + }, + "id": 7578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155ERC721_$8956", + "typeString": "contract IERC1155ERC721" + } + }, + "id": 7579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 8918, + "src": "30264:35:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256) external" + } + }, + "id": 7583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30264:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7584, + "nodeType": "ExpressionStatement", + "src": "30264:68:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7586, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7541, + "src": "30375:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 7587, + "name": "_issuer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7543, + "src": "30391:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7585, + "name": "LogVoucherSetFaultCancel", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6347, + "src": "30350:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30350:49:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7589, + "nodeType": "EmitStatement", + "src": "30345:54:6" + }, + { + "expression": { + "id": 7590, + "name": "remQty", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7563, + "src": "30419:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7552, + "id": 7591, + "nodeType": "Return", + "src": "30412:13:6" + } + ] + }, + "documentation": { + "id": 7539, + "nodeType": "StructuredDocumentation", + "src": "29545:309:6", + "text": " @notice Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange.\n @param _tokenIdSupply ID of the voucher set\n @param _issuer owner of the voucher" + }, + "functionSelector": "455e42f2", + "id": 7593, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7547, + "modifierName": { + "id": 7546, + "name": "onlyFromRouter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6375, + "src": "29979:14:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "29979:14:6" + }, + { + "id": 7549, + "modifierName": { + "id": 7548, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13649, + "src": "30003:13:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30003:13:6" + } + ], + "name": "cancelOrFaultVoucherSet", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7545, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "29961:8:6" + }, + "parameters": { + "id": 7544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7541, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29893:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "29893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7543, + "mutability": "mutable", + "name": "_issuer", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "29917:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "29917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "29892:41:6" + }, + "returnParameters": { + "id": 7552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7551, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7593, + "src": "30035:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30035:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30034:9:6" + }, + "scope": 8454, + "src": "29860:573:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9328 + ], + "body": { + "id": 7621, + "nodeType": "Block", + "src": "30785:277:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7603, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30804:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7604, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30823:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "30804:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30826:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "30796:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "30796:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7608, + "nodeType": "ExpressionStatement", + "src": "30796:47:6" + }, + { + "expression": { + "id": 7614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7609, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "30944:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7611, + "indexExpression": { + "id": 7610, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "30959:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "30944:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "30944:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "30996:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "30944:56:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7615, + "nodeType": "ExpressionStatement", + "src": "30944:56:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7617, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7596, + "src": "31035:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "30", + "id": 7618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31052:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7616, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31018:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31018:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7620, + "nodeType": "EmitStatement", + "src": "31013:41:6" + } + ] + }, + "documentation": { + "id": 7594, + "nodeType": "StructuredDocumentation", + "src": "30526:134:6", + "text": " @notice Mark voucher token that the payment was released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "75549516", + "id": 7622, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7600, + "modifierName": { + "id": 7599, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "30764:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "30764:15:6" + } + ], + "name": "setPaymentReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7598, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "30746:8:6" + }, + "parameters": { + "id": 7597, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7596, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7622, + "src": "30694:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7595, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "30694:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "30693:25:6" + }, + "returnParameters": { + "id": 7601, + "nodeType": "ParameterList", + "parameters": [], + "src": "30785:0:6" + }, + "scope": 8454, + "src": "30666:396:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9334 + ], + "body": { + "id": 7650, + "nodeType": "Block", + "src": "31332:278:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7632, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31351:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7633, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31370:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31351:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31373:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7631, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31343:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31343:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7637, + "nodeType": "ExpressionStatement", + "src": "31343:47:6" + }, + { + "expression": { + "id": 7643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7638, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "31491:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7640, + "indexExpression": { + "id": 7639, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31506:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "31491:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7641, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "31491:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7642, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31544:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "31491:57:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7644, + "nodeType": "ExpressionStatement", + "src": "31491:57:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7646, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7625, + "src": "31583:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "31", + "id": 7647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31600:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "id": 7645, + "name": "LogFundsReleased", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6353, + "src": "31566:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint8_$returns$__$", + "typeString": "function (uint256,uint8)" + } + }, + "id": 7648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31566:36:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7649, + "nodeType": "EmitStatement", + "src": "31561:41:6" + } + ] + }, + "documentation": { + "id": 7623, + "nodeType": "StructuredDocumentation", + "src": "31070:136:6", + "text": " @notice Mark voucher token that the deposits were released\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "ebba1b29", + "id": 7651, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7629, + "modifierName": { + "id": 7628, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "31311:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "31311:15:6" + } + ], + "name": "setDepositsReleased", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7627, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31293:8:6" + }, + "parameters": { + "id": 7626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7625, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7651, + "src": "31241:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31241:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31240:25:6" + }, + "returnParameters": { + "id": 7630, + "nodeType": "ParameterList", + "parameters": [], + "src": "31332:0:6" + }, + "scope": 8454, + "src": "31212:398:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9406 + ], + "body": { + "id": 7706, + "nodeType": "Block", + "src": "31809:666:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7659, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "31828:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31847:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "31828:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7662, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "31850:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7658, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "31820:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "31820:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7664, + "nodeType": "ExpressionStatement", + "src": "31820:47:6" + }, + { + "assignments": [ + 7666 + ], + "declarations": [ + { + "constant": false, + "id": 7666, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7706, + "src": "31970:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7665, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "31970:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7672, + "initialValue": { + "baseExpression": { + "id": 7667, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "32009:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7671, + "indexExpression": { + "arguments": [ + { + "id": 7669, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32044:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7668, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "32018:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32018:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32009:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "31970:91:6" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7673, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7666, + "src": "32092:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7674, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "32092:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 7675, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "32111:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "32111:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "32092:34:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7679, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32160:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7681, + "indexExpression": { + "id": 7680, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32175:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32160:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7682, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32160:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7678, + "name": "isStateCommitted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6044, + "src": "32143:16:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32143:56:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "32092:107:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7705, + "nodeType": "IfStatement", + "src": "32074:394:6", + "trueBody": { + "id": 7704, + "nodeType": "Block", + "src": "32211:257:6", + "statements": [ + { + "expression": { + "id": 7696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7685, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32226:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7687, + "indexExpression": { + "id": 7686, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32241:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32226:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32226:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "baseExpression": { + "id": 7690, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32301:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7692, + "indexExpression": { + "id": 7691, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32316:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32301:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32301:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7694, + "name": "IDX_EXPIRE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5965, + "src": "32358:10:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7689, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "32267:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32267:116:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "32226:157:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7697, + "nodeType": "ExpressionStatement", + "src": "32226:157:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7699, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7654, + "src": "32428:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7700, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "32445:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "32445:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7698, + "name": "LogExpirationTriggered", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6311, + "src": "32405:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32405:51:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7703, + "nodeType": "EmitStatement", + "src": "32400:56:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7652, + "nodeType": "StructuredDocumentation", + "src": "31618:115:6", + "text": " @notice Mark voucher token as expired\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "d40ffcf8", + "id": 7707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerExpiration", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7656, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "31800:8:6" + }, + "parameters": { + "id": 7655, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7654, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7707, + "src": "31766:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7653, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "31766:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "31765:25:6" + }, + "returnParameters": { + "id": 7657, + "nodeType": "ParameterList", + "parameters": [], + "src": "31809:0:6" + }, + "scope": 8454, + "src": "31739:736:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9412 + ], + "body": { + "id": 7860, + "nodeType": "Block", + "src": "32688:2186:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7715, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32707:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 7716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32726:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "32707:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 7718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32729:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 7714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32699:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32699:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7720, + "nodeType": "ExpressionStatement", + "src": "32699:47:6" + }, + { + "assignments": [ + 7722 + ], + "declarations": [ + { + "constant": false, + "id": 7722, + "mutability": "mutable", + "name": "tStatus", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "32849:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 7721, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "32849:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 7727, + "initialValue": { + "expression": { + "baseExpression": { + "id": 7723, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "32865:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7725, + "indexExpression": { + "id": 7724, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "32880:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "32865:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "32865:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "32849:54:6" + }, + { + "expression": { + "arguments": [ + { + "id": 7733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "32924:29:6", + "subExpression": { + "arguments": [ + { + "id": 7730, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "32934:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7731, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "32943:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7729, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "32925:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32925:28:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "414c52454144595f46494e414c495a4544", + "id": 7734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "32955:19:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + }, + "value": "ALREADY_FINALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a84b963af821bd2b41d802daa2c7840123c5cf834cde12aa10bdce75ff0df2d9", + "typeString": "literal_string \"ALREADY_FINALIZED\"" + } + ], + "id": 7728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "32916:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "32916:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7736, + "nodeType": "ExpressionStatement", + "src": "32916:59:6" + }, + { + "assignments": [ + 7738 + ], + "declarations": [ + { + "constant": false, + "id": 7738, + "mutability": "mutable", + "name": "mark", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33070:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 7737, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "33070:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "id": 7739, + "nodeType": "VariableDeclarationStatement", + "src": "33070:9:6" + }, + { + "assignments": [ + 7741 + ], + "declarations": [ + { + "constant": false, + "id": 7741, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 7860, + "src": "33090:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 7740, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "33090:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 7747, + "initialValue": { + "baseExpression": { + "id": 7742, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "33129:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7746, + "indexExpression": { + "arguments": [ + { + "id": 7744, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33164:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7743, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "33138:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 7745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33138:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33129:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "33090:91:6" + }, + { + "condition": { + "arguments": [ + { + "id": 7749, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33207:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7750, + "name": "IDX_COMPLAIN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5968, + "src": "33216:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7748, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33198:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33198:31:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7779, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7780, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33717:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7778, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33699:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33699:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7782, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33751:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33751:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7784, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33783:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7786, + "indexExpression": { + "id": 7785, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33798:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33783:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "33783:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7788, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "33837:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33783:68:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33751:100:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33699:152:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 7803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7798, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34005:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7797, + "name": "isStateRedemptionSigned", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6063, + "src": "33981:23:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33981:32:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 7801, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34033:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7800, + "name": "isStateRefunded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6082, + "src": "34017:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34017:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "33981:60:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "arguments": [ + { + "id": 7821, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34408:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7820, + "name": "isStateExpired", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6101, + "src": "34393:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8) pure returns (bool)" + } + }, + "id": 7822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34393:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7837, + "nodeType": "IfStatement", + "src": "34389:237:6", + "trueBody": { + "id": 7836, + "nodeType": "Block", + "src": "34418:208:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7823, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34515:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7825, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7741, + "src": "34534:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 7826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "34534:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7827, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34553:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34534:33:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34515:52:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7835, + "nodeType": "IfStatement", + "src": "34511:104:6", + "trueBody": { + "id": 7834, + "nodeType": "Block", + "src": "34569:46:6", + "statements": [ + { + "expression": { + "id": 7832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7830, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34588:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7831, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34595:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34588:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7833, + "nodeType": "ExpressionStatement", + "src": "34588:11:6" + } + ] + } + } + ] + } + }, + "id": 7838, + "nodeType": "IfStatement", + "src": "33963:663:6", + "trueBody": { + "id": 7819, + "nodeType": "Block", + "src": "34053:330:6", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7804, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "34185:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "34185:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7806, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34221:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7808, + "indexExpression": { + "id": 7807, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34236:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34221:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "34221:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7810, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "34296:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34221:89:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "34185:125:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7818, + "nodeType": "IfStatement", + "src": "34163:209:6", + "trueBody": { + "id": 7817, + "nodeType": "Block", + "src": "34326:46:6", + "statements": [ + { + "expression": { + "id": 7815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7813, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34345:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "34352:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "34345:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7816, + "nodeType": "ExpressionStatement", + "src": "34345:11:6" + } + ] + } + } + ] + } + }, + "id": 7839, + "nodeType": "IfStatement", + "src": "33681:945:6", + "trueBody": { + "id": 7796, + "nodeType": "Block", + "src": "33863:94:6", + "statements": [ + { + "expression": { + "id": 7794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7792, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33934:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33941:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33934:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7795, + "nodeType": "ExpressionStatement", + "src": "33934:11:6" + } + ] + } + }, + "id": 7840, + "nodeType": "IfStatement", + "src": "33194:1432:6", + "trueBody": { + "id": 7777, + "nodeType": "Block", + "src": "33231:444:6", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 7753, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "33259:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7754, + "name": "IDX_CANCEL_FAULT", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5971, + "src": "33268:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7752, + "name": "isStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6121, + "src": "33250:8:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", + "typeString": "function (uint8,uint8) pure returns (bool)" + } + }, + "id": 7755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33250:35:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 7761, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "33411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 7762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "33411:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 7763, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "33447:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7765, + "indexExpression": { + "id": 7764, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "33462:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "33447:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "33447:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 7767, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "33525:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33447:95:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "33411:131:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7775, + "nodeType": "IfStatement", + "src": "33389:275:6", + "trueBody": { + "id": 7774, + "nodeType": "Block", + "src": "33558:106:6", + "statements": [ + { + "expression": { + "id": 7772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7770, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7771, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33644:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33637:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7773, + "nodeType": "ExpressionStatement", + "src": "33637:11:6" + } + ] + } + }, + "id": 7776, + "nodeType": "IfStatement", + "src": "33246:418:6", + "trueBody": { + "id": 7760, + "nodeType": "Block", + "src": "33287:96:6", + "statements": [ + { + "expression": { + "id": 7758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7756, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "33356:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 7757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "33363:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "33356:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7759, + "nodeType": "ExpressionStatement", + "src": "33356:11:6" + } + ] + } + } + ] + } + }, + { + "condition": { + "id": 7841, + "name": "mark", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7738, + "src": "34642:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7859, + "nodeType": "IfStatement", + "src": "34638:229:6", + "trueBody": { + "id": 7858, + "nodeType": "Block", + "src": "34648:219:6", + "statements": [ + { + "expression": { + "id": 7850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7842, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "34663:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 7844, + "indexExpression": { + "id": 7843, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34678:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "34663:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 7845, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "34663:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7847, + "name": "tStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7722, + "src": "34738:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 7848, + "name": "IDX_FINAL", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5974, + "src": "34764:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 7846, + "name": "determineStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6139, + "src": "34704:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_uint8_$", + "typeString": "function (uint8,uint8) pure returns (uint8)" + } + }, + "id": 7849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34704:84:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "34663:125:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 7851, + "nodeType": "ExpressionStatement", + "src": "34663:125:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7853, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7710, + "src": "34827:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7854, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "34844:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "34844:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7852, + "name": "LogFinalizeVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6317, + "src": "34808:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "34808:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7857, + "nodeType": "EmitStatement", + "src": "34803:52:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 7708, + "nodeType": "StructuredDocumentation", + "src": "32483:124:6", + "text": " @notice Mark voucher token to the final status\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "65c303bc", + "id": 7861, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "triggerFinalizeVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7712, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "32679:8:6" + }, + "parameters": { + "id": 7711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7710, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 7861, + "src": "32645:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "32645:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "32644:25:6" + }, + "returnParameters": { + "id": 7713, + "nodeType": "ParameterList", + "parameters": [], + "src": "32688:0:6" + }, + "scope": 8454, + "src": "32613:2261:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9420 + ], + "body": { + "id": 7885, + "nodeType": "Block", + "src": "35348:120:6", + "statements": [ + { + "assignments": [ + 7873 + ], + "declarations": [ + { + "constant": false, + "id": 7873, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 7885, + "src": "35359:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7872, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "35359:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 7877, + "initialValue": { + "baseExpression": { + "id": 7874, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "35380:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 7876, + "indexExpression": { + "id": 7875, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7864, + "src": "35394:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35380:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "35359:50:6" + }, + { + "expression": { + "id": 7883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "baseExpression": { + "id": 7878, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "35420:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 7880, + "indexExpression": { + "id": 7879, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7873, + "src": "35429:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "35420:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 7881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "35420:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7882, + "name": "_newSeller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7866, + "src": "35450:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35420:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7884, + "nodeType": "ExpressionStatement", + "src": "35420:40:6" + } + ] + }, + "documentation": { + "id": 7862, + "nodeType": "StructuredDocumentation", + "src": "34984:220:6", + "text": " @notice Set the address of the new holder of a _tokenIdSupply on transfer\n @param _tokenIdSupply _tokenIdSupply which will be transferred\n @param _newSeller new holder of the supply" + }, + "functionSelector": "88c25607", + "id": 7886, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7870, + "modifierName": { + "id": 7869, + "name": "onlyFromCashier", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6397, + "src": "35332:15:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35332:15:6" + } + ], + "name": "setSupplyHolderOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7868, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "35323:8:6" + }, + "parameters": { + "id": 7867, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7864, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35255:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7863, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "35255:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 7866, + "mutability": "mutable", + "name": "_newSeller", + "nodeType": "VariableDeclaration", + "scope": 7886, + "src": "35288:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35244:69:6" + }, + "returnParameters": { + "id": 7871, + "nodeType": "ParameterList", + "parameters": [], + "src": "35348:0:6" + }, + "scope": 8454, + "src": "35210:258:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 7914, + "nodeType": "Block", + "src": "35725:295:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7895, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35744:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35775:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "35767:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35767:7:6", + "typeDescriptions": {} + } + }, + "id": 7899, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35767:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "35744:33:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7901, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "35779:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7894, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "35736:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35736:65:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7903, + "nodeType": "ExpressionStatement", + "src": "35736:65:6" + }, + { + "expression": { + "id": 7906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7904, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "35904:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7905, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35925:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "35904:40:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7907, + "nodeType": "ExpressionStatement", + "src": "35904:40:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7909, + "name": "_bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7889, + "src": "35980:19:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7910, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36001:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36001:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7908, + "name": "LogBosonRouterSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "35962:17:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "35962:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7913, + "nodeType": "EmitStatement", + "src": "35957:55:6" + } + ] + }, + "documentation": { + "id": 7887, + "nodeType": "StructuredDocumentation", + "src": "35476:141:6", + "text": " @notice Set the address of the Boson Router contract\n @param _bosonRouterAddress The address of the BR contract" + }, + "functionSelector": "bd17de40", + "id": 7915, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7892, + "modifierName": { + "id": 7891, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "35710:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "35710:9:6" + } + ], + "name": "setBosonRouterAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7890, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7889, + "mutability": "mutable", + "name": "_bosonRouterAddress", + "nodeType": "VariableDeclaration", + "scope": 7915, + "src": "35654:27:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7888, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "35654:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "35653:29:6" + }, + "returnParameters": { + "id": 7893, + "nodeType": "ParameterList", + "parameters": [], + "src": "35725:0:6" + }, + "scope": 8454, + "src": "35623:397:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9432 + ], + "body": { + "id": 7944, + "nodeType": "Block", + "src": "36278:275:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7925, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36297:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36324:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "36316:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36316:7:6", + "typeDescriptions": {} + } + }, + "id": 7929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36316:10:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "36297:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f41444452455353", + "id": 7931, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "36328:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + }, + "value": "UNSPECIFIED_ADDRESS" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", + "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" + } + ], + "id": 7924, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "36289:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 7932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36289:61:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7933, + "nodeType": "ExpressionStatement", + "src": "36289:61:6" + }, + { + "expression": { + "id": 7936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7934, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "36453:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7935, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36470:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "36453:32:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 7937, + "nodeType": "ExpressionStatement", + "src": "36453:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7939, + "name": "_cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7918, + "src": "36517:15:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 7940, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "36534:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "36534:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7938, + "name": "LogCashierSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6329, + "src": "36503:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 7942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36503:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7943, + "nodeType": "EmitStatement", + "src": "36498:47:6" + } + ] + }, + "documentation": { + "id": 7916, + "nodeType": "StructuredDocumentation", + "src": "36028:132:6", + "text": " @notice Set the address of the Cashier contract\n @param _cashierAddress The address of the BR contract" + }, + "functionSelector": "c099a7c4", + "id": 7945, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7922, + "modifierName": { + "id": 7921, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36263:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36263:9:6" + } + ], + "name": "setCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7920, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36245:8:6" + }, + "parameters": { + "id": 7919, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7918, + "mutability": "mutable", + "name": "_cashierAddress", + "nodeType": "VariableDeclaration", + "scope": 7945, + "src": "36193:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7917, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "36193:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "36192:25:6" + }, + "returnParameters": { + "id": 7923, + "nodeType": "ParameterList", + "parameters": [], + "src": "36278:0:6" + }, + "scope": 8454, + "src": "36166:387:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9438 + ], + "body": { + "id": 7964, + "nodeType": "Block", + "src": "36927:122:6", + "statements": [ + { + "expression": { + "id": 7956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7954, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "36938:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7955, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "36955:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "36938:32:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7957, + "nodeType": "ExpressionStatement", + "src": "36938:32:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7959, + "name": "_complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7948, + "src": "37013:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37030:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37030:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7958, + "name": "LogComplainPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6335, + "src": "36988:24:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7962, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "36988:53:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7963, + "nodeType": "EmitStatement", + "src": "36983:58:6" + } + ] + }, + "documentation": { + "id": 7946, + "nodeType": "StructuredDocumentation", + "src": "36561:248:6", + "text": " @notice Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _complainPeriod the new value for complain period (in number of seconds)" + }, + "functionSelector": "8990834b", + "id": 7965, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7952, + "modifierName": { + "id": 7951, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "36912:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "36912:9:6" + } + ], + "name": "setComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7950, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "36894:8:6" + }, + "parameters": { + "id": 7949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7948, + "mutability": "mutable", + "name": "_complainPeriod", + "nodeType": "VariableDeclaration", + "scope": 7965, + "src": "36842:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7947, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "36842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "36841:25:6" + }, + "returnParameters": { + "id": 7953, + "nodeType": "ParameterList", + "parameters": [], + "src": "36927:0:6" + }, + "scope": 8454, + "src": "36815:234:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9426 + ], + "body": { + "id": 7984, + "nodeType": "Block", + "src": "37442:134:6", + "statements": [ + { + "expression": { + "id": 7976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 7974, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "37453:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 7975, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37473:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "37453:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 7977, + "nodeType": "ExpressionStatement", + "src": "37453:38:6" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7979, + "name": "_cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7968, + "src": "37537:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 7980, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "37557:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 7981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "37557:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 7978, + "name": "LogCancelFaultPeriodChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6341, + "src": "37509:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (uint256,address)" + } + }, + "id": 7982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "37509:59:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7983, + "nodeType": "EmitStatement", + "src": "37504:64:6" + } + ] + }, + "documentation": { + "id": 7966, + "nodeType": "StructuredDocumentation", + "src": "37057:261:6", + "text": " @notice Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes.\n @param _cancelFaultPeriod the new value for cancelOrFault period (in number of seconds)" + }, + "functionSelector": "ede80897", + "id": 7985, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 7972, + "modifierName": { + "id": 7971, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 12093, + "src": "37427:9:6", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "37427:9:6" + } + ], + "name": "setCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7970, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37409:8:6" + }, + "parameters": { + "id": 7969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7968, + "mutability": "mutable", + "name": "_cancelFaultPeriod", + "nodeType": "VariableDeclaration", + "scope": 7985, + "src": "37354:26:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7967, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37354:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37353:28:6" + }, + "returnParameters": { + "id": 7973, + "nodeType": "ParameterList", + "parameters": [], + "src": "37442:0:6" + }, + "scope": 8454, + "src": "37324:252:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9446 + ], + "body": { + "id": 7998, + "nodeType": "Block", + "src": "37936:43:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 7994, + "name": "promiseKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "37954:11:6", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 7996, + "indexExpression": { + "id": 7995, + "name": "_idx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7988, + "src": "37966:4:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "37954:17:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 7993, + "id": 7997, + "nodeType": "Return", + "src": "37947:24:6" + } + ] + }, + "documentation": { + "id": 7986, + "nodeType": "StructuredDocumentation", + "src": "37660:153:6", + "text": " @notice Get the promise ID at specific index\n @param _idx Index in the array of promise keys\n @return Promise ID" + }, + "functionSelector": "81dc8119", + "id": 7999, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseKey", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7990, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "37895:8:6" + }, + "parameters": { + "id": 7989, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7988, + "mutability": "mutable", + "name": "_idx", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37842:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7987, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "37842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "37841:14:6" + }, + "returnParameters": { + "id": 7993, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7992, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 7999, + "src": "37922:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 7991, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "37922:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "37921:9:6" + }, + "scope": 8454, + "src": "37819:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9488 + ], + "body": { + "id": 8012, + "nodeType": "Block", + "src": "38316:53:6", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8008, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8002, + "src": "38334:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "id": 8009, + "name": "MASK_TYPE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6239, + "src": "38352:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "38334:27:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8007, + "id": 8011, + "nodeType": "Return", + "src": "38327:34:6" + } + ] + }, + "documentation": { + "id": 8000, + "nodeType": "StructuredDocumentation", + "src": "37987:186:6", + "text": " @notice Get the supply token ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the supply token" + }, + "functionSelector": "1af2a6a8", + "id": 8013, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getIdSupplyFromVoucher", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8004, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38275:8:6" + }, + "parameters": { + "id": 8003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8002, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38211:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38210:25:6" + }, + "returnParameters": { + "id": 8007, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8006, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8013, + "src": "38302:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8005, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38302:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38301:9:6" + }, + "scope": 8454, + "src": "38179:190:6", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9496 + ], + "body": { + "id": 8042, + "nodeType": "Block", + "src": "38699:298:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 8023, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38718:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 8024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38737:1:6", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "38718:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "554e5350454349464945445f4944", + "id": 8026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "38740:16:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + }, + "value": "UNSPECIFIED_ID" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", + "typeString": "literal_string \"UNSPECIFIED_ID\"" + } + ], + "id": 8022, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "38710:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38710:47:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8028, + "nodeType": "ExpressionStatement", + "src": "38710:47:6" + }, + { + "assignments": [ + 8030 + ], + "declarations": [ + { + "constant": false, + "id": 8030, + "mutability": "mutable", + "name": "tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8042, + "src": "38860:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8029, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38860:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 8034, + "initialValue": { + "arguments": [ + { + "id": 8032, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8016, + "src": "38907:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8031, + "name": "getIdSupplyFromVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8013, + "src": "38884:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 8033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "38884:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "38860:63:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8035, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "38941:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8039, + "indexExpression": { + "baseExpression": { + "id": 8036, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "38950:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8038, + "indexExpression": { + "id": 8037, + "name": "tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8030, + "src": "38964:13:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38950:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "38941:38:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8040, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "38941:48:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8021, + "id": 8041, + "nodeType": "Return", + "src": "38934:55:6" + } + ] + }, + "documentation": { + "id": 8014, + "nodeType": "StructuredDocumentation", + "src": "38377:176:6", + "text": " @notice Get the promise ID from a voucher token\n @param _tokenIdVoucher ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "bc0d753d", + "id": 8043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromVoucherId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8018, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "38658:8:6" + }, + "parameters": { + "id": 8017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8016, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38594:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "38594:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "38593:25:6" + }, + "returnParameters": { + "id": 8021, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8020, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8043, + "src": "38685:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8019, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "38685:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "38684:9:6" + }, + "scope": 8454, + "src": "38559:438:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9518 + ], + "body": { + "id": 8062, + "nodeType": "Block", + "src": "39427:84:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8058, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8048, + "src": "39480:6:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 8059, + "name": "_tokenSupplyId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8046, + "src": "39488:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8055, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "39454:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8054, + "name": "IERC1155", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8894, + "src": "39445:8:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC1155_$8894_$", + "typeString": "type(contract IERC1155)" + } + }, + "id": 8056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:24:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC1155_$8894", + "typeString": "contract IERC1155" + } + }, + "id": 8057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 8862, + "src": "39445:34:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 8060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "39445:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8053, + "id": 8061, + "nodeType": "Return", + "src": "39438:65:6" + } + ] + }, + "documentation": { + "id": 8044, + "nodeType": "StructuredDocumentation", + "src": "39005:268:6", + "text": " @notice Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account\n @param _tokenSupplyId Token supply ID\n @param _owner holder of the Token Supply\n @return remaining quantity" + }, + "functionSelector": "e31a0079", + "id": 8063, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getRemQtyForSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39386:8:6" + }, + "parameters": { + "id": 8049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8046, + "mutability": "mutable", + "name": "_tokenSupplyId", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39307:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39307:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8048, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39331:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8047, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "39331:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "39306:40:6" + }, + "returnParameters": { + "id": 8053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8052, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8063, + "src": "39413:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39413:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39412:9:6" + }, + "scope": 8454, + "src": "39279:232:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9508 + ], + "body": { + "id": 8096, + "nodeType": "Block", + "src": "39947:229:6", + "statements": [ + { + "assignments": [ + 8077 + ], + "declarations": [ + { + "constant": false, + "id": 8077, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8096, + "src": "39958:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "39958:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8081, + "initialValue": { + "baseExpression": { + "id": 8078, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "39979:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8080, + "indexExpression": { + "id": 8079, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8066, + "src": "39993:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "39979:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "39958:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8082, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40041:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8084, + "indexExpression": { + "id": 8083, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40050:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40041:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8085, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40041:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8086, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40082:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8088, + "indexExpression": { + "id": 8087, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40091:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40082:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "40082:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8090, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40127:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8092, + "indexExpression": { + "id": 8091, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8077, + "src": "40136:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40127:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40127:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8094, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40026:142:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8075, + "id": 8095, + "nodeType": "Return", + "src": "40019:149:6" + } + ] + }, + "documentation": { + "id": 8064, + "nodeType": "StructuredDocumentation", + "src": "39519:227:6", + "text": " @notice Get all necessary funds for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + }, + "functionSelector": "d887b4e7", + "id": 8097, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8068, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "39838:8:6" + }, + "parameters": { + "id": 8067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8066, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39775:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39775:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39774:24:6" + }, + "returnParameters": { + "id": 8075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8070, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39879:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39879:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8072, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39901:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8071, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39901:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8074, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8097, + "src": "39923:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8073, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "39923:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "39864:77:6" + }, + "scope": 8454, + "src": "39752:424:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9472 + ], + "body": { + "id": 8124, + "nodeType": "Block", + "src": "40558:147:6", + "statements": [ + { + "assignments": [ + 8109 + ], + "declarations": [ + { + "constant": false, + "id": 8109, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8124, + "src": "40569:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8108, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "40569:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8113, + "initialValue": { + "baseExpression": { + "id": 8110, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "40590:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8112, + "indexExpression": { + "id": 8111, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8100, + "src": "40604:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40590:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "40569:50:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8114, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8116, + "indexExpression": { + "id": 8115, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40647:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40638:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8117, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "price", + "nodeType": "MemberAccess", + "referencedDeclaration": 6182, + "src": "40638:26:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8118, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "40666:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8120, + "indexExpression": { + "id": 8119, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8109, + "src": "40675:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "40666:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8121, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositBu", + "nodeType": "MemberAccess", + "referencedDeclaration": 6186, + "src": "40666:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8122, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "40637:60:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "functionReturnParameters": 8107, + "id": 8123, + "nodeType": "Return", + "src": "40630:67:6" + } + ] + }, + "documentation": { + "id": 8098, + "nodeType": "StructuredDocumentation", + "src": "40184:227:6", + "text": " @notice Get Buyer costs required to make an order for a supply token\n @param _tokenIdSupply ID of the supply token\n @return returns a tuple (Payment amount, Buyer's deposit)" + }, + "functionSelector": "fad4ee94", + "id": 8125, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBuyerOrderCosts", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8102, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40508:8:6" + }, + "parameters": { + "id": 8101, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8100, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40445:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8099, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40445:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40444:24:6" + }, + "returnParameters": { + "id": 8107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8104, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40535:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40535:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8106, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8125, + "src": "40544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40534:18:6" + }, + "scope": 8454, + "src": "40417:288:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9480 + ], + "body": { + "id": 8145, + "nodeType": "Block", + "src": "41008:117:6", + "statements": [ + { + "assignments": [ + 8135 + ], + "declarations": [ + { + "constant": false, + "id": 8135, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8145, + "src": "41019:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8134, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41019:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8139, + "initialValue": { + "baseExpression": { + "id": 8136, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41040:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8138, + "indexExpression": { + "id": 8137, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8128, + "src": "41054:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41040:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41019:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8140, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41087:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8142, + "indexExpression": { + "id": 8141, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8135, + "src": "41096:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41087:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "depositSe", + "nodeType": "MemberAccess", + "referencedDeclaration": 6184, + "src": "41087:30:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8133, + "id": 8144, + "nodeType": "Return", + "src": "41080:37:6" + } + ] + }, + "documentation": { + "id": 8126, + "nodeType": "StructuredDocumentation", + "src": "40713:159:6", + "text": " @notice Get Seller deposit\n @param _tokenIdSupply ID of the supply token\n @return returns sellers deposit" + }, + "functionSelector": "88106323", + "id": 8146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSellerDeposit", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8130, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "40967:8:6" + }, + "parameters": { + "id": 8129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8128, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40904:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40904:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40903:24:6" + }, + "returnParameters": { + "id": 8133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8132, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8146, + "src": "40994:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8131, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "40994:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "40993:9:6" + }, + "scope": 8454, + "src": "40878:247:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9550 + ], + "body": { + "id": 8166, + "nodeType": "Block", + "src": "41487:114:6", + "statements": [ + { + "assignments": [ + 8156 + ], + "declarations": [ + { + "constant": false, + "id": 8156, + "mutability": "mutable", + "name": "promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8166, + "src": "41498:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8155, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41498:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 8160, + "initialValue": { + "baseExpression": { + "id": 8157, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "41519:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8159, + "indexExpression": { + "id": 8158, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8149, + "src": "41533:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41519:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41498:50:6" + }, + { + "expression": { + "expression": { + "baseExpression": { + "id": 8161, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "41566:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8163, + "indexExpression": { + "id": 8162, + "name": "promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8156, + "src": "41575:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "41566:20:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "id": 8164, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "seller", + "nodeType": "MemberAccess", + "referencedDeclaration": 6176, + "src": "41566:27:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8154, + "id": 8165, + "nodeType": "Return", + "src": "41559:34:6" + } + ] + }, + "documentation": { + "id": 8147, + "nodeType": "StructuredDocumentation", + "src": "41133:219:6", + "text": " @notice Get the holder of a supply\n @param _tokenIdSupply ID of the order (aka VoucherSet) which is mapped to the corresponding Promise.\n @return Address of the holder" + }, + "functionSelector": "1f38585f", + "id": 8167, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getSupplyHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8151, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41446:8:6" + }, + "parameters": { + "id": 8150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8149, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41383:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8148, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41382:24:6" + }, + "returnParameters": { + "id": 8154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8167, + "src": "41473:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8152, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "41473:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "41472:9:6" + }, + "scope": 8454, + "src": "41358:243:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9628 + ], + "body": { + "id": 8202, + "nodeType": "Block", + "src": "41981:173:6", + "statements": [ + { + "assignments": [ + 8185 + ], + "declarations": [ + { + "constant": false, + "id": 8185, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8202, + "src": "41992:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8184, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "41992:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8189, + "initialValue": { + "baseExpression": { + "id": 8186, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "42018:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8188, + "indexExpression": { + "id": 8187, + "name": "_promiseKey", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8170, + "src": "42027:11:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42018:21:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "41992:47:6" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 8190, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42058:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "promiseId", + "nodeType": "MemberAccess", + "referencedDeclaration": 6172, + "src": "42058:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "expression": { + "id": 8192, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42078:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8193, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nonce", + "nodeType": "MemberAccess", + "referencedDeclaration": 6174, + "src": "42078:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8194, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42094:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8195, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "42094:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8196, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42114:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8197, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "42114:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 8198, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8185, + "src": "42132:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8199, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "idx", + "nodeType": "MemberAccess", + "referencedDeclaration": 6188, + "src": "42132:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8200, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42057:88:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(bytes32,uint256,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 8183, + "id": 8201, + "nodeType": "Return", + "src": "42050:95:6" + } + ] + }, + "documentation": { + "id": 8168, + "nodeType": "StructuredDocumentation", + "src": "41609:202:6", + "text": " @notice Get promise data not retrieved by other accessor functions\n @param _promiseKey ID of the promise\n @return promise data not returned by other accessor methods" + }, + "functionSelector": "a1e5e3f9", + "id": 8203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseData", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8172, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "41903:8:6" + }, + "parameters": { + "id": 8171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8170, + "mutability": "mutable", + "name": "_promiseKey", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41841:19:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8169, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "41840:21:6" + }, + "returnParameters": { + "id": 8183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8174, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41930:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8173, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "41930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8176, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41939:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41939:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8178, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41948:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8177, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41948:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8180, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41957:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41957:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8182, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8203, + "src": "41966:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8181, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "41966:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "41929:46:6" + }, + "scope": 8454, + "src": "41817:337:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9542 + ], + "body": { + "id": 8242, + "nodeType": "Block", + "src": "42590:354:6", + "statements": [ + { + "expression": { + "components": [ + { + "expression": { + "baseExpression": { + "id": 8220, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42623:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8222, + "indexExpression": { + "id": 8221, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42638:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42623:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "status", + "nodeType": "MemberAccess", + "referencedDeclaration": 6019, + "src": "42623:38:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "expression": { + "baseExpression": { + "id": 8224, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42676:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8226, + "indexExpression": { + "id": 8225, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42691:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42676:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "42676:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8228, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42740:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8230, + "indexExpression": { + "id": 8229, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42755:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42740:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "42740:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "expression": { + "baseExpression": { + "id": 8232, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42805:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8234, + "indexExpression": { + "id": 8233, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42820:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42805:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8235, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "complainPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6025, + "src": "42805:51:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "baseExpression": { + "id": 8236, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "42871:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8238, + "indexExpression": { + "id": 8237, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8206, + "src": "42886:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "42871:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "cancelFaultPeriodStart", + "nodeType": "MemberAccess", + "referencedDeclaration": 6027, + "src": "42871:54:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 8240, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "42608:328:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint8,bool,bool,uint256,uint256)" + } + }, + "functionReturnParameters": 8219, + "id": 8241, + "nodeType": "Return", + "src": "42601:335:6" + } + ] + }, + "documentation": { + "id": 8204, + "nodeType": "StructuredDocumentation", + "src": "42162:187:6", + "text": " @notice Get the current status of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Status of the voucher (via enum)" + }, + "functionSelector": "325a7a84", + "id": 8243, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherStatus", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "42445:8:6" + }, + "parameters": { + "id": 8207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8206, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42381:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8205, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42381:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42380:25:6" + }, + "returnParameters": { + "id": 8219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8210, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42486:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8209, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "42486:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8212, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42506:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8211, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42506:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42525:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "42525:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8216, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42544:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 8218, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8243, + "src": "42566:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "42566:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "42471:113:6" + }, + "scope": 8454, + "src": "42355:589:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9558 + ], + "body": { + "id": 8259, + "nodeType": "Block", + "src": "43257:74:6", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 8256, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8246, + "src": "43307:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 8253, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "43283:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 8252, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9231, + "src": "43275:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$9231_$", + "typeString": "type(contract IERC721)" + } + }, + "id": 8254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:23:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721_$9231", + "typeString": "contract IERC721" + } + }, + "id": 8255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 9164, + "src": "43275:31:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view external returns (address)" + } + }, + "id": 8257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "43275:48:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8251, + "id": 8258, + "nodeType": "Return", + "src": "43268:55:6" + } + ] + }, + "documentation": { + "id": 8244, + "nodeType": "StructuredDocumentation", + "src": "42952:168:6", + "text": " @notice Get the holder of a voucher\n @param _tokenIdVoucher ID of the voucher token\n @return Address of the holder" + }, + "functionSelector": "f75951ce", + "id": 8260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherHolder", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8248, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43216:8:6" + }, + "parameters": { + "id": 8247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8246, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43152:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43152:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43151:25:6" + }, + "returnParameters": { + "id": 8251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8250, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8260, + "src": "43243:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43243:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43242:9:6" + }, + "scope": 8454, + "src": "43126:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9454 + ], + "body": { + "id": 8274, + "nodeType": "Block", + "src": "43692:74:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8269, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "43710:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8271, + "indexExpression": { + "id": 8270, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8263, + "src": "43725:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "43710:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8272, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenPrice", + "nodeType": "MemberAccess", + "referencedDeclaration": 6193, + "src": "43710:48:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8268, + "id": 8273, + "nodeType": "Return", + "src": "43703:55:6" + } + ] + }, + "documentation": { + "id": 8261, + "nodeType": "StructuredDocumentation", + "src": "43339:213:6", + "text": " @notice Get the address of the token where the price for the supply is held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "e875a613", + "id": 8275, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPriceToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8265, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "43651:8:6" + }, + "parameters": { + "id": 8264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8263, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43588:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "43588:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "43587:24:6" + }, + "returnParameters": { + "id": 8268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8267, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8275, + "src": "43678:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8266, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "43678:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "43677:9:6" + }, + "scope": 8454, + "src": "43558:208:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9462 + ], + "body": { + "id": 8289, + "nodeType": "Block", + "src": "44133:77:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8284, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44151:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8286, + "indexExpression": { + "id": 8285, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8278, + "src": "44166:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44151:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "addressTokenDeposits", + "nodeType": "MemberAccess", + "referencedDeclaration": 6195, + "src": "44151:51:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8283, + "id": 8288, + "nodeType": "Return", + "src": "44144:58:6" + } + ] + }, + "documentation": { + "id": 8276, + "nodeType": "StructuredDocumentation", + "src": "43774:217:6", + "text": " @notice Get the address of the token where the deposits for the supply are held\n @param _tokenIdSupply ID of the voucher supply token\n @return Address of the token" + }, + "functionSelector": "9a751bbd", + "id": 8290, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherDepositToken", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8280, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44092:8:6" + }, + "parameters": { + "id": 8279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8278, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44029:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44029:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44028:24:6" + }, + "returnParameters": { + "id": 8283, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8282, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8290, + "src": "44119:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "44119:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "44118:9:6" + }, + "scope": 8454, + "src": "43997:213:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9526 + ], + "body": { + "id": 8304, + "nodeType": "Block", + "src": "44553:70:6", + "statements": [ + { + "expression": { + "expression": { + "baseExpression": { + "id": 8299, + "name": "paymentDetails", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "44571:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherPaymentMethod_$6196_storage_$", + "typeString": "mapping(uint256 => struct VoucherKernel.VoucherPaymentMethod storage ref)" + } + }, + "id": 8301, + "indexExpression": { + "id": 8300, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8293, + "src": "44586:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "44571:30:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherPaymentMethod_$6196_storage", + "typeString": "struct VoucherKernel.VoucherPaymentMethod storage ref" + } + }, + "id": 8302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "paymentMethod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6191, + "src": "44571:44:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 8298, + "id": 8303, + "nodeType": "Return", + "src": "44564:51:6" + } + ] + }, + "documentation": { + "id": 8291, + "nodeType": "StructuredDocumentation", + "src": "44218:194:6", + "text": " @notice Get the payment method for a particular _tokenIdSupply\n @param _tokenIdSupply ID of the voucher supply token\n @return payment method" + }, + "functionSelector": "1cf7955d", + "id": 8305, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVoucherPaymentMethod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8295, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44514:8:6" + }, + "parameters": { + "id": 8294, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8293, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44451:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44451:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44450:24:6" + }, + "returnParameters": { + "id": 8298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8297, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8305, + "src": "44541:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 8296, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "44541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "44540:7:6" + }, + "scope": 8454, + "src": "44418:205:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9566 + ], + "body": { + "id": 8342, + "nodeType": "Block", + "src": "44943:493:6", + "statements": [ + { + "assignments": [ + 8315 + ], + "declarations": [ + { + "constant": false, + "id": 8315, + "mutability": "mutable", + "name": "tPromise", + "nodeType": "VariableDeclaration", + "scope": 8342, + "src": "44987:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise" + }, + "typeName": { + "id": 8314, + "name": "Promise", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6189, + "src": "44987:7:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage_ptr", + "typeString": "struct VoucherKernel.Promise" + } + }, + "visibility": "internal" + } + ], + "id": 8321, + "initialValue": { + "baseExpression": { + "id": 8316, + "name": "promises", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6204, + "src": "45026:8:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Promise_$6189_storage_$", + "typeString": "mapping(bytes32 => struct VoucherKernel.Promise storage ref)" + } + }, + "id": 8320, + "indexExpression": { + "arguments": [ + { + "id": 8318, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8308, + "src": "45061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 8317, + "name": "getPromiseIdFromVoucherId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8043, + "src": "45035:25:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (uint256) view returns (bytes32)" + } + }, + "id": 8319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45035:42:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45026:52:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_storage", + "typeString": "struct VoucherKernel.Promise storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "44987:91:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8323, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45097:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 6178, + "src": "45097:18:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "expression": { + "id": 8325, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45119:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45119:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45097:37:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f46524f4d", + "id": 8328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45136:23:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + }, + "value": "INVALID_VALIDITY_FROM" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3dfff879e12777f3cf58c41b18ee8a2fc08a4e09036528922690b3441120a816", + "typeString": "literal_string \"INVALID_VALIDITY_FROM\"" + } + ], + "id": 8322, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45089:71:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8330, + "nodeType": "ExpressionStatement", + "src": "45089:71:6" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 8336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 8332, + "name": "tPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8315, + "src": "45262:8:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Promise_$6189_memory_ptr", + "typeString": "struct VoucherKernel.Promise memory" + } + }, + "id": 8333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "validTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6180, + "src": "45262:16:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 8334, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "45282:5:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 8335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "45282:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "45262:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "494e56414c49445f56414c49444954595f544f", + "id": 8337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45299:21:6", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + }, + "value": "INVALID_VALIDITY_TO" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_220023f3504a4654cffd768699d4a42a97da0536598d777263f15799e2323f90", + "typeString": "literal_string \"INVALID_VALIDITY_TO\"" + } + ], + "id": 8331, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "45254:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 8338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "45254:67:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 8339, + "nodeType": "ExpressionStatement", + "src": "45254:67:6" + }, + { + "expression": { + "hexValue": "74727565", + "id": 8340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "45424:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 8313, + "id": 8341, + "nodeType": "Return", + "src": "45417:11:6" + } + ] + }, + "documentation": { + "id": 8306, + "nodeType": "StructuredDocumentation", + "src": "44631:176:6", + "text": " @notice Checks whether a voucher is in valid period for redemption (between start date and end date)\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "9a0271e1", + "id": 8343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isInValidityPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8310, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "44905:8:6" + }, + "parameters": { + "id": 8309, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8308, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44841:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "44841:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "44840:25:6" + }, + "returnParameters": { + "id": 8313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8312, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8343, + "src": "44932:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8311, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "44932:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "44931:6:6" + }, + "scope": 8454, + "src": "44813:623:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9574 + ], + "body": { + "id": 8364, + "nodeType": "Block", + "src": "45806:162:6", + "statements": [ + { + "expression": { + "id": 8362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "45837:123:6", + "subExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 8360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "baseExpression": { + "id": 8352, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45839:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8354, + "indexExpression": { + "id": 8353, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45854:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45839:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isPaymentReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6021, + "src": "45839:49:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "expression": { + "baseExpression": { + "id": 8356, + "name": "vouchersStatus", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "45909:14:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_VoucherStatus_$6028_storage_$", + "typeString": "mapping(uint256 => struct UsingHelpers.VoucherStatus storage ref)" + } + }, + "id": 8358, + "indexExpression": { + "id": 8357, + "name": "_tokenIdVoucher", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8346, + "src": "45924:15:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "45909:31:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_VoucherStatus_$6028_storage", + "typeString": "struct UsingHelpers.VoucherStatus storage ref" + } + }, + "id": 8359, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDepositsReleased", + "nodeType": "MemberAccess", + "referencedDeclaration": 6023, + "src": "45909:50:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "45839:120:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 8361, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "45838:122:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 8351, + "id": 8363, + "nodeType": "Return", + "src": "45817:143:6" + } + ] + }, + "documentation": { + "id": 8344, + "nodeType": "StructuredDocumentation", + "src": "45444:223:6", + "text": " @notice Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred\n @param _tokenIdVoucher ID of the voucher token" + }, + "functionSelector": "5b479d1a", + "id": 8365, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isVoucherTransferable", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8348, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "45768:8:6" + }, + "parameters": { + "id": 8347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8346, + "mutability": "mutable", + "name": "_tokenIdVoucher", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45704:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "45704:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "45703:25:6" + }, + "returnParameters": { + "id": 8351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8350, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8365, + "src": "45795:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 8349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "45795:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "45794:6:6" + }, + "scope": 8454, + "src": "45673:295:6", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 9580 + ], + "body": { + "id": 8374, + "nodeType": "Block", + "src": "46241:44:6", + "statements": [ + { + "expression": { + "id": 8372, + "name": "bosonRouterAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6198, + "src": "46259:18:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8371, + "id": 8373, + "nodeType": "Return", + "src": "46252:25:6" + } + ] + }, + "documentation": { + "id": 8366, + "nodeType": "StructuredDocumentation", + "src": "45976:143:6", + "text": " @notice Get address of the Boson Router to which this contract points\n @return Address of the Boson Router contract" + }, + "functionSelector": "97f9e52a", + "id": 8375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBosonRouterAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8368, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46199:8:6" + }, + "parameters": { + "id": 8367, + "nodeType": "ParameterList", + "parameters": [], + "src": "46155:2:6" + }, + "returnParameters": { + "id": 8371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8370, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8375, + "src": "46226:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8369, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46226:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46225:9:6" + }, + "scope": 8454, + "src": "46125:160:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9586 + ], + "body": { + "id": 8384, + "nodeType": "Block", + "src": "46552:40:6", + "statements": [ + { + "expression": { + "id": 8382, + "name": "cashierAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6200, + "src": "46570:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8381, + "id": 8383, + "nodeType": "Return", + "src": "46563:21:6" + } + ] + }, + "documentation": { + "id": 8376, + "nodeType": "StructuredDocumentation", + "src": "46293:142:6", + "text": " @notice Get address of the Cashier contract to which this contract points\n @return Address of the Cashier contract" + }, + "functionSelector": "f9d93099", + "id": 8385, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCashierAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8378, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46511:8:6" + }, + "parameters": { + "id": 8377, + "nodeType": "ParameterList", + "parameters": [], + "src": "46467:2:6" + }, + "returnParameters": { + "id": 8381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8385, + "src": "46538:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8379, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46538:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46537:9:6" + }, + "scope": 8454, + "src": "46441:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9594 + ], + "body": { + "id": 8398, + "nodeType": "Block", + "src": "46870:46:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8394, + "name": "tokenNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6208, + "src": "46888:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 8396, + "indexExpression": { + "id": 8395, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8388, + "src": "46900:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "46888:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8393, + "id": 8397, + "nodeType": "Return", + "src": "46881:27:6" + } + ] + }, + "documentation": { + "id": 8386, + "nodeType": "StructuredDocumentation", + "src": "46600:141:6", + "text": " @notice Get the token nonce for a seller\n @param _seller Address of the seller\n @return The seller's nonce" + }, + "functionSelector": "ea5416a5", + "id": 8399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokenNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8390, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "46828:8:6" + }, + "parameters": { + "id": 8389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8388, + "mutability": "mutable", + "name": "_seller", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46770:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "46770:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "46769:17:6" + }, + "returnParameters": { + "id": 8393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8392, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8399, + "src": "46855:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "46855:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "46854:9:6" + }, + "scope": 8454, + "src": "46747:169:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9600 + ], + "body": { + "id": 8408, + "nodeType": "Block", + "src": "47109:32:6", + "statements": [ + { + "expression": { + "id": 8406, + "name": "typeId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6253, + "src": "47127:6:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8405, + "id": 8407, + "nodeType": "Return", + "src": "47120:13:6" + } + ] + }, + "documentation": { + "id": 8400, + "nodeType": "StructuredDocumentation", + "src": "46924:76:6", + "text": " @notice Get the current type Id\n @return type Id" + }, + "functionSelector": "911e3f46", + "id": 8409, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTypeId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8402, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47068:8:6" + }, + "parameters": { + "id": 8401, + "nodeType": "ParameterList", + "parameters": [], + "src": "47024:2:6" + }, + "returnParameters": { + "id": 8405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8404, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8409, + "src": "47095:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47095:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47094:9:6" + }, + "scope": 8454, + "src": "47006:135:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9606 + ], + "body": { + "id": 8418, + "nodeType": "Block", + "src": "47350:40:6", + "statements": [ + { + "expression": { + "id": 8416, + "name": "complainPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6255, + "src": "47368:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8415, + "id": 8417, + "nodeType": "Return", + "src": "47361:21:6" + } + ] + }, + "documentation": { + "id": 8410, + "nodeType": "StructuredDocumentation", + "src": "47149:84:6", + "text": " @notice Get the complain period\n @return complain period" + }, + "functionSelector": "065ef53e", + "id": 8419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getComplainPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8412, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47309:8:6" + }, + "parameters": { + "id": 8411, + "nodeType": "ParameterList", + "parameters": [], + "src": "47265:2:6" + }, + "returnParameters": { + "id": 8415, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8414, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8419, + "src": "47336:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47336:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47335:9:6" + }, + "scope": 8454, + "src": "47239:151:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9612 + ], + "body": { + "id": 8428, + "nodeType": "Block", + "src": "47616:43:6", + "statements": [ + { + "expression": { + "id": 8426, + "name": "cancelFaultPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "47634:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 8425, + "id": 8427, + "nodeType": "Return", + "src": "47627:24:6" + } + ] + }, + "documentation": { + "id": 8420, + "nodeType": "StructuredDocumentation", + "src": "47398:98:6", + "text": " @notice Get the cancel or fault period\n @return cancel or fault period" + }, + "functionSelector": "92924d85", + "id": 8429, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCancelFaultPeriod", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8422, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47575:8:6" + }, + "parameters": { + "id": 8421, + "nodeType": "ParameterList", + "parameters": [], + "src": "47531:2:6" + }, + "returnParameters": { + "id": 8425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8424, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8429, + "src": "47602:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47602:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47601:9:6" + }, + "scope": 8454, + "src": "47502:157:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9636 + ], + "body": { + "id": 8442, + "nodeType": "Block", + "src": "47992:55:6", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 8438, + "name": "ordersPromise", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "48010:13:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_bytes32_$", + "typeString": "mapping(uint256 => bytes32)" + } + }, + "id": 8440, + "indexExpression": { + "id": 8439, + "name": "_tokenIdSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8432, + "src": "48024:14:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "48010:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 8437, + "id": 8441, + "nodeType": "Return", + "src": "48003:36:6" + } + ] + }, + "documentation": { + "id": 8430, + "nodeType": "StructuredDocumentation", + "src": "47672:173:6", + "text": " @notice Get the promise ID from a voucher set\n @param _tokenIdSupply ID of the voucher token\n @return ID of the promise" + }, + "functionSelector": "46aee52e", + "id": 8443, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getPromiseIdFromSupplyId", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8434, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "47950:8:6" + }, + "parameters": { + "id": 8433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8432, + "mutability": "mutable", + "name": "_tokenIdSupply", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47885:22:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 8431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "47885:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "47884:24:6" + }, + "returnParameters": { + "id": 8437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8443, + "src": "47977:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 8435, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "47977:7:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "47976:9:6" + }, + "scope": 8454, + "src": "47851:196:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 9642 + ], + "body": { + "id": 8452, + "nodeType": "Block", + "src": "48302:40:6", + "statements": [ + { + "expression": { + "id": 8450, + "name": "tokensContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6170, + "src": "48320:14:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 8449, + "id": 8451, + "nodeType": "Return", + "src": "48313:21:6" + } + ] + }, + "documentation": { + "id": 8444, + "nodeType": "StructuredDocumentation", + "src": "48055:120:6", + "text": " @notice Get the address of ERC1155ERC721 contract\n @return Address of ERC1155ERC721 contract" + }, + "functionSelector": "c98d9b83", + "id": 8453, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokensContractAddress", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 8446, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "48261:8:6" + }, + "parameters": { + "id": 8445, + "nodeType": "ParameterList", + "parameters": [], + "src": "48214:2:6" + }, + "returnParameters": { + "id": 8449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8448, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 8453, + "src": "48288:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 8447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "48288:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "48287:9:6" + }, + "scope": 8454, + "src": "48181:161:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 8455, + "src": "1169:47176:6" + } + ], + "src": "49:48298:6" + }, + "compiler": { + "name": "solc", + "version": "0.7.1+commit.f4a555be.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + } + }, + "links": {}, + "address": "0x374d7a42F86A6a5Ce864bbA462999aCccf9750E3", + "transactionHash": "0x16297c4fc5662415b53d6d2ff8c0aa3c53378e7d3af36ed78b5964d972924849" + }, + "5777": { + "events": { + "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newBosonRouter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogBosonRouterSet", + "type": "event", + "signature": "0xac81fe7dd460bb5162a4a7d8fb92a13bd2baf450914fc6b1c4cc3180eba55af0" + }, + "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newCancelFaultPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCancelFaultPeriodChanged", + "type": "event", + "signature": "0xff783d200775c8efda1ff912a95c6b9561e641cc8695e015340f06a5b3024f12" + }, + "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_newCashier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogCashierSet", + "type": "event", + "signature": "0xcd124a0a6c3182c7bb77b8052823a4bf7d0a4c90016ffc4d53b969f98d3f8b88" + }, + "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newComplainPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogComplainPeriodChanged", + "type": "event", + "signature": "0x08bf60d0e489e33912f3ba0f81f21c6f2ad2499a36dfebfb6cfbfefcc49f3cca" + }, + "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogExpirationTriggered", + "type": "event", + "signature": "0x0fbb6c447a631ca170fad3c540d76f932db4c444d82bc160f7e3eebc6a5f6740" + }, + "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_triggeredBy", + "type": "address" + } + ], + "name": "LogFinalizeVoucher", + "type": "event", + "signature": "0x28c953c622aa90e006382693080fb83e2add147a386446e0f24572c6b071adfa" + }, + "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_type", + "type": "uint8" + } + ], + "name": "LogFundsReleased", + "type": "event", + "signature": "0xf570ce8ad3bc67469a0b8e53a32bba1edd0105fc668c1278225660d2291cc554" + }, + "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validFrom", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_validTo", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_idx", + "type": "uint256" + } + ], + "name": "LogPromiseCreated", + "type": "event", + "signature": "0xc05e9e3de4c67624681fddccb848a2f81797e05e1c09faf702ed3c526a6660e0" + }, + "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherComplain", + "type": "event", + "signature": "0x0411cc6d1d8430de89b9f9fdd063617e55946cddb8538d3407f516882db59455" + }, + "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_correlationId", + "type": "uint256" + } + ], + "name": "LogVoucherDelivered", + "type": "event", + "signature": "0xce3b32c0b6a7ffab6dec7497bc73336faeb8e1b3b0b8dc7099699a3595f000a6" + }, + "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherFaultCancel", + "type": "event", + "signature": "0x125d1de9ad96c695c95a8de033058d2c00835a1e0cbf24b7fa3de72f603c8709" + }, + "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_holder", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_promiseId", + "type": "bytes32" + } + ], + "name": "LogVoucherRedeemed", + "type": "event", + "signature": "0x43a88bfc6f85aab9491c25f0ce50c4046d7cb7d4dc209b40914a2574d9855a5c" + }, + "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdVoucher", + "type": "uint256" + } + ], + "name": "LogVoucherRefunded", + "type": "event", + "signature": "0x66d163993c35c8d3a90f3fbce008096384de89ec441c60c9b9f79aaad36616ff" + }, + "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenIdSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_issuer", + "type": "address" + } + ], + "name": "LogVoucherSetFaultCancel", + "type": "event", + "signature": "0xd771b32487969df897bdfc40b573cff1c37f81bc0e62b60cacc027d0efd6d33f" + }, + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event", + "signature": "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" + }, + "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event", + "signature": "0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258" + }, + "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event", + "signature": "0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa" + } + }, + "links": {}, + "address": "0x7589e53b8a55212Af8b3ad6ef5c31D9c02bFA25F", + "transactionHash": "0x1a2a3135e2b562ab632c96a5446871a701f7b0c338f60a8b87a4713c5e5ef3d9" + } + }, + "schemaVersion": "3.0.22", + "updatedAt": "2021-07-07T10:31:40.059Z", + "networkType": "ethereum", + "devdoc": { + "details": "Notes: - Since this is a reference app, it is not yet optimized. In the next phase, the bulk raw data will be packed into a single bytes32 field and/or pushed off-chain. - The usage of block.timestamp is honored since vouchers are defined currently with day-precision. See: https://ethereum.stackexchange.com/questions/5924/how-do-ethereum-mining-nodes-maintain-a-time-consistent-with-the-network/5931#5931", + "kind": "dev", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "details": "Token ID is derived following the same principles for both ERC-1155 and ERC-721", + "params": { + "_issuer": "The address of the token issuer", + "_qty": "qty that should be burned", + "_tokenIdSupply": "ID of the token type" + } + }, + "cancelOrFault(uint256,address)": { + "params": { + "_tokenIdVoucher": "ID of the voucher" + } + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "params": { + "_issuer": "owner of the voucher", + "_tokenIdSupply": "ID of the voucher set" + } + }, + "complain(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "params": { + "_paymentMethod": "might be ETHETH, ETHTKN, TKNETH or TKNTKN", + "_tokenDeposits": "token address which will hold the funds for the deposits of the voucher", + "_tokenIdSupply": "_tokenIdSupply of the voucher set this is related to", + "_tokenPrice": "token address which will hold the funds for the price of the voucher" + } + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "params": { + "_depositBu": "Buyer's deposit", + "_depositSe": "Seller's deposit", + "_price": "Price (payment amount)", + "_seller": "seller of the promise", + "_validFrom": "Start of valid period", + "_validTo": "End of valid period" + } + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "params": { + "_correlationId": "ID of the current interaction with the smart contract for a specific user", + "_holder": "Address of the recipient of the voucher (ERC-721)", + "_issuer": "Address of the token's issuer", + "_paymentMethod": "method being used for that particular order that needs to be fulfilled", + "_tokenIdSupply": "ID of the supply token (ERC-1155)" + } + }, + "getBosonRouterAddress()": { + "returns": { + "_0": "Address of the Boson Router contract" + } + }, + "getBuyerOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Buyer's deposit)" + } + }, + "getCancelFaultPeriod()": { + "returns": { + "_0": "cancel or fault period" + } + }, + "getCashierAddress()": { + "returns": { + "_0": "Address of the Cashier contract" + } + }, + "getComplainPeriod()": { + "returns": { + "_0": "complain period" + } + }, + "getIdSupplyFromVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the supply token" + } + }, + "getOrderCosts(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns a tuple (Payment amount, Seller's deposit, Buyer's deposit)" + } + }, + "getPromiseData(bytes32)": { + "params": { + "_promiseKey": "ID of the promise" + }, + "returns": { + "_0": "promise data not returned by other accessor methods" + } + }, + "getPromiseIdFromSupplyId(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseIdFromVoucherId(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "ID of the promise" + } + }, + "getPromiseKey(uint256)": { + "params": { + "_idx": "Index in the array of promise keys" + }, + "returns": { + "_0": "Promise ID" + } + }, + "getRemQtyForSupply(uint256,address)": { + "params": { + "_owner": "holder of the Token Supply", + "_tokenSupplyId": "Token supply ID" + }, + "returns": { + "_0": "remaining quantity" + } + }, + "getSellerDeposit(uint256)": { + "params": { + "_tokenIdSupply": "ID of the supply token" + }, + "returns": { + "_0": "returns sellers deposit" + } + }, + "getSupplyHolder(uint256)": { + "params": { + "_tokenIdSupply": "ID of the order (aka VoucherSet) which is mapped to the corresponding Promise." + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getTokenNonce(address)": { + "params": { + "_seller": "Address of the seller" + }, + "returns": { + "_0": "The seller's nonce" + } + }, + "getTokensContractAddress()": { + "returns": { + "_0": "Address of ERC1155ERC721 contract" + } + }, + "getTypeId()": { + "returns": { + "_0": "type Id" + } + }, + "getVoucherDepositToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherHolder(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Address of the holder" + } + }, + "getVoucherPaymentMethod(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "payment method" + } + }, + "getVoucherPriceToken(uint256)": { + "params": { + "_tokenIdSupply": "ID of the voucher supply token" + }, + "returns": { + "_0": "Address of the token" + } + }, + "getVoucherStatus(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + }, + "returns": { + "_0": "Status of the voucher (via enum)" + } + }, + "isInValidityPeriod(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "isVoucherTransferable(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "redeem(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "refund(uint256,address)": { + "params": { + "_msgSender": "account called the fn from the BR contract", + "_tokenIdVoucher": "ID of the voucher" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "setBosonRouterAddress(address)": { + "params": { + "_bosonRouterAddress": "The address of the BR contract" + } + }, + "setCancelFaultPeriod(uint256)": { + "params": { + "_cancelFaultPeriod": "the new value for cancelOrFault period (in number of seconds)" + } + }, + "setCashierAddress(address)": { + "params": { + "_cashierAddress": "The address of the BR contract" + } + }, + "setComplainPeriod(uint256)": { + "params": { + "_complainPeriod": "the new value for complain period (in number of seconds)" + } + }, + "setDepositsReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setPaymentReleased(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "params": { + "_newSeller": "new holder of the supply", + "_tokenIdSupply": "_tokenIdSupply which will be transferred" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "triggerExpiration(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + }, + "triggerFinalizeVoucher(uint256)": { + "params": { + "_tokenIdVoucher": "ID of the voucher token" + } + } + }, + "title": "VoucherKernel contract is controlling the core business logic", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "burnSupplyOnPause(address,uint256,uint256)": { + "notice": "Extract a standard non-fungible tokens ERC-721 from a supply stored in ERC-1155" + }, + "cancelOrFault(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, admitting to a fault or backing out of the deal" + }, + "cancelOrFaultVoucherSet(uint256,address)": { + "notice": "Cancel/Fault transaction by the Seller, cancelling the remaining uncommitted voucher set so that seller prevents buyers from committing to vouchers for items no longer in exchange." + }, + "complain(uint256,address)": { + "notice": "Issue a complain for a voucher" + }, + "createPaymentMethod(uint256,uint8,address,address)": { + "notice": "Creates a Payment method struct recording the details on how the seller requires to receive Price and Deposits for a certain Voucher Set." + }, + "createTokenSupplyID(address,uint256,uint256,uint256,uint256,uint256,uint256)": { + "notice": "Creating a new promise for goods or services. Can be reused, e.g. for making different batches of these (in the future)." + }, + "fillOrder(uint256,address,address,uint8,uint256)": { + "notice": "Fill Voucher Order, iff funds paid, then extract & mint NFT to the voucher holder" + }, + "getBosonRouterAddress()": { + "notice": "Get address of the Boson Router to which this contract points" + }, + "getBuyerOrderCosts(uint256)": { + "notice": "Get Buyer costs required to make an order for a supply token" + }, + "getCancelFaultPeriod()": { + "notice": "Get the cancel or fault period" + }, + "getCashierAddress()": { + "notice": "Get address of the Cashier contract to which this contract points" + }, + "getComplainPeriod()": { + "notice": "Get the complain period" + }, + "getIdSupplyFromVoucher(uint256)": { + "notice": "Get the supply token ID from a voucher token" + }, + "getOrderCosts(uint256)": { + "notice": "Get all necessary funds for a supply token" + }, + "getPromiseData(bytes32)": { + "notice": "Get promise data not retrieved by other accessor functions" + }, + "getPromiseIdFromSupplyId(uint256)": { + "notice": "Get the promise ID from a voucher set" + }, + "getPromiseIdFromVoucherId(uint256)": { + "notice": "Get the promise ID from a voucher token" + }, + "getPromiseKey(uint256)": { + "notice": "Get the promise ID at specific index" + }, + "getRemQtyForSupply(uint256,address)": { + "notice": "Get the remaining quantity left in supply of tokens (e.g ERC-721 left in ERC-1155) of an account" + }, + "getSellerDeposit(uint256)": { + "notice": "Get Seller deposit" + }, + "getSupplyHolder(uint256)": { + "notice": "Get the holder of a supply" + }, + "getTokenNonce(address)": { + "notice": "Get the token nonce for a seller" + }, + "getTokensContractAddress()": { + "notice": "Get the address of ERC1155ERC721 contract" + }, + "getTypeId()": { + "notice": "Get the current type Id" + }, + "getVoucherDepositToken(uint256)": { + "notice": "Get the address of the token where the deposits for the supply are held" + }, + "getVoucherHolder(uint256)": { + "notice": "Get the holder of a voucher" + }, + "getVoucherPaymentMethod(uint256)": { + "notice": "Get the payment method for a particular _tokenIdSupply" + }, + "getVoucherPriceToken(uint256)": { + "notice": "Get the address of the token where the price for the supply is held" + }, + "getVoucherStatus(uint256)": { + "notice": "Get the current status of a voucher" + }, + "isInValidityPeriod(uint256)": { + "notice": "Checks whether a voucher is in valid period for redemption (between start date and end date)" + }, + "isVoucherTransferable(uint256)": { + "notice": "Checks whether a voucher is in valid state to be transferred. If either payments or deposits are released, voucher could not be transferred" + }, + "pause()": { + "notice": "Pause the process of interaction with voucherID's (ERC-721), in case of emergency. Only BR contract is in control of this function." + }, + "redeem(uint256,address)": { + "notice": "Redemption of the vouchers promise" + }, + "refund(uint256,address)": { + "notice": "Refunding a voucher" + }, + "setBosonRouterAddress(address)": { + "notice": "Set the address of the Boson Router contract" + }, + "setCancelFaultPeriod(uint256)": { + "notice": "Set the general cancelOrFault period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setCashierAddress(address)": { + "notice": "Set the address of the Cashier contract" + }, + "setComplainPeriod(uint256)": { + "notice": "Set the general complain period, should be used sparingly as it has significant consequences. Here done simply for demo purposes." + }, + "setDepositsReleased(uint256)": { + "notice": "Mark voucher token that the deposits were released" + }, + "setPaymentReleased(uint256)": { + "notice": "Mark voucher token that the payment was released" + }, + "setSupplyHolderOnTransfer(uint256,address)": { + "notice": "Set the address of the new holder of a _tokenIdSupply on transfer" + }, + "triggerExpiration(uint256)": { + "notice": "Mark voucher token as expired" + }, + "triggerFinalizeVoucher(uint256)": { + "notice": "Mark voucher token to the final status" + }, + "unpause()": { + "notice": "Unpause the process of interaction with voucherID's (ERC-721). Only BR contract is in control of this function." + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/external/lambdas/triggerWithdrawals/src/configs.js b/external/lambdas/triggerWithdrawals/src/configs.js new file mode 100644 index 00000000..865efa32 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/src/configs.js @@ -0,0 +1,45 @@ +const AWS = require('aws-sdk') +const region = "eu-west-2" +const sm = new AWS.SecretsManager({region}) +const ethers = require('ethers') + +const getSecrets = async (SecretId) => { + return await new Promise((resolve, reject) => { + sm.getSecretValue({SecretId}, (err, result) => { + if (err) reject(err) + else resolve(JSON.parse(result.SecretString)) + }) + }) +} + +const configs = { + local: () => { + throw new Error('Local run is expected to use config defined in a specific module') + }, + cloud: secrets => { + const apiUrl = secrets.apiurl; + + return { + VOUCHER_KERNEL_ADDRESS: secrets.voucherkerneladdress, + CASHIER_ADDRESS: secrets.cashieraddress, + EXECUTOR_PRIVATE_KEY: secrets.executorsecret, + API_URL: apiUrl, + ALL_VOUCHERS_URL: `${apiUrl}/vouchers/all`, + UPDATE_STATUS_URL: `${apiUrl}/vouchers/update-status-from-keepers`, + WITHDRAW_VOUCHER_URL: `${apiUrl}/payments/create-payment`, + GCLOUD_SECRET: secrets.gcloudsecret, + GAS_LIMIT: "6000000", + PROVIDER: ethers.getDefaultProvider(secrets.networkname, { + etherscan: secrets.etherscanapikey, + infura: secrets.infuraapikey, + }) + } + } +}; + +async function getConfigParams(SecretId, env) { + const secrets = env != 'local' ? await getSecrets(SecretId) : '' + return configs[env](secrets); +} + +module.exports = getConfigParams; diff --git a/external/lambdas/triggerWithdrawals/src/index.js b/external/lambdas/triggerWithdrawals/src/index.js new file mode 100644 index 00000000..e426a764 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/src/index.js @@ -0,0 +1,149 @@ +const ethers = require("ethers"); +const axios = require("axios").default; + +const getConfigParams = require('./configs') +const BN = ethers.BigNumber.from; + +const VoucherKernel = require("./abis/VoucherKernel.json"); +const Cashier = require("./abis/Cashier.json"); + +const utils = require("./utils"); + +exports.handler = async (config) => { + if (!config) { + config = await getConfigParams(process.env.SSM_SECRET, "cloud"); + } + const executor = new ethers.Wallet(config.EXECUTOR_PRIVATE_KEY, config.PROVIDER); + + axios.defaults.headers.common = { + Authorization: `Bearer ${config.GCLOUD_SECRET}`, + }; + + // Withdrawal process + await triggerWithdrawals(executor, config); + + const response = { + statusCode: 200, + body: `Withdrawals process was executed successfully!` + }; + + return response; +}; + +async function triggerWithdrawals(executor, config) { + let hasErrors = false; + let cashierContractExecutor = new ethers.Contract( + config.CASHIER_ADDRESS, + Cashier.abi, + executor + ); + let voucherKernelContractExecutor = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + let res; + + try { + res = await axios.get(config.ALL_VOUCHERS_URL); + } catch (e) { + console.log(`Error while getting all vouchers from the DB. Error: ${e}`); + } + + if ( + typeof res === "undefined" || + !Object.prototype.hasOwnProperty.call(res, "data") + ) + return; + + for (let i = 0; i < res.data.vouchers.length; i++) { + let voucher = res.data.vouchers[i]; + let voucherID = voucher._tokenIdVoucher; + let isPaymentAndDepositsReleased; + + if (!voucher.blockchainAnchored) { + console.log(`Voucher: ${voucherID} is not anchored on blockchain`); + continue; + } + + try { + let voucherStatus = await voucherKernelContractExecutor.getVoucherStatus( + voucherID + ); // (vouchersStatus[_tokenIdVoucher].status, vouchersStatus[_tokenIdVoucher].isPaymentReleased, vouchersStatus[_tokenIdVoucher].isDepositsReleased) + isPaymentAndDepositsReleased = voucherStatus[1] && voucherStatus[2]; + } catch (e) { + hasErrors = true; + console.log( + `Error while checking existing payments for a voucher from the DB. Error: ${e}` + ); + continue; + } + + if (isPaymentAndDepositsReleased) { + console.log( + `Voucher: ${voucherID} - a payment and deposits withdrawal completed ` + ); + continue; + } + + console.log(`Voucher: ${voucherID}. The withdraw process has started`); + + let txOrder; + let receipt; + + try { + txOrder = await cashierContractExecutor.withdraw(voucherID, { + gasLimit: config.GAS_LIMIT, + }); + receipt = await txOrder.wait(); + } catch (e) { + hasErrors = true; + console.log(`Error while executing withdraw process. Error: ${e}`); + continue; + } + + console.log(`Voucher: ${voucherID}. The withdraw process finished`); + + let events = await utils.findEventByName( + receipt, + "LogAmountDistribution", + "_tokenIdVoucher", + "_to", + "_payment", + "_type" + ); + + try { + if ( + Array.isArray(events) && + typeof events[0] === "object" && + Object.prototype.hasOwnProperty.call(events[0], "_tokenIdVoucher") + ) { + await sendPayments(config, events); + } + } catch (e) { + hasErrors = true; + console.log( + `Error while executing a create payment call to the backend . Error: ${e}` + ); + console.log(e); + } + + console.log(`Voucher: ${voucherID}. Database updated`); + } + + let infoMsg = hasErrors + ? "triggerWithdrawals function finished with errors" + : "triggerWithdrawals function finished successfully"; + + console.info(infoMsg); +} + +async function sendPayments(config, events) { + try { + await axios.post(config.WITHDRAW_VOUCHER_URL, events); + } catch (error) { + console.log(error); + } +} + diff --git a/external/lambdas/triggerWithdrawals/src/package.json b/external/lambdas/triggerWithdrawals/src/package.json new file mode 100644 index 00000000..86048ea7 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/src/package.json @@ -0,0 +1,15 @@ +{ + "name": "aws-lambda-functions", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "node -e \"(async () => console.log(await require('./index').handler({})))();\"" + }, + "dependencies": { + "@aws-sdk/client-s3": "^3.3.0", + "@aws-sdk/node-http-handler": "^3.3.0", + "aws-sdk": "^2.903.0", + "axios": "^0.20.0", + "ethers": "^5.0.14" + } +} diff --git a/external/lambdas/triggerWithdrawals/src/utils.js b/external/lambdas/triggerWithdrawals/src/utils.js new file mode 100644 index 00000000..3e0dadb6 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/src/utils.js @@ -0,0 +1,116 @@ +const ethers = require("ethers"); +const VoucherKernel = require("./abis/VoucherKernel.json"); + +const ONE = 1; + +const IDX_COMMIT = 7; +const IDX_REDEEM = 6; +const IDX_REFUND = 5; +const IDX_EXPIRE = 4; +const IDX_COMPLAIN = 3; +const IDX_CANCEL_FAULT = 2; +const IDX_FINAL = 1; + +async function findEventByName(txReceipt, eventName, ...eventFields) { + if (typeof txReceipt !== "object" || txReceipt === null) return; + + let eventsArr = []; + + for (const key in txReceipt.events) { + if ( + Object.prototype.hasOwnProperty.call(txReceipt.events, key) && + txReceipt.events[key].event === eventName + ) { + const event = txReceipt.events[key]; + + const resultObj = { + txHash: txReceipt.transactionHash, + }; + + for (let index = 0; index < eventFields.length; index++) { + resultObj[eventFields[index]] = event.args[ + eventFields[index] + ].toString(); + } + eventsArr.push(resultObj); + } + } + + return eventsArr; +} + +function isStatus(_status, idx) { + return (_status >> idx) & (ONE == 1); +} + +async function getComplainPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getComplainPeriod(); +} + +async function getCancelFaultPeriod(config, executor) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + return await vk.getCancelFaultPeriod(); +} + +async function getVoucherValidTo(config, executor, voucherId) { + const vk = new ethers.Contract( + config.VOUCHER_KERNEL_ADDRESS, + VoucherKernel.abi, + executor + ); + const promiseKey = await vk.getPromiseIdFromVoucherId(voucherId); + return (await vk.getPromiseData(promiseKey))[3].toString() +} + +async function getCurrTimestamp(provider) { + let blockNumber = await provider.getBlockNumber(); + let block = await provider.getBlock(blockNumber); + + return block.timestamp; +} + +function isStateCommitted(status) { + return status == setChange(0, IDX_COMMIT); +} + +function isStateRedemptionSigned(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REDEEM); +} + +function isStateRefunded(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_REFUND); +} + +function isStateExpired(status) { + return status == setChange(setChange(0, IDX_COMMIT), IDX_EXPIRE); +} + +function setChange(status, changeIdx) { + return status | (ONE << changeIdx); +} + +module.exports = { + IDX_FINAL, + IDX_EXPIRE, + IDX_COMPLAIN, + IDX_CANCEL_FAULT, + findEventByName, + isStatus, + getCurrTimestamp, + getComplainPeriod, + getCancelFaultPeriod, + getVoucherValidTo, + isStateCommitted, + isStateRedemptionSigned, + isStateRefunded, + isStateExpired, +}; diff --git a/external/lambdas/triggerWithdrawals/update-fn.sh b/external/lambdas/triggerWithdrawals/update-fn.sh new file mode 100644 index 00000000..bc222ede --- /dev/null +++ b/external/lambdas/triggerWithdrawals/update-fn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +aws lambda update-function-code --function-name "triggerWithdrawalsDev" --zip-file "fileb://./src.zip" \ No newline at end of file diff --git a/external/lambdas/triggerWithdrawals/zip.sh b/external/lambdas/triggerWithdrawals/zip.sh new file mode 100644 index 00000000..2aeca917 --- /dev/null +++ b/external/lambdas/triggerWithdrawals/zip.sh @@ -0,0 +1 @@ +zip -r src.zip src/ \ No newline at end of file diff --git a/functions/.eslintrc.json b/functions/.eslintrc.json deleted file mode 100644 index 6b6beb65..00000000 --- a/functions/.eslintrc.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "parserOptions": { - // Required for certain syntax usages - "ecmaVersion": 2017 - }, - "plugins": [ - "promise" - ], - "extends": "eslint:recommended", - "rules": { - // Removed rule "disallow the use of console" from recommended eslint rules - "no-console": "off", - - // Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules - "no-regex-spaces": "off", - - // Removed rule "disallow the use of debugger" from recommended eslint rules - "no-debugger": "off", - - // Removed rule "disallow unused variables" from recommended eslint rules - "no-unused-vars": "off", - - // Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules - "no-mixed-spaces-and-tabs": "off", - - // Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules - "no-undef": "off", - - // Warn against template literal placeholder syntax in regular strings - "no-template-curly-in-string": 1, - - // Warn if return statements do not either always or never specify values - "consistent-return": 1, - - // Warn if no return statements in callbacks of array methods - "array-callback-return": 1, - - // Require the use of === and !== - "eqeqeq": 2, - - // Disallow the use of alert, confirm, and prompt - "no-alert": 2, - - // Disallow the use of arguments.caller or arguments.callee - "no-caller": 2, - - // Disallow null comparisons without type-checking operators - "no-eq-null": 2, - - // Disallow the use of eval() - "no-eval": 2, - - // Warn against extending native types - "no-extend-native": 1, - - // Warn against unnecessary calls to .bind() - "no-extra-bind": 1, - - // Warn against unnecessary labels - "no-extra-label": 1, - - // Disallow leading or trailing decimal points in numeric literals - "no-floating-decimal": 2, - - // Warn against shorthand type conversions - "no-implicit-coercion": 1, - - // Warn against function declarations and expressions inside loop statements - "no-loop-func": 1, - - // Disallow new operators with the Function object - "no-new-func": 2, - - // Warn against new operators with the String, Number, and Boolean objects - "no-new-wrappers": 1, - - // Disallow throwing literals as exceptions - "no-throw-literal": 2, - - // Require using Error objects as Promise rejection reasons - "prefer-promise-reject-errors": 2, - - // Enforce “for” loop update clause moving the counter in the right direction - "for-direction": 2, - - // Enforce return statements in getters - "getter-return": 2, - - // Disallow await inside of loops - "no-await-in-loop": 2, - - // Disallow comparing against -0 - "no-compare-neg-zero": 2, - - // Warn against catch clause parameters from shadowing variables in the outer scope - "no-catch-shadow": 1, - - // Disallow identifiers from shadowing restricted names - "no-shadow-restricted-names": 2, - - // Enforce return statements in callbacks of array methods - "callback-return": 2, - - // Require error handling in callbacks - "handle-callback-err": 2, - - // Warn against string concatenation with __dirname and __filename - "no-path-concat": 1, - - // Prefer using arrow functions for callbacks - "prefer-arrow-callback": 1, - - // Return inside each then() to create readable and reusable Promise chains. - // Forces developers to return console logs and http calls in promises. - "promise/always-return": 2, - - //Enforces the use of catch() on un-returned promises - "promise/catch-or-return": 2, - - // Warn against nested then() or catch() statements - "promise/no-nesting": 1 - } -} diff --git a/functions/.gitignore b/functions/.gitignore deleted file mode 100644 index 40b878db..00000000 --- a/functions/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/functions/abis/Cashier.json b/functions/abis/Cashier.json deleted file mode 100644 index 2ee21a31..00000000 --- a/functions/abis/Cashier.json +++ /dev/null @@ -1,19639 +0,0 @@ -{ - "contractName": "Cashier", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_voucherKernel", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_tokenIdSupply", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "_seller", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_promiseId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_quantity", - "type": "uint256" - } - ], - "name": "LogOrderCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_tokenIdSupply", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_tokenIdVoucher", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "_issuer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_holder", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_promiseId", - "type": "bytes32" - } - ], - "name": "LogVoucherDelivered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_payment", - "type": "uint256" - } - ], - "name": "LogWithdrawal", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "escrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_assetTitle", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_validFrom", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_validTo", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_depositSe", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_depositBu", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_quantity", - "type": "uint256" - } - ], - "name": "requestCreateOrder", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenIdSupply", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_issuer", - "type": "address" - } - ], - "name": "requestVoucher", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_tokenIdVouchers", - "type": "uint256[]" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "getEscrowAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50604051611f1e380380611f1e8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600160008190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050611e40806100de6000396000f3fe6080604052600436106100555760003560e01c806357d3c7c31461005a5780635c42c733146100bf57806386b1c509146100d6578063983d95ce14610124578063d1358365146101aa578063fffa8d6b1461020f575b600080fd5b34801561006657600080fd5b506100a96004803603602081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102c4565b6040518082815260200191505060405180910390f35b3480156100cb57600080fd5b506100d46102dc565b005b610122600480360360408110156100ec57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061058f565b005b34801561013057600080fd5b506101a86004803603602081101561014757600080fd5b810190808035906020019064010000000081111561016457600080fd5b82018360208201111561017657600080fd5b8035906020019184602083028401116401000000008311171561019857600080fd5b90919293919293905050506109d0565b005b3480156101b657600080fd5b506101f9600480360360208110156101cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611624565b6040518082815260200191505060405180910390f35b6102c2600480360360e081101561022557600080fd5b810190808035906020019064010000000081111561024257600080fd5b82018360208201111561025457600080fd5b8035906020019184600183028401116401000000008311171561027657600080fd5b909192939192939080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919050505061166d565b005b60036020528060005260406000206000915090505481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5000000000000000000000000000000000000081525060200191505060405180910390fd5b60026000541415610418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6002600081905550600060036000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561058557600060036000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600060036000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610583600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826119a0565b505b6001600081905550565b60026000541415610608576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060003490506000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d887b4e7876040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b15801561068d57600080fd5b505afa1580156106a1573d6000803e3d6000fd5b505050506040513d60608110156106b757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050509250925092508381840114610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f494e434f52524543545f46554e4453000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ae4606fe8888336040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050506040513d602081101561083657600080fd5b8101908080519060200190929190505050905084600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550867f23c1c17d90a2ffcaa72a4491901fe754b355e3a5453fc90eb2e0d03adfb1b27a828833600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bc0d753d876040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561092e57600080fd5b505afa158015610942573d6000803e3d6000fd5b505050506040513d602081101561095857600080fd5b8101908080519060200190929190505050604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a2505050505060016000819055505050565b60026000541415610a49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060008282905011610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f454d5054595f4c4953540000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080600080600080600080600080610ae1611d9a565b60005b8d8d90508110156115ae5760008e8e83818110610afd57fe5b905060200201351415610b78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663325a7a848f8f84818110610bc257fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6060811015610c2757600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050846000018560200186604001831515151581525083151515158152508360ff1660ff16815250505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631af2a6a88f8f84818110610cbf57fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610cfa57600080fd5b505afa158015610d0e573d6000803e3d6000fd5b505050506040513d6020811015610d2457600080fd5b81019080805190602001909291905050509250600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d887b4e7846040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b158015610daa57600080fd5b505afa158015610dbe573d6000803e3d6000fd5b505050506040513d6060811015610dd457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809750819850829950505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346d07cb58f8f84818110610e4f57fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e8a57600080fd5b505afa158015610e9e573d6000803e3d6000fd5b505050506040513d6020811015610eb457600080fd5b81019080805190602001909291905050509850600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f75951ce8f8f84818110610f1157fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f4c57600080fd5b505afa158015610f60573d6000803e3d6000fd5b505050506040513d6020811015610f7657600080fd5b810190808051906020019092919050505097508160200151158015610fa65750610fa582600001516006611b34565b5b156110a15786600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550868b019a50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663755495168f8f8481811061104757fe5b905060200201356040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561108457600080fd5b505af1158015611098573d6000803e3d6000fd5b505050506111fa565b816020015115801561110257506110bd82600001516005611b34565b806110d357506110d282600001516004611b34565b5b8061110157506110e882600001516002611b34565b801561110057506110fe82600001516006611b34565b155b5b5b156111f95786600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550868a019950600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663755495168f8f848181106111a357fe5b905060200201356040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156111e057600080fd5b505af11580156111f4573d6000803e3d6000fd5b505050505b5b8160400151158015611217575061121682600001516001611b34565b5b156115a15761122b82600001516003611b34565b156113415761123f82600001516002611b34565b156112e95785600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506112a5600287611b5090919063ffffffff16565b9350838a0199506112c0600285611b5090919063ffffffff16565b8b019a506112d8600285611b5090919063ffffffff16565b848703038c019b506000935061133c565b85600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550858c019b505b61142d565b61135082600001516002611b34565b156113d95785600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506113b6600287611b5090919063ffffffff16565b8b019a506113ce600287611b5090919063ffffffff16565b86038a01995061142c565b85600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550858b019a505b5b61143c82600001516006611b34565b80611452575061145182600001516002611b34565b5b156114ae5784600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550848a019950611501565b84600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550848c019b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebba1b298f8f8481811061154b57fe5b905060200201356040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561158857600080fd5b505af115801561159c573d6000803e3d6000fd5b505050505b8080600101915050610ae4565b5060008b11156115e5576115e4600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168c6119a0565b5b60008a11156115f9576115f8888b6119a0565b5b600089111561160d5761160c878a6119a0565b5b505050505050505050505060016000819055505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080349050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a2b95b9338c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff168152602001806020018781526020018681526020018581526020018481526020018381526020018281038252898982818152602001925080828437600081840152601f19601f8201169050808301925050509950505050505050505050602060405180830381600087803b15801561175a57600080fd5b505af115801561176e573d6000803e3d6000fd5b505050506040513d602081101561178457600080fd5b81019080805190602001909291905050509150808386021461180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f494e434f52524543545f46554e4453000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ae0838143385876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050602060405180830381600087803b1580156118ab57600080fd5b505af11580156118bf573d6000803e3d6000fd5b505050506040513d60208110156118d557600080fd5b8101908080519060200190929190505050905081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550807f6adbfc9311af7d6370f3b8aa1a474aa63cf541fb1136873e212e00aa87a228ab338587604051808473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a25050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f414444524553530000000000000000000000000081525060200191505060405180910390fd5b60008111611a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526000815260200160200191505060405180910390fd5b611abd818373ffffffffffffffffffffffffffffffffffffffff16611b9a90919063ffffffff16565b7f0ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd338383604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a15050565b60006001808360ff168560ff16901c1660ff1614905092915050565b6000611b9283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611cd4565b905092915050565b80471015611c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114611c70576040519150601f19603f3d011682016040523d82523d6000602084013e611c75565b606091505b5050905080611ccf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611dd1603a913960400191505060405180910390fd5b505050565b60008083118290611d80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d45578082015181840152602081019050611d2a565b50505050905090810190601f168015611d725780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611d8c57fe5b049050809150509392505050565b6040518060a00160405280600060ff1681526020016000151581526020016000151581526020016000815260200160008152509056fe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564a26469706673582212208ad00d357f7b631974f94302f3f1f68878cc1e0b644947b0ee5742dd8787822364736f6c634300060c0033", - "deployedBytecode": "0x6080604052600436106100555760003560e01c806357d3c7c31461005a5780635c42c733146100bf57806386b1c509146100d6578063983d95ce14610124578063d1358365146101aa578063fffa8d6b1461020f575b600080fd5b34801561006657600080fd5b506100a96004803603602081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102c4565b6040518082815260200191505060405180910390f35b3480156100cb57600080fd5b506100d46102dc565b005b610122600480360360408110156100ec57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061058f565b005b34801561013057600080fd5b506101a86004803603602081101561014757600080fd5b810190808035906020019064010000000081111561016457600080fd5b82018360208201111561017657600080fd5b8035906020019184602083028401116401000000008311171561019857600080fd5b90919293919293905050506109d0565b005b3480156101b657600080fd5b506101f9600480360360208110156101cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611624565b6040518082815260200191505060405180910390f35b6102c2600480360360e081101561022557600080fd5b810190808035906020019064010000000081111561024257600080fd5b82018360208201111561025457600080fd5b8035906020019184600183028401116401000000008311171561027657600080fd5b909192939192939080359060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919050505061166d565b005b60036020528060005260406000206000915090505481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e415554484f52495a45445f5000000000000000000000000000000000000081525060200191505060405180910390fd5b60026000541415610418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6002600081905550600060036000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561058557600060036000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600060036000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610583600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826119a0565b505b6001600081905550565b60026000541415610608576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060003490506000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d887b4e7876040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b15801561068d57600080fd5b505afa1580156106a1573d6000803e3d6000fd5b505050506040513d60608110156106b757600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050509250925092508381840114610759576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f494e434f52524543545f46554e4453000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ae4606fe8888336040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050506040513d602081101561083657600080fd5b8101908080519060200190929190505050905084600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550867f23c1c17d90a2ffcaa72a4491901fe754b355e3a5453fc90eb2e0d03adfb1b27a828833600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bc0d753d876040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561092e57600080fd5b505afa158015610942573d6000803e3d6000fd5b505050506040513d602081101561095857600080fd5b8101908080519060200190929190505050604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a2505050505060016000819055505050565b60026000541415610a49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260008190555060008282905011610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f454d5054595f4c4953540000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600080600080600080600080600080610ae1611d9a565b60005b8d8d90508110156115ae5760008e8e83818110610afd57fe5b905060200201351415610b78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f554e5350454349464945445f494400000000000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663325a7a848f8f84818110610bc257fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6060811015610c2757600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050846000018560200186604001831515151581525083151515158152508360ff1660ff16815250505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631af2a6a88f8f84818110610cbf57fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610cfa57600080fd5b505afa158015610d0e573d6000803e3d6000fd5b505050506040513d6020811015610d2457600080fd5b81019080805190602001909291905050509250600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d887b4e7846040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b158015610daa57600080fd5b505afa158015610dbe573d6000803e3d6000fd5b505050506040513d6060811015610dd457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050809750819850829950505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166346d07cb58f8f84818110610e4f57fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e8a57600080fd5b505afa158015610e9e573d6000803e3d6000fd5b505050506040513d6020811015610eb457600080fd5b81019080805190602001909291905050509850600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f75951ce8f8f84818110610f1157fe5b905060200201356040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f4c57600080fd5b505afa158015610f60573d6000803e3d6000fd5b505050506040513d6020811015610f7657600080fd5b810190808051906020019092919050505097508160200151158015610fa65750610fa582600001516006611b34565b5b156110a15786600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550868b019a50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663755495168f8f8481811061104757fe5b905060200201356040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561108457600080fd5b505af1158015611098573d6000803e3d6000fd5b505050506111fa565b816020015115801561110257506110bd82600001516005611b34565b806110d357506110d282600001516004611b34565b5b8061110157506110e882600001516002611b34565b801561110057506110fe82600001516006611b34565b155b5b5b156111f95786600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550868a019950600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663755495168f8f848181106111a357fe5b905060200201356040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156111e057600080fd5b505af11580156111f4573d6000803e3d6000fd5b505050505b5b8160400151158015611217575061121682600001516001611b34565b5b156115a15761122b82600001516003611b34565b156113415761123f82600001516002611b34565b156112e95785600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506112a5600287611b5090919063ffffffff16565b9350838a0199506112c0600285611b5090919063ffffffff16565b8b019a506112d8600285611b5090919063ffffffff16565b848703038c019b506000935061133c565b85600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550858c019b505b61142d565b61135082600001516002611b34565b156113d95785600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506113b6600287611b5090919063ffffffff16565b8b019a506113ce600287611b5090919063ffffffff16565b86038a01995061142c565b85600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550858b019a505b5b61143c82600001516006611b34565b80611452575061145182600001516002611b34565b5b156114ae5784600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550848a019950611501565b84600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550848c019b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebba1b298f8f8481811061154b57fe5b905060200201356040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561158857600080fd5b505af115801561159c573d6000803e3d6000fd5b505050505b8080600101915050610ae4565b5060008b11156115e5576115e4600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168c6119a0565b5b60008a11156115f9576115f8888b6119a0565b5b600089111561160d5761160c878a6119a0565b5b505050505050505050505060016000819055505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080349050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a2b95b9338c8c8c8c8c8c8c6040518963ffffffff1660e01b8152600401808973ffffffffffffffffffffffffffffffffffffffff168152602001806020018781526020018681526020018581526020018481526020018381526020018281038252898982818152602001925080828437600081840152601f19601f8201169050808301925050509950505050505050505050602060405180830381600087803b15801561175a57600080fd5b505af115801561176e573d6000803e3d6000fd5b505050506040513d602081101561178457600080fd5b81019080805190602001909291905050509150808386021461180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f494e434f52524543545f46554e4453000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ae0838143385876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050602060405180830381600087803b1580156118ab57600080fd5b505af11580156118bf573d6000803e3d6000fd5b505050506040513d60208110156118d557600080fd5b8101908080519060200190929190505050905081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550807f6adbfc9311af7d6370f3b8aa1a474aa63cf541fb1136873e212e00aa87a228ab338587604051808473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a25050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f554e5350454349464945445f414444524553530000000000000000000000000081525060200191505060405180910390fd5b60008111611a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526000815260200160200191505060405180910390fd5b611abd818373ffffffffffffffffffffffffffffffffffffffff16611b9a90919063ffffffff16565b7f0ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd338383604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a15050565b60006001808360ff168560ff16901c1660ff1614905092915050565b6000611b9283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611cd4565b905092915050565b80471015611c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a20696e73756666696369656e742062616c616e636500000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114611c70576040519150601f19603f3d011682016040523d82523d6000602084013e611c75565b606091505b5050905080611ccf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611dd1603a913960400191505060405180910390fd5b505050565b60008083118290611d80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d45578082015181840152602081019050611d2a565b50505050905090810190601f168015611d725780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611d8c57fe5b049050809150509392505050565b6040518060a00160405280600060ff1681526020016000151581526020016000151581526020016000815260200160008152509056fe416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564a26469706673582212208ad00d357f7b631974f94302f3f1f68878cc1e0b644947b0ee5742dd8787822364736f6c634300060c0033", - "sourceMap": "475:12776:0:-:0;;;1757:206;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1628:1:12;1743:7;:22;;;;1868:14:0;1838:13;;:45;;;;;;;;;;;;;;;;;;1907:10;1893:11;;:24;;;;;;;;;;;;;;;;;;1757:206;475:12776;;;;;;", - "deployedSourceMap": "475:12776:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;737:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;11618:322;;;;;;;;;;;;;:::i;:::-;;4218:865;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5478:6054;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;13110:134;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2418:1532;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;737:41;;;;;;;;;;;;;;;;;:::o;11618:322::-;1611:11;;;;;;;;;;;1597:25;;:10;:25;;;1589:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1671:1:12::1;2260:7;;:19;;2252:63;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;1671:1;2390:7;:18;;;;11790:1:0::2;11768:6;:19;11775:11;;;;;;;;;;;11768:19;;;;;;;;;;;;;;;;:23;11764:170;;;11807:14;11824:6;:19;11831:11;;;;;;;;;;;11824:19;;;;;;;;;;;;;;;;11807:36;;11879:1;11857:6;:19;11864:11;;;;;;;;;;;11857:19;;;;;;;;;;;;;;;:23;;;;11894:29;11904:11;;;;;;;;;;;11916:6;11894:9;:29::i;:::-;11764:170;;1628:1:12::1;2563:7;:22;;;;11618:322:0:o:0;4218:865::-;1671:1:12;2260:7;;:19;;2252:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1671:1;2390:7;:18;;;;4352:19:0::1;4374:9;4352:31;;4412:13;4427:17:::0;4446::::1;4467:13;;;;;;;;;;;:27;;;4495:14;4467:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4411:99;;;;;;4550:11;4537:9;4529:5;:17;:32;4521:60;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;4757:22;4782:13;;;;;;;;;;;:23;;;4806:14;4822:7;4831:10;4782:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;4757:85;;4912:11;4890:6;:18;4897:10;4890:18;;;;;;;;;;;;;;;;:33;;;;;;;;;;;4967:14;4947:129;4983:14;4999:7;5008:10;5020:13;;;;;;;;;;;:39;;;5060:14;5020:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;4947:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2419:1:12;;;;;1628::::0;2563:7;:22;;;;4218:865:0;;:::o;5478:6054::-;1671:1:12;2260:7;;:19;;2252:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1671:1;2390:7;:18;;;;5647:1:0::1;5621:16;;:23;;:27;5613:50;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;5772:19;5801:21:::0;5832::::1;5863:22:::0;5895::::1;5936:13:::0;5959:17:::1;5986::::0;6013::::1;6049:21:::0;6080:31:::1;;:::i;:::-;6461:9;6457:4760;6480:16;;:23;;6476:1;:27;6457:4760;;;6555:1;6532:16;;6549:1;6532:19;;;;;;;;;;;;;:24;;6524:51;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;6778:13;;;;;;;;;;;:30;;;6809:16;;6826:1;6809:19;;;;;;;;;;;;;6778:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6696:10;:17;;6715:10;:28;;6745:10;:29;;6695:134;;;;;;;::::0;::::1;;;;;;;::::0;::::1;;;;;;;::::0;::::1;;;6859:13;;;;;;;;;;;:36;;;6896:16;;6913:1;6896:19;;;;;;;;;;;;;6859:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;6843:73;;6962:13;;;;;;;;;;;:27;;;6990:13;6962:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6930:74;;;;;;;;;;;;7044:13;;;;;;;;;;;:30;;;7075:16;;7092:1;7075:19;;;;;;;;;;;;;7044:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;7018:80;;7138:13;;;;;;;;;;;:30;;;7169:16;;7186:1;7169:19;;;;;;;;;;;;;7138:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;7112:80;;7370:10;:28;;;7369:29;:115;;;;;7424:38;7433:10;:17;;;297:1:9;7424:8:0;:38::i;:::-;7369:115;7365:960;;;7599:5;7581:6;:14;7588:6;7581:14;;;;;;;;;;;;;;;;:23;;;;;;;;;;;7639:5;7622:22;;;;7663:13;;;;;;;;;;;:32;;;7696:16;;7713:1;7696:19;;;;;;;;;;;;;7663:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;7365:960;;;7759:10;:28;;;7758:29;:314;;;;;7813:38;7822:10;:17;;;340:1:9;7813:8:0;:38::i;:::-;:100;;;;7875:38;7884:10;:17;;;383:1:9;7875:8:0;:38::i;:::-;7813:100;:237;;;;7938:43;7947:10;:17;;;476:1:9;7938:8:0;:43::i;:::-;:111;;;;;8011:38;8020:10;:17;;;297:1:9;8011:8:0;:38::i;:::-;8010:39;7938:111;7813:237;7758:314;7754:571;;;8194:5;8176:6;:14;8183:6;8176:14;;;;;;;;;;;;;;;;:23;;;;;;;;;;;8234:5;8217:22;;;;8257:13;;;;;;;;;;;:32;;;8290:16;;8307:1;8290:19;;;;;;;;;;;;;8257:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;7754:571;7365:960;8473:10;:29;;;8472:30;:88;;;;;8523:37;8532:10;:17;;;518:1:9;8523:8:0;:37::i;:::-;8472:88;8468:2701;;;8661:40;8670:10;:17;;;428:1:9;8661:8:0;:40::i;:::-;8657:1851;;;8729:43;8738:10;:17;;;476:1:9;8729:8:0;:43::i;:::-;8725:764;;;8876:9;8858:6;:14;8865:6;8858:14;;;;;;;;;;;;;;;;:27;;;;;;;;;;;8923:32;1001:1;8923:9;:13;;:32;;;;:::i;:::-;8911:44;;8998:9;8981:26;;;;9073:32;1001:1;9073:9;:13;;:32;;;;:::i;:::-;9056:49;;;;9198:32;1001:1;9198:9;:13;;:32;;;;:::i;:::-;9186:9;9174;:21;:56;9159:71;;;;9291:1;9279:13;;8725:764;;;9407:9;9389:6;:14;9396:6;9389:14;;;;;;;;;;;;;;;;:27;;;;;;;;;;;9457:9;9442:24;;;;8725:764;8657:1851;;;9539:43;9548:10;:17;;;476:1:9;9539:8:0;:43::i;:::-;9535:955;;;9687:9;9669:6;:14;9676:6;9669:14;;;;;;;;;;;;;;;;:27;;;;;;;;;;;9739:32;1001:1;9739:9;:13;;:32;;;;:::i;:::-;9722:49;;;;9826:32;1001:1;9826:9;:13;;:32;;;;:::i;:::-;9814:9;:44;9797:61;;;;9535:955;;;10381:9;10363:6;:14;10370:6;10363:14;;;;;;;;;;;;;;;;:27;;;;;;;;;;;10433:9;10416:26;;;;9535:955;8657:1851;10603:38;10612:10;:17;;;297:1:9;10603:8:0;:38::i;:::-;:106;;;;10666:43;10675:10;:17;;;476:1:9;10666:8:0;:43::i;:::-;10603:106;10599:467;;;10812:9;10794:6;:14;10801:6;10794:14;;;;;;;;;;;;;;;;:27;;;;;;;;;;;10860:9;10843:26;;;;10599:467;;;10972:9;10954:6;:14;10961:6;10954:14;;;;;;;;;;;;;;;;:27;;;;;;;;;;;11018:9;11003:24;;;;10599:467;11100:13;;;;;;;;;;;:33;;;11134:16;;11151:1;11134:19;;;;;;;;;;;;;11100:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;8468:2701;6505:3;;;;;;;6457:4760;;;;11266:1;11252:11;:15;11248:81;;;11283:35;11293:11;;;;;;;;;;;11306;11283:9;:35::i;:::-;11248:81;11367:1;11351:13;:17;11347:80;;;11384:32;11394:6;11402:13;11384:9;:32::i;:::-;11347:80;11457:1;11441:13;:17;11437:80;;;11474:32;11484:6;11492:13;11474:9;:32::i;:::-;11437:80;2419:1:12;;;;;;;;;;;1628::::0;2563:7;:22;;;;5478:6054:0;;:::o;13110:134::-;13191:7;13221:6;:16;13228:8;13221:16;;;;;;;;;;;;;;;;13214:23;;13110:134;;;:::o;2418:1532::-;2833:17;2869:19;2891:9;2869:31;;3004:13;;;;;;;;;;;:32;;;3037:10;3049:11;;3062:10;3074:8;3084:6;3092:10;3104;3004:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2992:123;;3526:11;3513:9;3500:10;:22;:37;3492:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3670:21;3694:13;;;;;;;;;;;:25;;;3720:10;3732:9;3743;3694:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3670:83;;3831:11;3809:6;:18;3816:10;3809:18;;;;;;;;;;;;;;;;:33;;;;;;;;;;;3887:13;3871:64;3902:10;3914:9;3925;3871:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2418:1532;;;;;;;;;;;:::o;12439:394::-;12564:1;12542:24;;:10;:24;;;;12534:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12710:1;12700:7;:11;12692:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12735:29;12756:7;12735:10;:20;;;;:29;;;;:::i;:::-;12780:46;12794:10;12806;12818:7;12780:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12439:394;;:::o;1631:144:9:-;1715:4;1767:1;211;1753:4;1742:15;;:7;:15;;;;:21;:26;;;1735:33;;1631:144;;;;:::o;3101:130:10:-;3159:7;3185:39;3189:1;3192;3185:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3178:46;;3101:130;;;;:::o;2048:391:11:-;2162:6;2137:21;:31;;2129:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2291:12;2309:9;:14;;2332:6;2309:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2290:54;;;2362:7;2354:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2048:391;;;:::o;3713:272:10:-;3799:7;3830:1;3826;:5;3833:12;3818:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3856:9;3872:1;3868;:5;;;;;;3856:17;;3977:1;3970:8;;;3713:272;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "// SPDX-License-Identifier: LGPL-3.0-or-later\n\npragma solidity >=0.6.2 <0.7.0;\n\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n//import \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"./VoucherKernel.sol\";\nimport \"./usingHelpers.sol\";\n\n/**\n * @title Contract for managing funds\n * @dev Warning: the contract hasn't been audited yet!\n * Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/\n */\ncontract Cashier is usingHelpers, ReentrancyGuard {\n using Address for address payable;\n using SafeMath for uint;\n \n VoucherKernel voucherKernel;\n \n address payable poolAddress; //the account receiving slashed funds\n \n mapping(address => uint256) public escrow; //both types of deposits AND payments >> can be released token-by-token if checks pass\n //slashedDepositPool can be obtained through getEscrowAmount(poolAddress)\n \n uint256 internal constant CANCELFAULT_SPLIT = 2; //for demo purposes, this is fixed; e.g. each party gets depositSe / 2\n \n event LogOrderCreated(\n uint256 indexed _tokenIdSupply,\n address _seller,\n bytes32 _promiseId, \n uint256 _quantity\n );\n \n event LogVoucherDelivered(\n uint256 indexed _tokenIdSupply,\n uint256 _tokenIdVoucher,\n address _issuer,\n address _holder,\n bytes32 _promiseId\n ); \n \n event LogWithdrawal(\n address _caller,\n address _payee, \n uint256 _payment\n );\n \n\n modifier onlyPoolManager() {\n require(msg.sender == poolAddress, \"UNAUTHORIZED_P\"); //hex\"10\" FISSION.code(FISSION.Category.Permission, FISSION.Status.Disallowed_Stop)\n _;\n }\n \n \n constructor(\n address _voucherKernel\n ) \n public \n {\n voucherKernel = VoucherKernel(_voucherKernel);\n poolAddress = msg.sender; //address(uint160( address(this) ));\n }\n \n \n /**\n * @notice Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\n @param _assetTitle Name of the asset\n @param _validFrom Start of valid period\n @param _validTo End of valid period\n @param _price Price (payment amount)\n @param _depositSe Seller's deposit\n @param _depositBu Buyer's deposit\n * @param _quantity Quantity on offer\n */\n function requestCreateOrder(\n string calldata _assetTitle, \n //bytes32 _value, \n uint256 _validFrom,\n uint256 _validTo,\n uint256 _price,\n uint256 _depositSe,\n uint256 _depositBu,\n //uint256 _complainPeriod,\n //uint256 _cancelFaultPeriod,\n //bytes32 _promiseId, \n uint256 _quantity\n )\n external\n payable\n {\n bytes32 promiseId;\n \n uint256 weiReceived = msg.value;\n \n //create a promise for an asset first (simplified for prototype)\n promiseId = voucherKernel.createAssetPromise(msg.sender, _assetTitle, _validFrom, _validTo, _price, _depositSe, _depositBu);\n \n //checks\n //(i) this is for separate promise allocation, not in prototype\n //uint256 depositSe = voucherKernel.getPromiseDepositSe(promiseId); \n //require(depositSe * _quantity == weiReceived, \"INCORRECT_FUNDS\"); //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\n //(ii) prototype check\n require(_depositSe * _quantity == weiReceived, \"INCORRECT_FUNDS\"); //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\n \n \n uint256 tokenIdSupply = voucherKernel.createOrder(msg.sender, promiseId, _quantity);\n \n //record funds in escrow ...\n escrow[msg.sender] += weiReceived; \n \n emit LogOrderCreated(tokenIdSupply, msg.sender, promiseId, _quantity); \n }\n \n \n /**\n * @notice Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\n * @param _tokenIdSupply ID of the supply token\n * @param _issuer Address of the issuer of the supply token\n */\n function requestVoucher(uint256 _tokenIdSupply, address _issuer)\n external \n payable\n nonReentrant\n {\n uint256 weiReceived = msg.value;\n\n //checks\n (uint256 price, uint256 depositSe, uint256 depositBu) = voucherKernel.getOrderCosts(_tokenIdSupply); \n require(price + depositBu == weiReceived, \"INCORRECT_FUNDS\"); //hex\"54\" FISSION.code(FISSION.Category.Finance, FISSION.Status.InsufficientFunds)\n\n //get voucher token - extract ERC721 from _voucherOrderId to msg.sender\n uint256 voucherTokenId = voucherKernel.fillOrder(_tokenIdSupply, _issuer, msg.sender);\n\n //record funds in escrow ...\n escrow[msg.sender] += weiReceived;\n \n emit LogVoucherDelivered(_tokenIdSupply, voucherTokenId, _issuer, msg.sender, voucherKernel.getPromiseIdFromVoucherId(voucherTokenId));\n }\n\n\n /**\n * @notice Trigger withdrawals of what funds are releasable\n * The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\n * @dev This function would be optimized a lot, here verbose for readability.\n * @param _tokenIdVouchers an array of voucher tokens (ERC-721) to try withdraw funds from\n */\n function withdraw(uint256[] calldata _tokenIdVouchers)\n external\n nonReentrant\n {\n //TODO: more checks\n require(_tokenIdVouchers.length > 0, \"EMPTY_LIST\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n \n uint256 amount2pool;\n uint256 amount2issuer;\n uint256 amount2holder;\n address payable issuer;\n address payable holder;\n \n uint256 price;\n uint256 depositSe;\n uint256 depositBu;\n uint256 tFraction;\n \n uint256 tokenIdSupply;\n VoucherStatus memory currStatus;\n //uint256 tPartDepositSe; //Can't use, because of \"Stack Too Deep\" Error ... this in real life needs to be optimized, but kept here for readability.\n \n //in the future might want to (i) check the gasleft() (but UNGAS proposal might make it impossible), and/or (ii) set upper loop limit to sth like .length < 2**15\n for(uint256 i = 0; i < _tokenIdVouchers.length; i++) {\n require(_tokenIdVouchers[i] != 0, \"UNSPECIFIED_ID\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n \n (currStatus.status, currStatus.isPaymentReleased, currStatus.isDepositsReleased) = voucherKernel.getVoucherStatus(_tokenIdVouchers[i]);\n tokenIdSupply = voucherKernel.getIdSupplyFromVoucher(_tokenIdVouchers[i]);\n (price, depositSe, depositBu) = voucherKernel.getOrderCosts(tokenIdSupply);\n issuer = address(uint160( voucherKernel.getVoucherIssuer(_tokenIdVouchers[i]) ));\n holder = address(uint160( voucherKernel.getVoucherHolder(_tokenIdVouchers[i]) ));\n \n \n //process the RELEASE OF PAYMENTS - only depends on the redeemed/not-redeemed, a voucher need not be in the final status\n if (!currStatus.isPaymentReleased && (\n isStatus(currStatus.status, idxRedeem)\n )) {\n //release payment to the Seller, because redemption happened\n escrow[holder] -= price;\n amount2issuer += price; \n voucherKernel.setPaymentReleased(_tokenIdVouchers[i]);\n \n } else if (!currStatus.isPaymentReleased && (\n isStatus(currStatus.status, idxRefund) ||\n isStatus(currStatus.status, idxExpire) ||\n (isStatus(currStatus.status, idxCancelFault) && \n !isStatus(currStatus.status, idxRedeem))\n )) {\n //release payment back to the Buyer as the redemption didn't happen\n escrow[holder] -= price;\n amount2holder += price;\n voucherKernel.setPaymentReleased(_tokenIdVouchers[i]);\n } \n \n \n //process the RELEASE OF DEPOSITS - only when vouchers are in the FINAL status \n if (!currStatus.isDepositsReleased && \n isStatus(currStatus.status, idxFinal)) {\n \n \n //first, depositSe\n if (isStatus(currStatus.status, idxComplain)) {\n if (isStatus(currStatus.status, idxCancelFault)) {\n //appease the conflict three-ways\n escrow[issuer] -= depositSe;\n tFraction = depositSe.div(CANCELFAULT_SPLIT);\n amount2holder += tFraction; //Bu gets, say, a half\n amount2issuer += tFraction.div(CANCELFAULT_SPLIT); //Se gets, say, a quarter\n amount2pool += depositSe - tFraction - tFraction.div(CANCELFAULT_SPLIT); //slashing the rest\n tFraction = 0;\n } else {\n //slash depositSe\n escrow[issuer] -= depositSe;\n amount2pool += depositSe;\n }\n } else {\n if (isStatus(currStatus.status, idxCancelFault)) {\n //part depositSe to Bu, part to Se\n escrow[issuer] -= depositSe;\n amount2issuer += depositSe.div(CANCELFAULT_SPLIT);\n amount2holder += depositSe - depositSe.div(CANCELFAULT_SPLIT);\n //Can't use the code below, because of \"Stack Too Deep\" Error ... this in real life would be optimized, but kept the code above for readability.\n //tPartDepositSe = depositSe.div(CANCELFAULT_SPLIT);\n //amount2issuer += tPartDepositSe;\n //amount2holder += depositSe.sub(tPartDepositSe); \n } else {\n //release depositSe\n escrow[issuer] -= depositSe;\n amount2issuer += depositSe; \n }\n }\n \n \n //second, depositBu \n if (isStatus(currStatus.status, idxRedeem) || \n isStatus(currStatus.status, idxCancelFault)\n ) {\n //release depositBu\n escrow[holder] -= depositBu;\n amount2holder += depositBu;\n } else {\n //slash depositBu\n escrow[holder] -= depositBu;\n amount2pool += depositBu; \n }\n \n voucherKernel.setDepositsReleased(_tokenIdVouchers[i]);\n }\n \n \n } //end-for \n \n if (amount2pool > 0) {\n _withdraw(poolAddress, amount2pool);\n }\n \n if (amount2issuer > 0) {\n _withdraw(issuer, amount2issuer);\n }\n\n if (amount2holder > 0) {\n _withdraw(holder, amount2holder);\n }\n \n }\n \n \n /**\n * @notice Trigger withdrawals of pooled funds\n */ \n function withdrawPool()\n external \n onlyPoolManager\n nonReentrant\n {\n //TODO: more checks needed?\n \n if (escrow[poolAddress] > 0) {\n uint256 amount = escrow[poolAddress];\n escrow[poolAddress] = 0;\n _withdraw(poolAddress,amount);\n }\n } \n \n \n /**\n * @notice Internal function for withdrawing.\n * As unbelievable as it is, neither .send() nor .transfer() are now secure to use due to EIP-1884\n * So now transfering funds via the last remaining option: .call()\n * See https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/ \n * @param _recipient address of the account receiving funds from the escrow\n * @param _amount amount to be released from escrow\n */\n function _withdraw(address payable _recipient, uint256 _amount)\n internal\n {\n require(_recipient != address(0), \"UNSPECIFIED_ADDRESS\"); //hex\"20\" FISSION.code(FISSION.Category.Find, FISSION.Status.NotFound_Unequal_OutOfRange)\n require(_amount > 0, \"\");\n \n _recipient.sendValue(_amount);\n\n emit LogWithdrawal(msg.sender, _recipient, _amount);\n }\n \n \n // // // // // // // //\n // GETTERS \n // // // // // // // // \n \n /**\n * @notice Get the amount in escrow of an address\n * @param _account The address of an account to query\n * @return The balance in escrow\n */\n function getEscrowAmount(address _account) \n public view\n returns (uint256)\n {\n return escrow[_account];\n }\n \n}", - "sourcePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/Cashier.sol", - "ast": { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/Cashier.sol", - "exportedSymbols": { - "Cashier": [ - 717 - ] - }, - "id": 718, - "license": "LGPL-3.0-or-later", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.6", - ".2", - "<", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "47:31:0" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 718, - "sourceUnit": 4857, - "src": "80:59:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/VoucherKernel.sol", - "file": "./VoucherKernel.sol", - "id": 3, - "nodeType": "ImportDirective", - "scope": 718, - "sourceUnit": 4284, - "src": "194:29:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/usingHelpers.sol", - "file": "./usingHelpers.sol", - "id": 4, - "nodeType": "ImportDirective", - "scope": 718, - "sourceUnit": 4426, - "src": "224:28:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6, - "name": "usingHelpers", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4425, - "src": "495:12:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_usingHelpers_$4425", - "typeString": "contract usingHelpers" - } - }, - "id": 7, - "nodeType": "InheritanceSpecifier", - "src": "495:12:0" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8, - "name": "ReentrancyGuard", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4856, - "src": "509:15:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$4856", - "typeString": "contract ReentrancyGuard" - } - }, - "id": 9, - "nodeType": "InheritanceSpecifier", - "src": "509:15:0" - } - ], - "contractDependencies": [ - 4425, - 4856 - ], - "contractKind": "contract", - "documentation": { - "id": 5, - "nodeType": "StructuredDocumentation", - "src": "254:220:0", - "text": " @title Contract for managing funds\n @dev Warning: the contract hasn't been audited yet!\n Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/" - }, - "fullyImplemented": true, - "id": 717, - "linearizedBaseContracts": [ - 717, - 4856, - 4425 - ], - "name": "Cashier", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12, - "libraryName": { - "contractScope": null, - "id": 10, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4816, - "src": "537:7:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4816", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "531:34:0", - "typeName": { - "id": 11, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "549:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - }, - { - "id": 15, - "libraryName": { - "contractScope": null, - "id": 13, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4621, - "src": "576:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$4621", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "570:24:0", - "typeName": { - "id": 14, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "589:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "voucherKernel", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "604:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - }, - "typeName": { - "contractScope": null, - "id": 16, - "name": "VoucherKernel", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4283, - "src": "604:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19, - "mutability": "mutable", - "name": "poolAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "642:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 18, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "642:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "functionSelector": "57d3c7c3", - "id": 23, - "mutability": "mutable", - "name": "escrow", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "737:41:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 22, - "keyType": { - "id": 20, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "745:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "737:27:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 21, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "756:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 26, - "mutability": "constant", - "name": "CANCELFAULT_SPLIT", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "955:47:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "955:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "32", - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1001:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 36, - "name": "LogOrderCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 35, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 28, - "indexed": true, - "mutability": "mutable", - "name": "_tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1115:30:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 27, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1115:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "indexed": false, - "mutability": "mutable", - "name": "_seller", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1155:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1155:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 32, - "indexed": false, - "mutability": "mutable", - "name": "_promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1180:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 31, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1180:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "indexed": false, - "mutability": "mutable", - "name": "_quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1209:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1209:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1105:127:0" - }, - "src": "1084:149:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 48, - "name": "LogVoucherDelivered", - "nodeType": "EventDefinition", - "parameters": { - "id": 47, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 38, - "indexed": true, - "mutability": "mutable", - "name": "_tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1278:30:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 37, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1278:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 40, - "indexed": false, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1318:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1318:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "indexed": false, - "mutability": "mutable", - "name": "_issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1351:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1351:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "indexed": false, - "mutability": "mutable", - "name": "_holder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1376:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 43, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1376:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 46, - "indexed": false, - "mutability": "mutable", - "name": "_promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1401:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 45, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1401:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1268:157:0" - }, - "src": "1243:183:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 56, - "name": "LogWithdrawal", - "nodeType": "EventDefinition", - "parameters": { - "id": 55, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 50, - "indexed": false, - "mutability": "mutable", - "name": "_caller", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 56, - "src": "1468:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1468:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 52, - "indexed": false, - "mutability": "mutable", - "name": "_payee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 56, - "src": "1493:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 51, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1493:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 54, - "indexed": false, - "mutability": "mutable", - "name": "_payment", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 56, - "src": "1518:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 53, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1518:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1458:82:0" - }, - "src": "1439:102:0" - }, - { - "body": { - "id": 67, - "nodeType": "Block", - "src": "1579:164:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1597:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1597:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 61, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "1611:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1597:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f50", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1624:16:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aebf3a6b04b3dc03d6a17c8eefcfd867936fc97baa984366ad3e2233827bad6e", - "typeString": "literal_string \"UNAUTHORIZED_P\"" - }, - "value": "UNAUTHORIZED_P" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aebf3a6b04b3dc03d6a17c8eefcfd867936fc97baa984366ad3e2233827bad6e", - "typeString": "literal_string \"UNAUTHORIZED_P\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1589:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1589:52:0" - }, - { - "id": 66, - "nodeType": "PlaceholderStatement", - "src": "1735:1:0" - } - ] - }, - "documentation": null, - "id": 68, - "name": "onlyPoolManager", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1576:2:0" - }, - "src": "1552:191:0", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 84, - "nodeType": "Block", - "src": "1828:135:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 73, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1838:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 75, - "name": "_voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1868:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 74, - "name": "VoucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4283, - "src": "1854:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_VoucherKernel_$4283_$", - "typeString": "type(contract VoucherKernel)" - } - }, - "id": 76, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1854:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "src": "1838:45:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 78, - "nodeType": "ExpressionStatement", - "src": "1838:45:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 79, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "1893:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 80, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1907:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 81, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1907:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1893:24:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 83, - "nodeType": "ExpressionStatement", - "src": "1893:24:0" - } - ] - }, - "documentation": null, - "id": 85, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 71, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 70, - "mutability": "mutable", - "name": "_voucherKernel", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 85, - "src": "1778:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 69, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1778:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1768:38:0" - }, - "returnParameters": { - "id": 72, - "nodeType": "ParameterList", - "parameters": [], - "src": "1828:0:0" - }, - "scope": 717, - "src": "1757:206:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 159, - "nodeType": "Block", - "src": "2823:1127:0", - "statements": [ - { - "assignments": [ - 104 - ], - "declarations": [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 159, - "src": "2833:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 103, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2833:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 105, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "2833:17:0" - }, - { - "assignments": [ - 107 - ], - "declarations": [ - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "weiReceived", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 159, - "src": "2869:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 106, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2869:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 110, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 108, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2891:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2891:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2869:31:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 111, - "name": "promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "2992:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 114, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3037:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3037:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 116, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "3049:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "argumentTypes": null, - "id": 117, - "name": "_validFrom", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "3062:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 118, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3074:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 119, - "name": "_price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3084:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 120, - "name": "_depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "3092:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 121, - "name": "_depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "3104:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 112, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "3004:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "createAssetPromise", - "nodeType": "MemberAccess", - "referencedDeclaration": 2933, - "src": "3004:32:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,string memory,uint256,uint256,uint256,uint256,uint256) external returns (bytes32)" - } - }, - "id": 122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3004:111:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "2992:123:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 124, - "nodeType": "ExpressionStatement", - "src": "2992:123:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 126, - "name": "_depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "3500:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 127, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "3513:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3500:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 129, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 107, - "src": "3526:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3500:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e434f52524543545f46554e4453", - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3539:17:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - }, - "value": "INCORRECT_FUNDS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - } - ], - "id": 125, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3492:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3492:65:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 133, - "nodeType": "ExpressionStatement", - "src": "3492:65:0" - }, - { - "assignments": [ - 135 - ], - "declarations": [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 159, - "src": "3670:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3670:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 143, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 138, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3720:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3720:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 140, - "name": "promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "3732:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 141, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "3743:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 136, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "3694:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "createOrder", - "nodeType": "MemberAccess", - "referencedDeclaration": 3004, - "src": "3694:25:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,bytes32,uint256) external returns (uint256)" - } - }, - "id": 142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3694:59:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3670:83:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 144, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "3809:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 147, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 145, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3816:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3816:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3809:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 148, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 107, - "src": "3831:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3809:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 150, - "nodeType": "ExpressionStatement", - "src": "3809:33:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 152, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 135, - "src": "3887:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3902:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3902:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 155, - "name": "promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "3914:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 156, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "3925:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 151, - "name": "LogOrderCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "3871:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", - "typeString": "function (uint256,address,bytes32,uint256)" - } - }, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3871:64:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 158, - "nodeType": "EmitStatement", - "src": "3866:69:0" - } - ] - }, - "documentation": { - "id": 86, - "nodeType": "StructuredDocumentation", - "src": "1978:435:0", - "text": " @notice Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\n@param _assetTitle Name of the asset\n@param _validFrom Start of valid period\n@param _validTo End of valid period\n@param _price Price (payment amount)\n@param _depositSe Seller's deposit\n@param _depositBu Buyer's deposit\n @param _quantity Quantity on offer" - }, - "functionSelector": "fffa8d6b", - "id": 160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "requestCreateOrder", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "_assetTitle", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2455:27:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 87, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2455:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "_validFrom", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2520:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 89, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2520:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 92, - "mutability": "mutable", - "name": "_validTo", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2548:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 91, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2548:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "_price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2574:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 93, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2574:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 96, - "mutability": "mutable", - "name": "_depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2598:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 95, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2598:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "mutability": "mutable", - "name": "_depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2626:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2626:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 100, - "mutability": "mutable", - "name": "_quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2758:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 99, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2758:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2445:340:0" - }, - "returnParameters": { - "id": 102, - "nodeType": "ParameterList", - "parameters": [], - "src": "2823:0:0" - }, - "scope": 717, - "src": "2418:1532:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 224, - "nodeType": "Block", - "src": "4342:741:0", - "statements": [ - { - "assignments": [ - 171 - ], - "declarations": [ - { - "constant": false, - "id": 171, - "mutability": "mutable", - "name": "weiReceived", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4352:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 170, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4352:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 174, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 172, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4374:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4374:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4352:31:0" - }, - { - "assignments": [ - 176, - 178, - 180 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4412:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4412:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "mutability": "mutable", - "name": "depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4427:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 177, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4427:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 180, - "mutability": "mutable", - "name": "depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4446:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4446:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 185, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 183, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "4495:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 181, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "4467:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getOrderCosts", - "nodeType": "MemberAccess", - "referencedDeclaration": 4191, - "src": "4467:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" - } - }, - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4467:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4411:99:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 187, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4529:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 188, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "4537:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4529:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 190, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 171, - "src": "4550:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4529:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e434f52524543545f46554e4453", - "id": 192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4563:17:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - }, - "value": "INCORRECT_FUNDS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - } - ], - "id": 186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4521:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4521:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 194, - "nodeType": "ExpressionStatement", - "src": "4521:60:0" - }, - { - "assignments": [ - 196 - ], - "declarations": [ - { - "constant": false, - "id": 196, - "mutability": "mutable", - "name": "voucherTokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4757:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 195, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4757:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 204, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 199, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "4806:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 200, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "4822:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 201, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4831:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4831:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "id": 197, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "4782:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "fillOrder", - "nodeType": "MemberAccess", - "referencedDeclaration": 3031, - "src": "4782:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (uint256,address,address) external returns (uint256)" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4782:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4757:85:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 205, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "4890:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 208, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 206, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4897:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4897:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4890:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 209, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 171, - "src": "4912:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4890:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 211, - "nodeType": "ExpressionStatement", - "src": "4890:33:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 213, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "4967:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 214, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "4983:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 215, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "4999:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 216, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5008:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5008:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 220, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "5060:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 218, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "5020:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPromiseIdFromVoucherId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4130, - "src": "5020:39:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view external returns (bytes32)" - } - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5020:55:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 212, - "name": "LogVoucherDelivered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "4947:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (uint256,uint256,address,address,bytes32)" - } - }, - "id": 222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4947:129:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 223, - "nodeType": "EmitStatement", - "src": "4942:134:0" - } - ] - }, - "documentation": { - "id": 161, - "nodeType": "StructuredDocumentation", - "src": "3965:248:0", - "text": " @notice Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the issuer of the supply token" - }, - "functionSelector": "86b1c509", - "id": 225, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 168, - "modifierName": { - "argumentTypes": null, - "id": 167, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4855, - "src": "4325:12:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4325:12:0" - } - ], - "name": "requestVoucher", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 163, - "mutability": "mutable", - "name": "_tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 225, - "src": "4242:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4242:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 165, - "mutability": "mutable", - "name": "_issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 225, - "src": "4266:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4266:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4241:41:0" - }, - "returnParameters": { - "id": 169, - "nodeType": "ParameterList", - "parameters": [], - "src": "4342:0:0" - }, - "scope": 717, - "src": "4218:865:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 630, - "nodeType": "Block", - "src": "5575:5957:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 235, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "5621:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5621:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5647:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5621:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "454d5054595f4c495354", - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5650:12:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22a79597d0ccbbb84f001fb7503c94596445f0a626d33b4e0f78ccd25e1c697a", - "typeString": "literal_string \"EMPTY_LIST\"" - }, - "value": "EMPTY_LIST" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22a79597d0ccbbb84f001fb7503c94596445f0a626d33b4e0f78ccd25e1c697a", - "typeString": "literal_string \"EMPTY_LIST\"" - } - ], - "id": 234, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5613:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5613:50:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 241, - "nodeType": "ExpressionStatement", - "src": "5613:50:0" - }, - { - "assignments": [ - 243 - ], - "declarations": [ - { - "constant": false, - "id": 243, - "mutability": "mutable", - "name": "amount2pool", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5772:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5772:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5772:19:0" - }, - { - "assignments": [ - 246 - ], - "declarations": [ - { - "constant": false, - "id": 246, - "mutability": "mutable", - "name": "amount2issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5801:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5801:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 247, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5801:21:0" - }, - { - "assignments": [ - 249 - ], - "declarations": [ - { - "constant": false, - "id": 249, - "mutability": "mutable", - "name": "amount2holder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5832:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 248, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5832:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 250, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5832:21:0" - }, - { - "assignments": [ - 252 - ], - "declarations": [ - { - "constant": false, - "id": 252, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5863:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5863:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 253, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5863:22:0" - }, - { - "assignments": [ - 255 - ], - "declarations": [ - { - "constant": false, - "id": 255, - "mutability": "mutable", - "name": "holder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5895:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 254, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5895:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 256, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5895:22:0" - }, - { - "assignments": [ - 258 - ], - "declarations": [ - { - "constant": false, - "id": 258, - "mutability": "mutable", - "name": "price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5936:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5936:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 259, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5936:13:0" - }, - { - "assignments": [ - 261 - ], - "declarations": [ - { - "constant": false, - "id": 261, - "mutability": "mutable", - "name": "depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5959:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 260, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5959:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 262, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5959:17:0" - }, - { - "assignments": [ - 264 - ], - "declarations": [ - { - "constant": false, - "id": 264, - "mutability": "mutable", - "name": "depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5986:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 263, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5986:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 265, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5986:17:0" - }, - { - "assignments": [ - 267 - ], - "declarations": [ - { - "constant": false, - "id": 267, - "mutability": "mutable", - "name": "tFraction", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "6013:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 266, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6013:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 268, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "6013:17:0" - }, - { - "assignments": [ - 270 - ], - "declarations": [ - { - "constant": false, - "id": 270, - "mutability": "mutable", - "name": "tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "6049:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 269, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6049:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 271, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "6049:21:0" - }, - { - "assignments": [ - 273 - ], - "declarations": [ - { - "constant": false, - "id": 273, - "mutability": "mutable", - "name": "currStatus", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "6080:31:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus" - }, - "typeName": { - "contractScope": null, - "id": 272, - "name": "VoucherStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4321, - "src": "6080:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage_ptr", - "typeString": "struct usingHelpers.VoucherStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 274, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "6080:31:0" - }, - { - "body": { - "id": 598, - "nodeType": "Block", - "src": "6510:4707:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 287, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6532:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 289, - "indexExpression": { - "argumentTypes": null, - "id": 288, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6549:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6532:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6555:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6532:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6558:16:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - }, - "value": "UNSPECIFIED_ID" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - } - ], - "id": 286, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6524:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 294, - "nodeType": "ExpressionStatement", - "src": "6524:51:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 295, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "6696:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 297, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "6696:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 298, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "6715:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 299, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "6715:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 300, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "6745:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 301, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "6745:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 302, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "6695:80:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "tuple(uint8,bool,bool)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 305, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6809:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 307, - "indexExpression": { - "argumentTypes": null, - "id": 306, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6826:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6809:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 303, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "6778:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVoucherStatus", - "nodeType": "MemberAccess", - "referencedDeclaration": 4218, - "src": "6778:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "function (uint256) view external returns (uint8,bool,bool)" - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6778:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "tuple(uint8,bool,bool)" - } - }, - "src": "6695:134:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 310, - "nodeType": "ExpressionStatement", - "src": "6695:134:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 311, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "6843:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 314, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6896:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 316, - "indexExpression": { - "argumentTypes": null, - "id": 315, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6913:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6896:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 312, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "6859:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getIdSupplyFromVoucher", - "nodeType": "MemberAccess", - "referencedDeclaration": 4101, - "src": "6859:36:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure external returns (uint256)" - } - }, - "id": 317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6859:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6843:73:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 319, - "nodeType": "ExpressionStatement", - "src": "6843:73:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 320, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "6931:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 321, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "6938:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 322, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "6949:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 323, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "6930:29:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 326, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "6990:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 324, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "6962:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getOrderCosts", - "nodeType": "MemberAccess", - "referencedDeclaration": 4191, - "src": "6962:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" - } - }, - "id": 327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6962:42:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" - } - }, - "src": "6930:74:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 329, - "nodeType": "ExpressionStatement", - "src": "6930:74:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 330, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "7018:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 337, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "7075:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 339, - "indexExpression": { - "argumentTypes": null, - "id": 338, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7092:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7075:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 335, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "7044:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVoucherIssuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4231, - "src": "7044:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7044:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7035:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 333, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "7035:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7035:62:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7027:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7027:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7027:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7018:80:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 344, - "nodeType": "ExpressionStatement", - "src": "7018:80:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 345, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "7112:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 352, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "7169:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 354, - "indexExpression": { - "argumentTypes": null, - "id": 353, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7186:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7169:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 350, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "7138:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVoucherHolder", - "nodeType": "MemberAccess", - "referencedDeclaration": 4245, - "src": "7138:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" - } - }, - "id": 355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7138:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7129:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 348, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "7129:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7129:62:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7121:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7121:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7121:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7112:80:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 359, - "nodeType": "ExpressionStatement", - "src": "7112:80:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "7369:29:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 360, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7370:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 361, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "7370:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 364, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7433:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 365, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7433:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 366, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "7452:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 363, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7424:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7424:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 368, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7402:82:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7369:115:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "7758:29:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 389, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7759:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 390, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "7759:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 393, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7822:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 394, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7822:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 395, - "name": "idxRefund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "7841:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 392, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7813:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7813:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 398, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7884:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 399, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7884:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 400, - "name": "idxExpire", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4301, - "src": "7903:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 397, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7875:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7875:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7813:100:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 404, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7947:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 405, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7947:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 406, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "7966:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 403, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7938:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7938:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "8010:39:0", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 409, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8020:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 410, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8020:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 411, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "8039:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 408, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8011:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8011:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7938:111:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 415, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7937:113:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7813:237:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 417, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7791:281:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7758:314:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 438, - "nodeType": "IfStatement", - "src": "7754:571:0", - "trueBody": { - "id": 437, - "nodeType": "Block", - "src": "8074:251:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 419, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "8176:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 421, - "indexExpression": { - "argumentTypes": null, - "id": 420, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "8183:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8176:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 422, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "8194:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8176:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 424, - "nodeType": "ExpressionStatement", - "src": "8176:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 425, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "8217:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 426, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "8234:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8217:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 428, - "nodeType": "ExpressionStatement", - "src": "8217:22:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 432, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "8290:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 434, - "indexExpression": { - "argumentTypes": null, - "id": 433, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "8307:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8290:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 429, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "8257:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 3772, - "src": "8257:32:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8257:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 436, - "nodeType": "ExpressionStatement", - "src": "8257:53:0" - } - ] - } - }, - "id": 439, - "nodeType": "IfStatement", - "src": "7365:960:0", - "trueBody": { - "id": 388, - "nodeType": "Block", - "src": "7486:262:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 370, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "7581:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 372, - "indexExpression": { - "argumentTypes": null, - "id": 371, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "7588:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7581:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 373, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7599:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7581:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 375, - "nodeType": "ExpressionStatement", - "src": "7581:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 376, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "7622:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 377, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7639:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7622:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 379, - "nodeType": "ExpressionStatement", - "src": "7622:22:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 383, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "7696:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 385, - "indexExpression": { - "argumentTypes": null, - "id": 384, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7713:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7696:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 380, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "7663:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 3772, - "src": "7663:32:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7663:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 387, - "nodeType": "ExpressionStatement", - "src": "7663:53:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "8472:30:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 440, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8473:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "8473:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 444, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8532:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 445, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8532:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 446, - "name": "idxFinal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "8551:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 443, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8523:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8523:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8472:88:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 597, - "nodeType": "IfStatement", - "src": "8468:2701:0", - "trueBody": { - "id": 596, - "nodeType": "Block", - "src": "8562:2607:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 450, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8670:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 451, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8670:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 452, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "8689:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 449, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8661:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8661:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 552, - "nodeType": "Block", - "src": "9513:995:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 513, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "9548:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "9548:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 515, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "9567:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 512, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "9539:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9539:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 550, - "nodeType": "Block", - "src": "10293:197:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 540, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "10363:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 542, - "indexExpression": { - "argumentTypes": null, - "id": 541, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "10370:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10363:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 543, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "10381:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10363:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 545, - "nodeType": "ExpressionStatement", - "src": "10363:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 546, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "10416:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 547, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "10433:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10416:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 549, - "nodeType": "ExpressionStatement", - "src": "10416:26:0" - } - ] - }, - "id": 551, - "nodeType": "IfStatement", - "src": "9535:955:0", - "trueBody": { - "id": 539, - "nodeType": "Block", - "src": "9584:703:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 517, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "9669:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 519, - "indexExpression": { - "argumentTypes": null, - "id": 518, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "9676:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9669:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 520, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9687:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9669:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 522, - "nodeType": "ExpressionStatement", - "src": "9669:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 523, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "9722:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 526, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9753:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 524, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9739:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9739:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9739:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9722:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 529, - "nodeType": "ExpressionStatement", - "src": "9722:49:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 530, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "9797:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 531, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9814:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 534, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9840:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 532, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9826:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9826:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9826:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9814:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9797:61:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 538, - "nodeType": "ExpressionStatement", - "src": "9797:61:0" - } - ] - } - } - ] - }, - "id": 553, - "nodeType": "IfStatement", - "src": "8657:1851:0", - "trueBody": { - "id": 511, - "nodeType": "Block", - "src": "8703:804:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 455, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8738:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 456, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8738:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 457, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "8757:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 454, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8729:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8729:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 509, - "nodeType": "Block", - "src": "9321:168:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 499, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "9389:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 501, - "indexExpression": { - "argumentTypes": null, - "id": 500, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "9396:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9389:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 502, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9407:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9389:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 504, - "nodeType": "ExpressionStatement", - "src": "9389:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 505, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "9442:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 506, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9457:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9442:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "9442:24:0" - } - ] - }, - "id": 510, - "nodeType": "IfStatement", - "src": "8725:764:0", - "trueBody": { - "id": 498, - "nodeType": "Block", - "src": "8774:541:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 459, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "8858:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 461, - "indexExpression": { - "argumentTypes": null, - "id": 460, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "8865:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8858:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 462, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8876:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8858:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "8858:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 465, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "8911:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 468, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "8937:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 466, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8923:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "8923:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8923:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8911:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 471, - "nodeType": "ExpressionStatement", - "src": "8911:44:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 472, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "8981:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 473, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "8998:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8981:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 475, - "nodeType": "ExpressionStatement", - "src": "8981:26:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 476, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "9056:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 479, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9087:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 477, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9073:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9073:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9073:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9056:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 482, - "nodeType": "ExpressionStatement", - "src": "9056:49:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 483, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "9159:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 484, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9174:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 485, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9186:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9174:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 489, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9212:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 487, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9198:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9198:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9198:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9174:56:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9159:71:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 493, - "nodeType": "ExpressionStatement", - "src": "9159:71:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 494, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9279:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9291:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9279:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 497, - "nodeType": "ExpressionStatement", - "src": "9279:13:0" - } - ] - } - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 555, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "10612:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 556, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "10612:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 557, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "10631:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 554, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "10603:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10603:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 560, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "10675:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 561, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "10675:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 562, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "10694:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 559, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "10666:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10666:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10603:106:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 586, - "nodeType": "Block", - "src": "10894:172:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 576, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "10954:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 578, - "indexExpression": { - "argumentTypes": null, - "id": 577, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "10961:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10954:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 579, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "10972:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10954:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 581, - "nodeType": "ExpressionStatement", - "src": "10954:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 582, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "11003:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 583, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "11018:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11003:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 585, - "nodeType": "ExpressionStatement", - "src": "11003:24:0" - } - ] - }, - "id": 587, - "nodeType": "IfStatement", - "src": "10599:467:0", - "trueBody": { - "id": 575, - "nodeType": "Block", - "src": "10732:156:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 565, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "10794:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 567, - "indexExpression": { - "argumentTypes": null, - "id": 566, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "10801:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10794:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 568, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "10812:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10794:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 570, - "nodeType": "ExpressionStatement", - "src": "10794:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 571, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "10843:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 572, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "10860:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10843:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 574, - "nodeType": "ExpressionStatement", - "src": "10843:26:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 591, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "11134:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 593, - "indexExpression": { - "argumentTypes": null, - "id": 592, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "11151:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11134:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 588, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "11100:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 3800, - "src": "11100:33:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11100:54:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 595, - "nodeType": "ExpressionStatement", - "src": "11100:54:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 279, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6476:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 280, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6480:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6480:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6476:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 599, - "initializationExpression": { - "assignments": [ - 276 - ], - "declarations": [ - { - "constant": false, - "id": 276, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 599, - "src": "6461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 275, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6461:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 278, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6473:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6461:13:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6505:3:0", - "subExpression": { - "argumentTypes": null, - "id": 283, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6505:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 285, - "nodeType": "ExpressionStatement", - "src": "6505:3:0" - }, - "nodeType": "ForStatement", - "src": "6457:4760:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 600, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "11252:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11266:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11252:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 609, - "nodeType": "IfStatement", - "src": "11248:81:0", - "trueBody": { - "id": 608, - "nodeType": "Block", - "src": "11269:60:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 604, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11293:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 605, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "11306:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 603, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11283:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11283:35:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 607, - "nodeType": "ExpressionStatement", - "src": "11283:35:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 610, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "11351:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11367:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11351:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 619, - "nodeType": "IfStatement", - "src": "11347:80:0", - "trueBody": { - "id": 618, - "nodeType": "Block", - "src": "11370:57:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 614, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "11394:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 615, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "11402:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 613, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11384:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11384:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 617, - "nodeType": "ExpressionStatement", - "src": "11384:32:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 620, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "11441:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11457:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11441:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 629, - "nodeType": "IfStatement", - "src": "11437:80:0", - "trueBody": { - "id": 628, - "nodeType": "Block", - "src": "11460:57:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 624, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "11484:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 625, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "11492:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 623, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11474:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11474:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 627, - "nodeType": "ExpressionStatement", - "src": "11474:32:0" - } - ] - } - } - ] - }, - "documentation": { - "id": 226, - "nodeType": "StructuredDocumentation", - "src": "5090:383:0", - "text": " @notice Trigger withdrawals of what funds are releasable\n The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\n @dev This function would be optimized a lot, here verbose for readability.\n @param _tokenIdVouchers an array of voucher tokens (ERC-721) to try withdraw funds from" - }, - "functionSelector": "983d95ce", - "id": 631, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 232, - "modifierName": { - "argumentTypes": null, - "id": 231, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4855, - "src": "5558:12:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "5558:12:0" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 230, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 229, - "mutability": "mutable", - "name": "_tokenIdVouchers", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 631, - "src": "5496:35:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5496:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 228, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5496:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5495:37:0" - }, - "returnParameters": { - "id": 233, - "nodeType": "ParameterList", - "parameters": [], - "src": "5575:0:0" - }, - "scope": 717, - "src": "5478:6054:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 663, - "nodeType": "Block", - "src": "11709:231:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 639, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "11768:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 641, - "indexExpression": { - "argumentTypes": null, - "id": 640, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11775:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11768:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11790:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11768:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 662, - "nodeType": "IfStatement", - "src": "11764:170:0", - "trueBody": { - "id": 661, - "nodeType": "Block", - "src": "11793:141:0", - "statements": [ - { - "assignments": [ - 645 - ], - "declarations": [ - { - "constant": false, - "id": 645, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 661, - "src": "11807:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 644, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11807:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 649, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 646, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "11824:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 648, - "indexExpression": { - "argumentTypes": null, - "id": 647, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11831:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11824:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11807:36:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 650, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "11857:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 652, - "indexExpression": { - "argumentTypes": null, - "id": 651, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11864:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11857:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11879:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11857:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 655, - "nodeType": "ExpressionStatement", - "src": "11857:23:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 657, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11904:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 658, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 645, - "src": "11916:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 656, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11894:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11894:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 660, - "nodeType": "ExpressionStatement", - "src": "11894:29:0" - } - ] - } - } - ] - }, - "documentation": { - "id": 632, - "nodeType": "StructuredDocumentation", - "src": "11547:62:0", - "text": " @notice Trigger withdrawals of pooled funds" - }, - "functionSelector": "5c42c733", - "id": 664, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 635, - "modifierName": { - "argumentTypes": null, - "id": 634, - "name": "onlyPoolManager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "11668:15:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "11668:15:0" - }, - { - "arguments": null, - "id": 637, - "modifierName": { - "argumentTypes": null, - "id": 636, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4855, - "src": "11692:12:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "11692:12:0" - } - ], - "name": "withdrawPool", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 633, - "nodeType": "ParameterList", - "parameters": [], - "src": "11639:2:0" - }, - "returnParameters": { - "id": 638, - "nodeType": "ParameterList", - "parameters": [], - "src": "11709:0:0" - }, - "scope": 717, - "src": "11618:322:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 702, - "nodeType": "Block", - "src": "12524:309:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 673, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "12542:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12564:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12556:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 674, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12556:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12556:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "12542:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f41444452455353", - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12568:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - }, - "value": "UNSPECIFIED_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - } - ], - "id": 672, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12534:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12534:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 681, - "nodeType": "ExpressionStatement", - "src": "12534:56:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 683, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "12700:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12710:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12700:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12713:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "id": 682, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12692:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12692:24:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "12692:24:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 692, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "12756:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 689, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "12735:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sendValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 4675, - "src": "12735:20:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12735:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 694, - "nodeType": "ExpressionStatement", - "src": "12735:29:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 696, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "12794:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12794:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 698, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "12806:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 699, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "12818:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 695, - "name": "LogWithdrawal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "12780:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12780:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 701, - "nodeType": "EmitStatement", - "src": "12775:51:0" - } - ] - }, - "documentation": { - "id": 665, - "nodeType": "StructuredDocumentation", - "src": "11959:475:0", - "text": " @notice Internal function for withdrawing.\n As unbelievable as it is, neither .send() nor .transfer() are now secure to use due to EIP-1884\n So now transfering funds via the last remaining option: .call()\n See https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/ \n @param _recipient address of the account receiving funds from the escrow\n @param _amount amount to be released from escrow" - }, - "id": 703, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 670, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 667, - "mutability": "mutable", - "name": "_recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 703, - "src": "12458:26:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 666, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12458:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 669, - "mutability": "mutable", - "name": "_amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 703, - "src": "12486:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 668, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12486:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12457:45:0" - }, - "returnParameters": { - "id": 671, - "nodeType": "ParameterList", - "parameters": [], - "src": "12524:0:0" - }, - "scope": 717, - "src": "12439:394:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 715, - "nodeType": "Block", - "src": "13204:40:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 711, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "13221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 713, - "indexExpression": { - "argumentTypes": null, - "id": 712, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 706, - "src": "13228:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13221:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 710, - "id": 714, - "nodeType": "Return", - "src": "13214:23:0" - } - ] - }, - "documentation": { - "id": 704, - "nodeType": "StructuredDocumentation", - "src": "12935:170:0", - "text": " @notice Get the amount in escrow of an address\n @param _account The address of an account to query\n @return The balance in escrow" - }, - "functionSelector": "d1358365", - "id": 716, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getEscrowAmount", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 707, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 706, - "mutability": "mutable", - "name": "_account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 716, - "src": "13135:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 705, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13135:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13134:18:0" - }, - "returnParameters": { - "id": 710, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 709, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 716, - "src": "13191:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 708, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13191:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13190:9:0" - }, - "scope": 717, - "src": "13110:134:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 718, - "src": "475:12776:0" - } - ], - "src": "47:13204:0" - }, - "legacyAST": { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/Cashier.sol", - "exportedSymbols": { - "Cashier": [ - 717 - ] - }, - "id": 718, - "license": "LGPL-3.0-or-later", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.6", - ".2", - "<", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "47:31:0" - }, - { - "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 718, - "sourceUnit": 4857, - "src": "80:59:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/VoucherKernel.sol", - "file": "./VoucherKernel.sol", - "id": 3, - "nodeType": "ImportDirective", - "scope": 718, - "sourceUnit": 4284, - "src": "194:29:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/vlad/Projects/redeemeum/bsn-core-prototype/contracts/usingHelpers.sol", - "file": "./usingHelpers.sol", - "id": 4, - "nodeType": "ImportDirective", - "scope": 718, - "sourceUnit": 4426, - "src": "224:28:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6, - "name": "usingHelpers", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4425, - "src": "495:12:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_usingHelpers_$4425", - "typeString": "contract usingHelpers" - } - }, - "id": 7, - "nodeType": "InheritanceSpecifier", - "src": "495:12:0" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8, - "name": "ReentrancyGuard", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4856, - "src": "509:15:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ReentrancyGuard_$4856", - "typeString": "contract ReentrancyGuard" - } - }, - "id": 9, - "nodeType": "InheritanceSpecifier", - "src": "509:15:0" - } - ], - "contractDependencies": [ - 4425, - 4856 - ], - "contractKind": "contract", - "documentation": { - "id": 5, - "nodeType": "StructuredDocumentation", - "src": "254:220:0", - "text": " @title Contract for managing funds\n @dev Warning: the contract hasn't been audited yet!\n Roughly following OpenZeppelin's Escrow at https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/payment/" - }, - "fullyImplemented": true, - "id": 717, - "linearizedBaseContracts": [ - 717, - 4856, - 4425 - ], - "name": "Cashier", - "nodeType": "ContractDefinition", - "nodes": [ - { - "id": 12, - "libraryName": { - "contractScope": null, - "id": 10, - "name": "Address", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4816, - "src": "537:7:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Address_$4816", - "typeString": "library Address" - } - }, - "nodeType": "UsingForDirective", - "src": "531:34:0", - "typeName": { - "id": 11, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "549:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - }, - { - "id": 15, - "libraryName": { - "contractScope": null, - "id": 13, - "name": "SafeMath", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4621, - "src": "576:8:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_SafeMath_$4621", - "typeString": "library SafeMath" - } - }, - "nodeType": "UsingForDirective", - "src": "570:24:0", - "typeName": { - "id": 14, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "589:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "voucherKernel", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "604:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - }, - "typeName": { - "contractScope": null, - "id": 16, - "name": "VoucherKernel", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4283, - "src": "604:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 19, - "mutability": "mutable", - "name": "poolAddress", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "642:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 18, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "642:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "functionSelector": "57d3c7c3", - "id": 23, - "mutability": "mutable", - "name": "escrow", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "737:41:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 22, - "keyType": { - "id": 20, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "745:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "737:27:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 21, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "756:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": true, - "id": 26, - "mutability": "constant", - "name": "CANCELFAULT_SPLIT", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 717, - "src": "955:47:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 24, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "955:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "32", - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1001:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "visibility": "internal" - }, - { - "anonymous": false, - "documentation": null, - "id": 36, - "name": "LogOrderCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 35, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 28, - "indexed": true, - "mutability": "mutable", - "name": "_tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1115:30:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 27, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1115:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "indexed": false, - "mutability": "mutable", - "name": "_seller", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1155:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 29, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1155:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 32, - "indexed": false, - "mutability": "mutable", - "name": "_promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1180:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 31, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1180:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "indexed": false, - "mutability": "mutable", - "name": "_quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 36, - "src": "1209:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1209:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1105:127:0" - }, - "src": "1084:149:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 48, - "name": "LogVoucherDelivered", - "nodeType": "EventDefinition", - "parameters": { - "id": 47, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 38, - "indexed": true, - "mutability": "mutable", - "name": "_tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1278:30:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 37, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1278:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 40, - "indexed": false, - "mutability": "mutable", - "name": "_tokenIdVoucher", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1318:23:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1318:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "indexed": false, - "mutability": "mutable", - "name": "_issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1351:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1351:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 44, - "indexed": false, - "mutability": "mutable", - "name": "_holder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1376:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 43, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1376:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 46, - "indexed": false, - "mutability": "mutable", - "name": "_promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 48, - "src": "1401:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 45, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1401:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1268:157:0" - }, - "src": "1243:183:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 56, - "name": "LogWithdrawal", - "nodeType": "EventDefinition", - "parameters": { - "id": 55, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 50, - "indexed": false, - "mutability": "mutable", - "name": "_caller", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 56, - "src": "1468:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 49, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1468:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 52, - "indexed": false, - "mutability": "mutable", - "name": "_payee", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 56, - "src": "1493:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 51, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1493:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 54, - "indexed": false, - "mutability": "mutable", - "name": "_payment", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 56, - "src": "1518:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 53, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1518:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1458:82:0" - }, - "src": "1439:102:0" - }, - { - "body": { - "id": 67, - "nodeType": "Block", - "src": "1579:164:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 62, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 59, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1597:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1597:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 61, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "1611:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1597:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e415554484f52495a45445f50", - "id": 63, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1624:16:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aebf3a6b04b3dc03d6a17c8eefcfd867936fc97baa984366ad3e2233827bad6e", - "typeString": "literal_string \"UNAUTHORIZED_P\"" - }, - "value": "UNAUTHORIZED_P" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aebf3a6b04b3dc03d6a17c8eefcfd867936fc97baa984366ad3e2233827bad6e", - "typeString": "literal_string \"UNAUTHORIZED_P\"" - } - ], - "id": 58, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1589:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1589:52:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "1589:52:0" - }, - { - "id": 66, - "nodeType": "PlaceholderStatement", - "src": "1735:1:0" - } - ] - }, - "documentation": null, - "id": 68, - "name": "onlyPoolManager", - "nodeType": "ModifierDefinition", - "overrides": null, - "parameters": { - "id": 57, - "nodeType": "ParameterList", - "parameters": [], - "src": "1576:2:0" - }, - "src": "1552:191:0", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 84, - "nodeType": "Block", - "src": "1828:135:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 77, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 73, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1838:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 75, - "name": "_voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 70, - "src": "1868:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 74, - "name": "VoucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4283, - "src": "1854:13:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_VoucherKernel_$4283_$", - "typeString": "type(contract VoucherKernel)" - } - }, - "id": 76, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1854:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "src": "1838:45:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 78, - "nodeType": "ExpressionStatement", - "src": "1838:45:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 82, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 79, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "1893:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 80, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1907:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 81, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1907:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1893:24:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 83, - "nodeType": "ExpressionStatement", - "src": "1893:24:0" - } - ] - }, - "documentation": null, - "id": 85, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 71, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 70, - "mutability": "mutable", - "name": "_voucherKernel", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 85, - "src": "1778:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 69, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1778:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1768:38:0" - }, - "returnParameters": { - "id": 72, - "nodeType": "ParameterList", - "parameters": [], - "src": "1828:0:0" - }, - "scope": 717, - "src": "1757:206:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 159, - "nodeType": "Block", - "src": "2823:1127:0", - "statements": [ - { - "assignments": [ - 104 - ], - "declarations": [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "promiseId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 159, - "src": "2833:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 103, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2833:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 105, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "2833:17:0" - }, - { - "assignments": [ - 107 - ], - "declarations": [ - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "weiReceived", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 159, - "src": "2869:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 106, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2869:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 110, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 108, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2891:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 109, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2891:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2869:31:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 123, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 111, - "name": "promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "2992:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 114, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3037:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3037:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 116, - "name": "_assetTitle", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "3049:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - { - "argumentTypes": null, - "id": 117, - "name": "_validFrom", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "3062:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 118, - "name": "_validTo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3074:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 119, - "name": "_price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3084:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 120, - "name": "_depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "3092:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 121, - "name": "_depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "3104:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 112, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "3004:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 113, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "createAssetPromise", - "nodeType": "MemberAccess", - "referencedDeclaration": 2933, - "src": "3004:32:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_string_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (address,string memory,uint256,uint256,uint256,uint256,uint256) external returns (bytes32)" - } - }, - "id": 122, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3004:111:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "2992:123:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 124, - "nodeType": "ExpressionStatement", - "src": "2992:123:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 130, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 126, - "name": "_depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "3500:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "id": 127, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "3513:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3500:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 129, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 107, - "src": "3526:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3500:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e434f52524543545f46554e4453", - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3539:17:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - }, - "value": "INCORRECT_FUNDS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - } - ], - "id": 125, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3492:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3492:65:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 133, - "nodeType": "ExpressionStatement", - "src": "3492:65:0" - }, - { - "assignments": [ - 135 - ], - "declarations": [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 159, - "src": "3670:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3670:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 143, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 138, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3720:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3720:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 140, - "name": "promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "3732:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 141, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "3743:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 136, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "3694:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 137, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "createOrder", - "nodeType": "MemberAccess", - "referencedDeclaration": 3004, - "src": "3694:25:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (address,bytes32,uint256) external returns (uint256)" - } - }, - "id": 142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3694:59:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3670:83:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 149, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 144, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "3809:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 147, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 145, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3816:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3816:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3809:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 148, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 107, - "src": "3831:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3809:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 150, - "nodeType": "ExpressionStatement", - "src": "3809:33:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 152, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 135, - "src": "3887:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 153, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3902:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3902:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 155, - "name": "promiseId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "3914:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 156, - "name": "_quantity", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "3925:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 151, - "name": "LogOrderCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "3871:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_bytes32_$_t_uint256_$returns$__$", - "typeString": "function (uint256,address,bytes32,uint256)" - } - }, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3871:64:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 158, - "nodeType": "EmitStatement", - "src": "3866:69:0" - } - ] - }, - "documentation": { - "id": 86, - "nodeType": "StructuredDocumentation", - "src": "1978:435:0", - "text": " @notice Issuer/Seller offers promises as supply tokens and needs to escrow the deposit\n@param _assetTitle Name of the asset\n@param _validFrom Start of valid period\n@param _validTo End of valid period\n@param _price Price (payment amount)\n@param _depositSe Seller's deposit\n@param _depositBu Buyer's deposit\n @param _quantity Quantity on offer" - }, - "functionSelector": "fffa8d6b", - "id": 160, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "requestCreateOrder", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 101, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "_assetTitle", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2455:27:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 87, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "2455:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "_validFrom", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2520:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 89, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2520:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 92, - "mutability": "mutable", - "name": "_validTo", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2548:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 91, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2548:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "mutability": "mutable", - "name": "_price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2574:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 93, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2574:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 96, - "mutability": "mutable", - "name": "_depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2598:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 95, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2598:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "mutability": "mutable", - "name": "_depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2626:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2626:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 100, - "mutability": "mutable", - "name": "_quantity", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 160, - "src": "2758:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 99, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2758:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2445:340:0" - }, - "returnParameters": { - "id": 102, - "nodeType": "ParameterList", - "parameters": [], - "src": "2823:0:0" - }, - "scope": 717, - "src": "2418:1532:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 224, - "nodeType": "Block", - "src": "4342:741:0", - "statements": [ - { - "assignments": [ - 171 - ], - "declarations": [ - { - "constant": false, - "id": 171, - "mutability": "mutable", - "name": "weiReceived", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4352:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 170, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4352:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 174, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 172, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4374:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4374:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4352:31:0" - }, - { - "assignments": [ - 176, - 178, - 180 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4412:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 175, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4412:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 178, - "mutability": "mutable", - "name": "depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4427:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 177, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4427:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 180, - "mutability": "mutable", - "name": "depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4446:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 179, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4446:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 185, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 183, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "4495:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 181, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "4467:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 182, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getOrderCosts", - "nodeType": "MemberAccess", - "referencedDeclaration": 4191, - "src": "4467:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" - } - }, - "id": 184, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4467:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4411:99:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 187, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "4529:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 188, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "4537:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4529:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 190, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 171, - "src": "4550:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4529:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e434f52524543545f46554e4453", - "id": 192, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4563:17:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - }, - "value": "INCORRECT_FUNDS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_b363873e064254b0ace3c283b44940d2a86d96a44aa8b6a2a257e6d90eef15cf", - "typeString": "literal_string \"INCORRECT_FUNDS\"" - } - ], - "id": 186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4521:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4521:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 194, - "nodeType": "ExpressionStatement", - "src": "4521:60:0" - }, - { - "assignments": [ - 196 - ], - "declarations": [ - { - "constant": false, - "id": 196, - "mutability": "mutable", - "name": "voucherTokenId", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 224, - "src": "4757:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 195, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4757:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 204, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 199, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "4806:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 200, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "4822:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 201, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4831:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4831:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "id": 197, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "4782:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "fillOrder", - "nodeType": "MemberAccess", - "referencedDeclaration": 3031, - "src": "4782:23:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_address_$_t_address_$returns$_t_uint256_$", - "typeString": "function (uint256,address,address) external returns (uint256)" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4782:60:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4757:85:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 210, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 205, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "4890:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 208, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 206, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4897:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4897:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4890:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 209, - "name": "weiReceived", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 171, - "src": "4912:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4890:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 211, - "nodeType": "ExpressionStatement", - "src": "4890:33:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 213, - "name": "_tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "4967:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 214, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "4983:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 215, - "name": "_issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "4999:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 216, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "5008:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5008:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 220, - "name": "voucherTokenId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "5060:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 218, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "5020:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getPromiseIdFromVoucherId", - "nodeType": "MemberAccess", - "referencedDeclaration": 4130, - "src": "5020:39:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_bytes32_$", - "typeString": "function (uint256) view external returns (bytes32)" - } - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5020:55:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 212, - "name": "LogVoucherDelivered", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "4947:19:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (uint256,uint256,address,address,bytes32)" - } - }, - "id": 222, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4947:129:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 223, - "nodeType": "EmitStatement", - "src": "4942:134:0" - } - ] - }, - "documentation": { - "id": 161, - "nodeType": "StructuredDocumentation", - "src": "3965:248:0", - "text": " @notice Consumer requests/buys a voucher by filling an order and receiving a Voucher Token in return\n @param _tokenIdSupply ID of the supply token\n @param _issuer Address of the issuer of the supply token" - }, - "functionSelector": "86b1c509", - "id": 225, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 168, - "modifierName": { - "argumentTypes": null, - "id": 167, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4855, - "src": "4325:12:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4325:12:0" - } - ], - "name": "requestVoucher", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 166, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 163, - "mutability": "mutable", - "name": "_tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 225, - "src": "4242:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 162, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4242:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 165, - "mutability": "mutable", - "name": "_issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 225, - "src": "4266:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4266:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4241:41:0" - }, - "returnParameters": { - "id": 169, - "nodeType": "ParameterList", - "parameters": [], - "src": "4342:0:0" - }, - "scope": 717, - "src": "4218:865:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 630, - "nodeType": "Block", - "src": "5575:5957:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 235, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "5621:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 236, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5621:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5647:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "5621:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "454d5054595f4c495354", - "id": 239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5650:12:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_22a79597d0ccbbb84f001fb7503c94596445f0a626d33b4e0f78ccd25e1c697a", - "typeString": "literal_string \"EMPTY_LIST\"" - }, - "value": "EMPTY_LIST" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_22a79597d0ccbbb84f001fb7503c94596445f0a626d33b4e0f78ccd25e1c697a", - "typeString": "literal_string \"EMPTY_LIST\"" - } - ], - "id": 234, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "5613:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 240, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5613:50:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 241, - "nodeType": "ExpressionStatement", - "src": "5613:50:0" - }, - { - "assignments": [ - 243 - ], - "declarations": [ - { - "constant": false, - "id": 243, - "mutability": "mutable", - "name": "amount2pool", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5772:19:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 242, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5772:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 244, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5772:19:0" - }, - { - "assignments": [ - 246 - ], - "declarations": [ - { - "constant": false, - "id": 246, - "mutability": "mutable", - "name": "amount2issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5801:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 245, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5801:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 247, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5801:21:0" - }, - { - "assignments": [ - 249 - ], - "declarations": [ - { - "constant": false, - "id": 249, - "mutability": "mutable", - "name": "amount2holder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5832:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 248, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5832:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 250, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5832:21:0" - }, - { - "assignments": [ - 252 - ], - "declarations": [ - { - "constant": false, - "id": 252, - "mutability": "mutable", - "name": "issuer", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5863:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 251, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5863:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 253, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5863:22:0" - }, - { - "assignments": [ - 255 - ], - "declarations": [ - { - "constant": false, - "id": 255, - "mutability": "mutable", - "name": "holder", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5895:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 254, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "5895:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 256, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5895:22:0" - }, - { - "assignments": [ - 258 - ], - "declarations": [ - { - "constant": false, - "id": 258, - "mutability": "mutable", - "name": "price", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5936:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 257, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5936:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 259, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5936:13:0" - }, - { - "assignments": [ - 261 - ], - "declarations": [ - { - "constant": false, - "id": 261, - "mutability": "mutable", - "name": "depositSe", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5959:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 260, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5959:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 262, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5959:17:0" - }, - { - "assignments": [ - 264 - ], - "declarations": [ - { - "constant": false, - "id": 264, - "mutability": "mutable", - "name": "depositBu", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "5986:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 263, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5986:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 265, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "5986:17:0" - }, - { - "assignments": [ - 267 - ], - "declarations": [ - { - "constant": false, - "id": 267, - "mutability": "mutable", - "name": "tFraction", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "6013:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 266, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6013:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 268, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "6013:17:0" - }, - { - "assignments": [ - 270 - ], - "declarations": [ - { - "constant": false, - "id": 270, - "mutability": "mutable", - "name": "tokenIdSupply", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "6049:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 269, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6049:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 271, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "6049:21:0" - }, - { - "assignments": [ - 273 - ], - "declarations": [ - { - "constant": false, - "id": 273, - "mutability": "mutable", - "name": "currStatus", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 630, - "src": "6080:31:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus" - }, - "typeName": { - "contractScope": null, - "id": 272, - "name": "VoucherStatus", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 4321, - "src": "6080:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_storage_ptr", - "typeString": "struct usingHelpers.VoucherStatus" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 274, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "6080:31:0" - }, - { - "body": { - "id": 598, - "nodeType": "Block", - "src": "6510:4707:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 291, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 287, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6532:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 289, - "indexExpression": { - "argumentTypes": null, - "id": 288, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6549:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6532:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6555:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6532:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f4944", - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6558:16:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - }, - "value": "UNSPECIFIED_ID" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f35c8917c84e713013d205a351659cc8635d01a4c8bf73192955c5548de51ae7", - "typeString": "literal_string \"UNSPECIFIED_ID\"" - } - ], - "id": 286, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "6524:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6524:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 294, - "nodeType": "ExpressionStatement", - "src": "6524:51:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 295, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "6696:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 297, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "6696:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 298, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "6715:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 299, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "6715:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 300, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "6745:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 301, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "6745:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 302, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "6695:80:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "tuple(uint8,bool,bool)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 305, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6809:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 307, - "indexExpression": { - "argumentTypes": null, - "id": 306, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6826:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6809:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 303, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "6778:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 304, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVoucherStatus", - "nodeType": "MemberAccess", - "referencedDeclaration": 4218, - "src": "6778:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "function (uint256) view external returns (uint8,bool,bool)" - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6778:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint8_$_t_bool_$_t_bool_$", - "typeString": "tuple(uint8,bool,bool)" - } - }, - "src": "6695:134:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 310, - "nodeType": "ExpressionStatement", - "src": "6695:134:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 318, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 311, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "6843:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 314, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6896:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 316, - "indexExpression": { - "argumentTypes": null, - "id": 315, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6913:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6896:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 312, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "6859:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getIdSupplyFromVoucher", - "nodeType": "MemberAccess", - "referencedDeclaration": 4101, - "src": "6859:36:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_pure$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) pure external returns (uint256)" - } - }, - "id": 317, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6859:57:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6843:73:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 319, - "nodeType": "ExpressionStatement", - "src": "6843:73:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 320, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "6931:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 321, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "6938:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 322, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "6949:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 323, - "isConstant": false, - "isInlineArray": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "TupleExpression", - "src": "6930:29:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 326, - "name": "tokenIdSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 270, - "src": "6990:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 324, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "6962:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 325, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getOrderCosts", - "nodeType": "MemberAccess", - "referencedDeclaration": 4191, - "src": "6962:27:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "function (uint256) view external returns (uint256,uint256,uint256)" - } - }, - "id": 327, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6962:42:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", - "typeString": "tuple(uint256,uint256,uint256)" - } - }, - "src": "6930:74:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 329, - "nodeType": "ExpressionStatement", - "src": "6930:74:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 330, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "7018:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 337, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "7075:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 339, - "indexExpression": { - "argumentTypes": null, - "id": 338, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7092:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7075:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 335, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "7044:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVoucherIssuer", - "nodeType": "MemberAccess", - "referencedDeclaration": 4231, - "src": "7044:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7044:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 334, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7035:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 333, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "7035:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7035:62:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7027:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 331, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7027:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 342, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7027:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7018:80:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 344, - "nodeType": "ExpressionStatement", - "src": "7018:80:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 358, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 345, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "7112:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 352, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "7169:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 354, - "indexExpression": { - "argumentTypes": null, - "id": 353, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7186:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7169:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 350, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "7138:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 351, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getVoucherHolder", - "nodeType": "MemberAccess", - "referencedDeclaration": 4245, - "src": "7138:30:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_address_$", - "typeString": "function (uint256) view external returns (address)" - } - }, - "id": 355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7138:51:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7129:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 348, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "7129:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 356, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7129:62:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 347, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "7121:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 346, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7121:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7121:71:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "7112:80:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 359, - "nodeType": "ExpressionStatement", - "src": "7112:80:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "7369:29:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 360, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7370:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 361, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "7370:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 364, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7433:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 365, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7433:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 366, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "7452:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 363, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7424:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7424:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 368, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7402:82:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7369:115:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "7758:29:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 389, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7759:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 390, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4314, - "src": "7759:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 416, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 402, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 393, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7822:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 394, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7822:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 395, - "name": "idxRefund", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4298, - "src": "7841:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 392, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7813:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7813:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 398, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7884:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 399, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7884:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 400, - "name": "idxExpire", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4301, - "src": "7903:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 397, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7875:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 401, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7875:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7813:100:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 404, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "7947:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 405, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "7947:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 406, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "7966:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 403, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "7938:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 407, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7938:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "id": 413, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "8010:39:0", - "subExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 409, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8020:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 410, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8020:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 411, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "8039:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 408, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8011:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8011:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7938:111:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 415, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7937:113:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7813:237:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "id": 417, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "7791:281:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "7758:314:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 438, - "nodeType": "IfStatement", - "src": "7754:571:0", - "trueBody": { - "id": 437, - "nodeType": "Block", - "src": "8074:251:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 423, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 419, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "8176:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 421, - "indexExpression": { - "argumentTypes": null, - "id": 420, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "8183:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8176:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 422, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "8194:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8176:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 424, - "nodeType": "ExpressionStatement", - "src": "8176:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 425, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "8217:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 426, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "8234:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8217:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 428, - "nodeType": "ExpressionStatement", - "src": "8217:22:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 432, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "8290:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 434, - "indexExpression": { - "argumentTypes": null, - "id": 433, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "8307:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8290:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 429, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "8257:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 431, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 3772, - "src": "8257:32:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8257:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 436, - "nodeType": "ExpressionStatement", - "src": "8257:53:0" - } - ] - } - }, - "id": 439, - "nodeType": "IfStatement", - "src": "7365:960:0", - "trueBody": { - "id": 388, - "nodeType": "Block", - "src": "7486:262:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 374, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 370, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "7581:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 372, - "indexExpression": { - "argumentTypes": null, - "id": 371, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "7588:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7581:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 373, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7599:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7581:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 375, - "nodeType": "ExpressionStatement", - "src": "7581:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 378, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 376, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "7622:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 377, - "name": "price", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 258, - "src": "7639:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7622:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 379, - "nodeType": "ExpressionStatement", - "src": "7622:22:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 383, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "7696:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 385, - "indexExpression": { - "argumentTypes": null, - "id": 384, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "7713:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7696:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 380, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "7663:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 382, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setPaymentReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 3772, - "src": "7663:32:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7663:53:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 387, - "nodeType": "ExpressionStatement", - "src": "7663:53:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 448, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 442, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "8472:30:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 440, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8473:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 441, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 4316, - "src": "8473:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 444, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8532:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 445, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8532:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 446, - "name": "idxFinal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4310, - "src": "8551:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 443, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8523:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8523:37:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "8472:88:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 597, - "nodeType": "IfStatement", - "src": "8468:2701:0", - "trueBody": { - "id": 596, - "nodeType": "Block", - "src": "8562:2607:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 450, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8670:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 451, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8670:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 452, - "name": "idxComplain", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4304, - "src": "8689:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 449, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8661:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8661:40:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 552, - "nodeType": "Block", - "src": "9513:995:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 513, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "9548:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 514, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "9548:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 515, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "9567:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 512, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "9539:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9539:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 550, - "nodeType": "Block", - "src": "10293:197:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 544, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 540, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "10363:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 542, - "indexExpression": { - "argumentTypes": null, - "id": 541, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "10370:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10363:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 543, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "10381:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10363:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 545, - "nodeType": "ExpressionStatement", - "src": "10363:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 546, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "10416:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 547, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "10433:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10416:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 549, - "nodeType": "ExpressionStatement", - "src": "10416:26:0" - } - ] - }, - "id": 551, - "nodeType": "IfStatement", - "src": "9535:955:0", - "trueBody": { - "id": 539, - "nodeType": "Block", - "src": "9584:703:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 517, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "9669:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 519, - "indexExpression": { - "argumentTypes": null, - "id": 518, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "9676:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9669:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 520, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9687:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9669:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 522, - "nodeType": "ExpressionStatement", - "src": "9669:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 523, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "9722:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 526, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9753:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 524, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9739:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 525, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9739:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 527, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9739:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9722:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 529, - "nodeType": "ExpressionStatement", - "src": "9722:49:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 537, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 530, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "9797:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 531, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9814:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 534, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9840:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 532, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9826:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9826:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9826:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9814:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9797:61:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 538, - "nodeType": "ExpressionStatement", - "src": "9797:61:0" - } - ] - } - } - ] - }, - "id": 553, - "nodeType": "IfStatement", - "src": "8657:1851:0", - "trueBody": { - "id": 511, - "nodeType": "Block", - "src": "8703:804:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 455, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "8738:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 456, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "8738:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 457, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "8757:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 454, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "8729:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8729:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 509, - "nodeType": "Block", - "src": "9321:168:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 499, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "9389:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 501, - "indexExpression": { - "argumentTypes": null, - "id": 500, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "9396:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9389:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 502, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9407:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9389:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 504, - "nodeType": "ExpressionStatement", - "src": "9389:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 507, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 505, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "9442:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 506, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9457:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9442:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 508, - "nodeType": "ExpressionStatement", - "src": "9442:24:0" - } - ] - }, - "id": 510, - "nodeType": "IfStatement", - "src": "8725:764:0", - "trueBody": { - "id": 498, - "nodeType": "Block", - "src": "8774:541:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 463, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 459, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "8858:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 461, - "indexExpression": { - "argumentTypes": null, - "id": 460, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "8865:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8858:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 462, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8876:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8858:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 464, - "nodeType": "ExpressionStatement", - "src": "8858:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 465, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "8911:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 468, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "8937:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 466, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8923:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 467, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "8923:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 469, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8923:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8911:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 471, - "nodeType": "ExpressionStatement", - "src": "8911:44:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 472, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "8981:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 473, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "8998:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8981:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 475, - "nodeType": "ExpressionStatement", - "src": "8981:26:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 476, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "9056:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 479, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9087:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 477, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9073:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9073:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 480, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9073:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9056:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 482, - "nodeType": "ExpressionStatement", - "src": "9056:49:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 483, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "9159:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 484, - "name": "depositSe", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9174:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 485, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9186:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9174:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 489, - "name": "CANCELFAULT_SPLIT", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "9212:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 487, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9198:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 488, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "div", - "nodeType": "MemberAccess", - "referencedDeclaration": 4551, - "src": "9198:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9198:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9174:56:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9159:71:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 493, - "nodeType": "ExpressionStatement", - "src": "9159:71:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 494, - "name": "tFraction", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 267, - "src": "9279:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9291:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9279:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 497, - "nodeType": "ExpressionStatement", - "src": "9279:13:0" - } - ] - } - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 555, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "10612:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 556, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "10612:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 557, - "name": "idxRedeem", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4295, - "src": "10631:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 554, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "10603:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 558, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10603:38:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 560, - "name": "currStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 273, - "src": "10675:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_VoucherStatus_$4321_memory_ptr", - "typeString": "struct usingHelpers.VoucherStatus memory" - } - }, - "id": 561, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "status", - "nodeType": "MemberAccess", - "referencedDeclaration": 4312, - "src": "10675:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - { - "argumentTypes": null, - "id": 562, - "name": "idxCancelFault", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4307, - "src": "10694:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 559, - "name": "isStatus", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4408, - "src": "10666:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint8_$_t_uint8_$returns$_t_bool_$", - "typeString": "function (uint8,uint8) pure returns (bool)" - } - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10666:43:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "10603:106:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 586, - "nodeType": "Block", - "src": "10894:172:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 576, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "10954:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 578, - "indexExpression": { - "argumentTypes": null, - "id": 577, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "10961:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10954:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 579, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "10972:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10954:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 581, - "nodeType": "ExpressionStatement", - "src": "10954:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 584, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 582, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "11003:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 583, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "11018:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11003:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 585, - "nodeType": "ExpressionStatement", - "src": "11003:24:0" - } - ] - }, - "id": 587, - "nodeType": "IfStatement", - "src": "10599:467:0", - "trueBody": { - "id": 575, - "nodeType": "Block", - "src": "10732:156:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 569, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 565, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "10794:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 567, - "indexExpression": { - "argumentTypes": null, - "id": 566, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "10801:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10794:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 568, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "10812:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10794:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 570, - "nodeType": "ExpressionStatement", - "src": "10794:27:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 571, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "10843:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 572, - "name": "depositBu", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 264, - "src": "10860:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10843:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 574, - "nodeType": "ExpressionStatement", - "src": "10843:26:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 591, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "11134:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 593, - "indexExpression": { - "argumentTypes": null, - "id": 592, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "11151:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11134:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 588, - "name": "voucherKernel", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "11100:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_VoucherKernel_$4283", - "typeString": "contract VoucherKernel" - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setDepositsReleased", - "nodeType": "MemberAccess", - "referencedDeclaration": 3800, - "src": "11100:33:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256) external" - } - }, - "id": 594, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11100:54:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 595, - "nodeType": "ExpressionStatement", - "src": "11100:54:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 279, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6476:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 280, - "name": "_tokenIdVouchers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 229, - "src": "6480:16:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6480:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6476:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 599, - "initializationExpression": { - "assignments": [ - 276 - ], - "declarations": [ - { - "constant": false, - "id": 276, - "mutability": "mutable", - "name": "i", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 599, - "src": "6461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 275, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6461:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 278, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6473:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6461:13:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6505:3:0", - "subExpression": { - "argumentTypes": null, - "id": 283, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 276, - "src": "6505:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 285, - "nodeType": "ExpressionStatement", - "src": "6505:3:0" - }, - "nodeType": "ForStatement", - "src": "6457:4760:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 600, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "11252:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 601, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11266:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11252:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 609, - "nodeType": "IfStatement", - "src": "11248:81:0", - "trueBody": { - "id": 608, - "nodeType": "Block", - "src": "11269:60:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 604, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11293:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 605, - "name": "amount2pool", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 243, - "src": "11306:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 603, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11283:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11283:35:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 607, - "nodeType": "ExpressionStatement", - "src": "11283:35:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 610, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "11351:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11367:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11351:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 619, - "nodeType": "IfStatement", - "src": "11347:80:0", - "trueBody": { - "id": 618, - "nodeType": "Block", - "src": "11370:57:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 614, - "name": "issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "11394:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 615, - "name": "amount2issuer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 246, - "src": "11402:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 613, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11384:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 616, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11384:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 617, - "nodeType": "ExpressionStatement", - "src": "11384:32:0" - } - ] - } - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 620, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "11441:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 621, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11457:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11441:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 629, - "nodeType": "IfStatement", - "src": "11437:80:0", - "trueBody": { - "id": 628, - "nodeType": "Block", - "src": "11460:57:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 624, - "name": "holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 255, - "src": "11484:6:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 625, - "name": "amount2holder", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "11492:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 623, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11474:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 626, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11474:32:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 627, - "nodeType": "ExpressionStatement", - "src": "11474:32:0" - } - ] - } - } - ] - }, - "documentation": { - "id": 226, - "nodeType": "StructuredDocumentation", - "src": "5090:383:0", - "text": " @notice Trigger withdrawals of what funds are releasable\n The caller of this function triggers transfers to all involved entities (pool, issuer, token holder), also paying for gas.\n @dev This function would be optimized a lot, here verbose for readability.\n @param _tokenIdVouchers an array of voucher tokens (ERC-721) to try withdraw funds from" - }, - "functionSelector": "983d95ce", - "id": 631, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 232, - "modifierName": { - "argumentTypes": null, - "id": 231, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4855, - "src": "5558:12:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "5558:12:0" - } - ], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 230, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 229, - "mutability": "mutable", - "name": "_tokenIdVouchers", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 631, - "src": "5496:35:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 227, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5496:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 228, - "length": null, - "nodeType": "ArrayTypeName", - "src": "5496:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5495:37:0" - }, - "returnParameters": { - "id": 233, - "nodeType": "ParameterList", - "parameters": [], - "src": "5575:0:0" - }, - "scope": 717, - "src": "5478:6054:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 663, - "nodeType": "Block", - "src": "11709:231:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 639, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "11768:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 641, - "indexExpression": { - "argumentTypes": null, - "id": 640, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11775:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11768:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11790:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11768:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 662, - "nodeType": "IfStatement", - "src": "11764:170:0", - "trueBody": { - "id": 661, - "nodeType": "Block", - "src": "11793:141:0", - "statements": [ - { - "assignments": [ - 645 - ], - "declarations": [ - { - "constant": false, - "id": 645, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 661, - "src": "11807:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 644, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "11807:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 649, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 646, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "11824:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 648, - "indexExpression": { - "argumentTypes": null, - "id": 647, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11831:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11824:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11807:36:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 650, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "11857:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 652, - "indexExpression": { - "argumentTypes": null, - "id": 651, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11864:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11857:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11879:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "11857:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 655, - "nodeType": "ExpressionStatement", - "src": "11857:23:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 657, - "name": "poolAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "11904:11:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 658, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 645, - "src": "11916:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 656, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 703, - "src": "11894:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11894:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 660, - "nodeType": "ExpressionStatement", - "src": "11894:29:0" - } - ] - } - } - ] - }, - "documentation": { - "id": 632, - "nodeType": "StructuredDocumentation", - "src": "11547:62:0", - "text": " @notice Trigger withdrawals of pooled funds" - }, - "functionSelector": "5c42c733", - "id": 664, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 635, - "modifierName": { - "argumentTypes": null, - "id": 634, - "name": "onlyPoolManager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "11668:15:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "11668:15:0" - }, - { - "arguments": null, - "id": 637, - "modifierName": { - "argumentTypes": null, - "id": 636, - "name": "nonReentrant", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4855, - "src": "11692:12:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "11692:12:0" - } - ], - "name": "withdrawPool", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 633, - "nodeType": "ParameterList", - "parameters": [], - "src": "11639:2:0" - }, - "returnParameters": { - "id": 638, - "nodeType": "ParameterList", - "parameters": [], - "src": "11709:0:0" - }, - "scope": 717, - "src": "11618:322:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": { - "id": 702, - "nodeType": "Block", - "src": "12524:309:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "id": 678, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 673, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "12542:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12564:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "12556:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 674, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12556:7:0", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 677, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12556:10:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "12542:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "554e5350454349464945445f41444452455353", - "id": 679, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12568:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - }, - "value": "UNSPECIFIED_ADDRESS" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8b8329b0a2cdc38ce16c5ce6fddd2481adcbf4e0ca41d3558c248e38716ca1d7", - "typeString": "literal_string \"UNSPECIFIED_ADDRESS\"" - } - ], - "id": 672, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12534:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12534:56:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 681, - "nodeType": "ExpressionStatement", - "src": "12534:56:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 683, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "12700:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 684, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12710:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "12700:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "", - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "12713:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "id": 682, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "12692:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12692:24:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 688, - "nodeType": "ExpressionStatement", - "src": "12692:24:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 692, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "12756:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 689, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "12735:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sendValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 4675, - "src": "12735:20:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_address_payable_$", - "typeString": "function (address payable,uint256)" - } - }, - "id": 693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12735:29:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 694, - "nodeType": "ExpressionStatement", - "src": "12735:29:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 696, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "12794:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12794:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 698, - "name": "_recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "12806:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 699, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 669, - "src": "12818:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 695, - "name": "LogWithdrawal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 56, - "src": "12780:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 700, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12780:46:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 701, - "nodeType": "EmitStatement", - "src": "12775:51:0" - } - ] - }, - "documentation": { - "id": 665, - "nodeType": "StructuredDocumentation", - "src": "11959:475:0", - "text": " @notice Internal function for withdrawing.\n As unbelievable as it is, neither .send() nor .transfer() are now secure to use due to EIP-1884\n So now transfering funds via the last remaining option: .call()\n See https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/ \n @param _recipient address of the account receiving funds from the escrow\n @param _amount amount to be released from escrow" - }, - "id": 703, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 670, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 667, - "mutability": "mutable", - "name": "_recipient", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 703, - "src": "12458:26:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - "typeName": { - "id": 666, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12458:15:0", - "stateMutability": "payable", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 669, - "mutability": "mutable", - "name": "_amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 703, - "src": "12486:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 668, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "12486:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12457:45:0" - }, - "returnParameters": { - "id": 671, - "nodeType": "ParameterList", - "parameters": [], - "src": "12524:0:0" - }, - "scope": 717, - "src": "12439:394:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 715, - "nodeType": "Block", - "src": "13204:40:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 711, - "name": "escrow", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 23, - "src": "13221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 713, - "indexExpression": { - "argumentTypes": null, - "id": 712, - "name": "_account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 706, - "src": "13228:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "13221:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 710, - "id": 714, - "nodeType": "Return", - "src": "13214:23:0" - } - ] - }, - "documentation": { - "id": 704, - "nodeType": "StructuredDocumentation", - "src": "12935:170:0", - "text": " @notice Get the amount in escrow of an address\n @param _account The address of an account to query\n @return The balance in escrow" - }, - "functionSelector": "d1358365", - "id": 716, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getEscrowAmount", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 707, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 706, - "mutability": "mutable", - "name": "_account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 716, - "src": "13135:16:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 705, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "13135:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13134:18:0" - }, - "returnParameters": { - "id": 710, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 709, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 716, - "src": "13191:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 708, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "13191:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "13190:9:0" - }, - "scope": 717, - "src": "13110:134:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 718, - "src": "475:12776:0" - } - ], - "src": "47:13204:0" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang", - "optimizer": false, - "runs": 200 - }, - "networks": {}, - "schemaVersion": "2.3.3", - "updatedAt": "2020-09-28T08:52:43.092Z" -} \ No newline at end of file diff --git a/functions/index.js b/functions/index.js deleted file mode 100644 index 165ecc1d..00000000 --- a/functions/index.js +++ /dev/null @@ -1,244 +0,0 @@ -const functions = require('firebase-functions'); -const axios = require('axios').default; - -const VOUCHER_KERNEL_ADDRESS = functions.config().scheduledkeepers.voucherkerneladdress; -const CASHIER_ADDRESS = functions.config().scheduledkeepers.cashieraddress; - -const VoucherKernel = require("./abis/VoucherKernel.json"); -const Cashier = require("./abis/Cashier.json"); - -const ethers = require('ethers'); - -const EXECUTOR_PRIVATE_KEY = functions.config().scheduledkeepers.executorsecret; -const NETWORK_NAME = functions.config().scheduledkeepers.networkname; -const ETHERSCAN_API_KEY = functions.config().scheduledkeepers.etherscanapikey; -const INFURA_API_KEY = functions.config().scheduledkeepers.infuraapikey; - -const provider = ethers.getDefaultProvider(NETWORK_NAME, { - etherscan: ETHERSCAN_API_KEY, - infura: INFURA_API_KEY -}); -const executor = new ethers.Wallet(EXECUTOR_PRIVATE_KEY, provider); - -const API_URL = functions.config().scheduledkeepers.apiurl; -const ALL_VOUCHERS_URL = `${ API_URL }/user-vouchers/all`; -const CHECK_PAYMENTS_BY_VOUCHER_URL = `${ API_URL }/payments/check-payment`; -const FINALIZE_VOUCHER_URL = `${ API_URL }/user-vouchers/finalize`; -const WITHDRAW_VOUCHER_URL = `${ API_URL }/payments/create-payment`; - -const COMMIT_IDX = 7; // usingHelpers contract -const GAS_LIMIT = '300000'; - -const EXPIRATION_BLACKLISTED_VOUCHER_IDS = [ - "57896044618658097711785492504343953937183745707369374387093404834341379375105", - "57896044618658097711785492504343953940926851743499697485190525516090829701121", - "57896044618658097711785492504343953942968545945025328265970773160681438969857" -]; - -const FINALIZATION_BLACKLISTED_VOUCHER_IDS = [ - "57896044618658097711785492504343953936503180973527497460166655619477842952194", - "57896044618658097711785492504343953937183745707369374387093404834341379375105", - "57896044618658097711785492504343953940926851743499697485190525516090829701121", - "57896044618658097711785492504343953942968545945025328265970773160681438969857" -]; - -const WITHDRAWAL_BLACKLISTED_VOUCHER_IDS = [ - "57896044618658097711785492504343953936503180973527497460166655619477842952194", - "57896044618658097711785492504343953937183745707369374387093404834341379375105", - "57896044618658097711785492504343953940926851743499697485190525516090829701121", - "57896044618658097711785492504343953942968545945025328265970773160681438969857" -]; - -exports.scheduledKeepers = functions.https.onRequest(async (request, response) => { - // Expiration process - await triggerExirations(); - - // Finalization process - await triggerFinalizations(); - - // Withdrawal process - await triggerWithdrawals(); - - response.send("Аll keepers were executed successfully!"); -}); - -async function triggerExirations() { - let voucherKernelContractExecutor = new ethers.Contract(VOUCHER_KERNEL_ADDRESS, VoucherKernel.abi, executor); - let vouchers; - - try { - vouchers = await axios.get(ALL_VOUCHERS_URL); - } catch (e) { - console.error(`Error while getting all vouchers from the DB. Error: ${ e }`); - } - - for (let i = 0; i < vouchers.data.vouchersDocuments.length; i++) { - let voucher = vouchers.data.vouchersDocuments[i]; - let voucherID = voucher._tokenIdVoucher; - let isStatusCommit = false; - - try { - let voucherStatus = await voucherKernelContractExecutor.getVoucherStatus(voucherID); - isStatusCommit = voucherStatus[0] == (0 | 1 << COMMIT_IDX); // condition is borrowed from helper contract - } catch (e) { - console.error(`Error while checking voucher status toward the contract. Error: ${ e }`); - } - - if (!isStatusCommit || EXPIRATION_BLACKLISTED_VOUCHER_IDS.includes(voucherID)) { - continue; - } - - console.log(`Voucher: ${ voucherID } is with commit status. The expiration is triggered.`); - - try { - let txOrder = await voucherKernelContractExecutor.triggerExpiration(voucherID); - await txOrder.wait(); - } catch (e) { - console.error(`Error while triggering expiration of the voucher. Error: ${ e }`); - } - } - - console.info(`triggerExirations function finished successfully`); -} - -async function triggerFinalizations() { - let voucherKernelContractExecutor = new ethers.Contract(VOUCHER_KERNEL_ADDRESS, VoucherKernel.abi, executor); - let vouchers; - - try { - vouchers = await axios.get(ALL_VOUCHERS_URL); - } catch (e) { - console.error(`Error while getting all vouchers from the DB. Error: ${ e }`); - } - - for (let i = 0; i < vouchers.data.vouchersDocuments.length; i++) { - let voucher = vouchers.data.vouchersDocuments[i]; - let voucherID = voucher._tokenIdVoucher; - - if (voucher.FINALIZED || FINALIZATION_BLACKLISTED_VOUCHER_IDS.includes(voucherID)) { - console.log(`Voucher: ${ voucherID } is already finalized`); - continue; - } - - console.log(`Voucher: ${ voucherID }. The finalization has started.`); - - let txOrder; - let receipt; - - try { - txOrder = await voucherKernelContractExecutor.triggerFinalizeVoucher(voucherID, { gasLimit: GAS_LIMIT }); - - receipt = await txOrder.wait(); - } catch (e) { - console.error(`Error while triggering finalization of the voucher. Error: ${ e }`); - } - let parsedEvent = await findEventByName(receipt, 'LogFinalizeVoucher', '_tokenIdVoucher', '_triggeredBy'); - - if (parsedEvent && parsedEvent[0]) { - parsedEvent[0]._tokenIdVoucher = voucherID; - const payload = [{ - ...parsedEvent[0], - status: "FINALIZED" - }]; - - console.log(`Voucher: ${ voucherID }. The finalization finished.`); - - try { - await axios.patch(FINALIZE_VOUCHER_URL, payload); - - console.log(`Voucher: ${ voucherID }. Database updated.`); - } catch (e) { - console.log(e); - console.error(`Error while updating the DB related to finalization of the voucher. Error: ${ e }`); - } - } - } - - console.info(`triggerFinalizations function finished successfully`); -} - -async function triggerWithdrawals() { - let cashierContractExecutor = new ethers.Contract(CASHIER_ADDRESS, Cashier.abi, executor); - let voucherKernelContractExecutor = new ethers.Contract(VOUCHER_KERNEL_ADDRESS, VoucherKernel.abi, executor); - let vouchers; - - try { - vouchers = await axios.get(ALL_VOUCHERS_URL); - } catch (e) { - console.error(`Error while getting all vouchers from the DB. Error: ${ e }`); - } - - for (let i = 0; i < vouchers.data.vouchersDocuments.length; i++) { - let voucher = vouchers.data.vouchersDocuments[i]; - let voucherID = voucher._tokenIdVoucher; - let isPaymentAndDepositsReleased; - - try { - let voucherStatus = await voucherKernelContractExecutor.getVoucherStatus(voucherID); // (vouchersStatus[_tokenIdVoucher].status, vouchersStatus[_tokenIdVoucher].isPaymentReleased, vouchersStatus[_tokenIdVoucher].isDepositsReleased) - isPaymentAndDepositsReleased = voucherStatus[1] && voucherStatus[2]; - - } catch (e) { - console.error(`Error while checking existing payments for a voucher from the DB. Error: ${ e }`); - } - - if (isPaymentAndDepositsReleased || WITHDRAWAL_BLACKLISTED_VOUCHER_IDS.includes(voucherID)) { - console.log(`Voucher: ${ voucherID } - a payment and deposits withdrawal completed `); - continue; - } - - console.log(`Voucher: ${ voucherID }. The withdraw process has started`); - - let txOrder; - let receipt; - - try { - txOrder = await cashierContractExecutor.withdraw([voucherID], { gasLimit: GAS_LIMIT }); - receipt = await txOrder.wait(); - } catch (e) { - console.error(`Error while executing withdraw process. Error: ${ e }`); - } - - console.log(`Voucher: ${ voucherID }. The withdraw process finished`); - - let events = await findEventByName(receipt, 'LogWithdrawal', '_caller', '_payee', '_payment') - - try { - await sendPayments(events); - } catch (e) { - console.error(`Error while executing a create payment call to the backend . Error: ${ e }`); - } - - console.log(`Voucher: ${ voucherID }. Database updated`); - } - - console.info(`triggerWithdrawals function finished successfully`); -} - -async function findEventByName(txReceipt, eventName, ...eventFields) { - let eventsArr = []; - - for (const key in txReceipt.events) { - if (txReceipt.events[key].event == eventName) { - const event = txReceipt.events[key] - - const resultObj = { - txHash: txReceipt.transactionHash - }; - - for (let index = 0; index < eventFields.length; index++) { - resultObj[eventFields[index]] = event.args[eventFields[index]].toString(); - } - eventsArr.push(resultObj) - } - } - - return eventsArr -} - -async function sendPayments(events) { - try { - await axios.post(WITHDRAW_VOUCHER_URL, events) - } catch (error) { - console.log(error); - } -} diff --git a/functions/package.json b/functions/package.json deleted file mode 100644 index b962b2cd..00000000 --- a/functions/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "functions", - "description": "Cloud Functions for Firebase", - "scripts": { - "lint": "eslint .", - "serve": "firebase emulators:start --only functions", - "shell": "firebase functions:shell", - "start": "npm run shell", - "deploy": "firebase deploy --only functions", - "logs": "firebase functions:log" - }, - "engines": { - "node": "10" - }, - "dependencies": { - "axios": "^0.20.0", - "ethers": "^5.0.14", - "firebase-admin": "^8.6.0", - "firebase-functions": "^3.3.0" - }, - "devDependencies": { - "eslint": "^5.12.0", - "eslint-plugin-promise": "^4.0.1", - "firebase-functions-test": "^0.1.6" - }, - "private": true -} diff --git a/go b/go new file mode 100755 index 00000000..35e5fbfd --- /dev/null +++ b/go @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +[ -n "$GO_DEBUG" ] && set -x +set -e + +project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +verbose="no" +offline="no" +skip_checks="no" + +missing_dependency="no" + +[ -n "$GO_DEBUG" ] && verbose="yes" +[ -n "$GO_SKIP_CHECKS" ] && skip_checks="yes" +[ -n "$GO_OFFLINE" ] && offline="yes" + +function loose_version() { + local version="$1" + + IFS="." read -r -a version_parts <<<"$version" + + echo "${version_parts[0]}.${version_parts[1]}" +} + +ruby_full_version="$(cat "$project_dir"/.ruby-version)" +ruby_loose_version="$(loose_version "$ruby_full_version")" +node_full_version="$(cat "$project_dir"/.nvmrc)" +node_loose_version="$(loose_version "$node_full_version")" + +echo "Configuring NVM if present." +nvm_dirs=("$NVM_DIR" "$HOME/.nvm" "/usr/local/opt/nvm") +# shellcheck disable=SC2068 +for nvm_dir in ${nvm_dirs[@]}; do + nvm_script="${nvm_dir}/nvm.sh" + if [ -s "$nvm_script" ]; then + set +e + # shellcheck disable=SC1090 + source "$nvm_script" >/dev/null 2>&1 + nvm use "$node_loose_version" >/dev/null 2>&1 + set -e + break + fi +done + +if [[ "$skip_checks" == "no" ]]; then + echo "Checking for system dependencies." + if ! type ruby >/dev/null 2>&1 || ! ruby -v | grep -q "$ruby_loose_version"; then + echo "This codebase requires Ruby $ruby_loose_version." + missing_dependency="yes" + fi + + if ! type bundler >/dev/null 2>&1; then + echo "This codebase requires Bundler." + missing_dependency="yes" + fi + + if ! type node >/dev/null 2>&1 || ! node --version | grep -q "$node_loose_version"; then + echo "This codebase requires Node $node_loose_version" + missing_dependency="yes" + fi + + if ! type npm >/dev/null 2>&1; then + echo "This codebase requires NPM." + missing_dependency="yes" + fi + + if [[ "$missing_dependency" == "yes" ]]; then + echo "Please install missing dependencies to continue." + exit 1 + fi + + echo "All system dependencies present. Continuing." +fi + +if [[ "$offline" == "no" ]]; then + echo "Installing bundler." + if [[ "$verbose" == "yes" ]]; then + gem install --no-document bundler + else + gem install --no-document bundler >/dev/null + fi + + echo "Installing ruby dependencies." + if [[ "$verbose" == "yes" ]]; then + bundle install + else + bundle install >/dev/null + fi +fi + +echo "Starting rake." +if [[ "$verbose" == "yes" ]]; then + time bundle exec rake --verbose "$@" +else + time bundle exec rake "$@" +fi diff --git a/image-keepers/Dockerfile b/image-keepers/Dockerfile new file mode 100644 index 00000000..002d46eb --- /dev/null +++ b/image-keepers/Dockerfile @@ -0,0 +1,33 @@ +FROM node:12.20-buster + +# Install AWS CLI +RUN apt-get update \ + && apt-get -y install python3 curl unzip \ + && cd /tmp \ + && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ + && unzip awscliv2.zip \ + && ./aws/install \ + && rm awscliv2.zip \ + && rm -rf aws + +# Install entrypoint script +COPY docker-entrypoint.sh /opt/keepers/bin/docker-entrypoint.sh + +RUN chmod +x /opt/keepers/bin/docker-entrypoint.sh + +# Add sources +COPY package.json /opt/keepers/package.json +COPY package-lock.json /opt/keepers/package-lock.json +COPY src /opt/keepers/dist/src + +# Install dependencies +RUN cd /opt/keepers \ + && npm install \ + && cd - + +# Add metadata +ADD VERSION /VERSION +ADD TAG /TAG + +# Run docker-entrypoint.sh start script by default +ENTRYPOINT ["/opt/keepers/bin/docker-entrypoint.sh"] diff --git a/image-keepers/docker-entrypoint.sh b/image-keepers/docker-entrypoint.sh new file mode 100644 index 00000000..002fb4b4 --- /dev/null +++ b/image-keepers/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +# Ensure AWS_S3_BUCKET_REGION environment variable is present +if [ -z "$AWS_S3_BUCKET_REGION" ]; then + echo >&2 'Error: missing AWS_S3_BUCKET_REGION environment variable.' + exit 1 +fi + +# Ensure AWS_S3_ENV_FILE_OBJECT_PATH environment variable is present +if [ -z "$AWS_S3_ENV_FILE_OBJECT_PATH" ]; then + echo >&2 'Error: missing AWS_S3_ENV_FILE_OBJECT_PATH environment variable.' + exit 1 +fi + +# Fetch and source env file +eval $(aws s3 cp \ + --sse AES256 \ + --region "$AWS_S3_BUCKET_REGION" \ + "$AWS_S3_ENV_FILE_OBJECT_PATH" - | sed 's/^/export /') + +# Run service +cd /opt/keepers + +node ./dist/src/index.js diff --git a/image/Dockerfile b/image/Dockerfile new file mode 100644 index 00000000..7c30762b --- /dev/null +++ b/image/Dockerfile @@ -0,0 +1,34 @@ +FROM node:12.20-buster + +# Install AWS CLI +RUN apt-get update \ + && apt-get -y install python3 curl unzip \ + && cd /tmp \ + && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ + && unzip awscliv2.zip \ + && ./aws/install \ + && rm awscliv2.zip \ + && rm -rf aws + +# Install entrypoint script +COPY docker-entrypoint.sh /opt/reference-backend/bin/docker-entrypoint.sh + +RUN chmod +x /opt/reference-backend/bin/docker-entrypoint.sh + +# Add sources +COPY package.json /opt/reference-backend/package.json +COPY package-lock.json /opt/reference-backend/package-lock.json +COPY app.js /opt/reference-backend/dist/app.js +COPY src /opt/reference-backend/dist/src + +# Install dependencies +RUN cd /opt/reference-backend \ + && npm install \ + && cd - + +# Add metadata +ADD VERSION /VERSION +ADD TAG /TAG + +# Run docker-entrypoint.sh start script by default +ENTRYPOINT ["/opt/reference-backend/bin/docker-entrypoint.sh"] diff --git a/image/docker-entrypoint.sh b/image/docker-entrypoint.sh new file mode 100644 index 00000000..ada776c9 --- /dev/null +++ b/image/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +# Ensure AWS_S3_BUCKET_REGION environment variable is present +if [ -z "$AWS_S3_BUCKET_REGION" ]; then + echo >&2 'Error: missing AWS_S3_BUCKET_REGION environment variable.' + exit 1 +fi + +# Ensure AWS_S3_ENV_FILE_OBJECT_PATH environment variable is present +if [ -z "$AWS_S3_ENV_FILE_OBJECT_PATH" ]; then + echo >&2 'Error: missing AWS_S3_ENV_FILE_OBJECT_PATH environment variable.' + exit 1 +fi + +# Fetch and source env file +eval $(aws s3 cp \ + --sse AES256 \ + --region "$AWS_S3_BUCKET_REGION" \ + "$AWS_S3_ENV_FILE_OBJECT_PATH" - | sed 's/^/export /') + +# Run service +cd /opt/reference-backend + +node ./dist/app.js diff --git a/infra/bootstrap/bucket.tf b/infra/bootstrap/bucket.tf new file mode 100644 index 00000000..9bf230db --- /dev/null +++ b/infra/bootstrap/bucket.tf @@ -0,0 +1,23 @@ +data "aws_caller_identity" "current" {} + +data "template_file" "bucket_policy_template" { + template = file("${path.module}/policies/storage-bucket-policy.json.tpl") + + vars = { + allowed_account_ids = jsonencode(coalescelist(var.allowed_account_ids, [data.aws_caller_identity.current.account_id])) + } +} + +module "storage_bucket" { + source = "infrablocks/encrypted-bucket/aws" + version = "2.0.0" + + bucket_name = var.storage_bucket_name + bucket_policy_template = data.template_file.bucket_policy_template.rendered + + tags = { + DeploymentType = var.deployment_type + DeploymentLabel = var.deployment_label + DeploymentIdentifier = var.deployment_identifier + } +} diff --git a/infra/bootstrap/outputs.tf b/infra/bootstrap/outputs.tf new file mode 100644 index 00000000..d59f77a2 --- /dev/null +++ b/infra/bootstrap/outputs.tf @@ -0,0 +1,3 @@ +output "storage_bucket_name" { + value = var.storage_bucket_name +} diff --git a/infra/bootstrap/policies/storage-bucket-policy.json.tpl b/infra/bootstrap/policies/storage-bucket-policy.json.tpl new file mode 100644 index 00000000..f647a293 --- /dev/null +++ b/infra/bootstrap/policies/storage-bucket-policy.json.tpl @@ -0,0 +1,22 @@ +{ + "Version": "2012-10-17", + "Statement": [ + $${deny_unencrypted_object_upload_fragment}, + $${deny_unencrypted_inflight_operations_fragment}, + { + "Sid": "AllowCrossAccountAccess", + "Effect": "Allow", + "Action": [ + "s3:ListBucket", + "s3:GetObject" + ], + "Principal": { + "AWS": ${allowed_account_ids} + }, + "Resource": [ + "arn:aws:s3:::$${bucket_name}", + "arn:aws:s3:::$${bucket_name}/*" + ] + } + ] +} \ No newline at end of file diff --git a/infra/bootstrap/providers.tf b/infra/bootstrap/providers.tf new file mode 100644 index 00000000..dc58d9a2 --- /dev/null +++ b/infra/bootstrap/providers.tf @@ -0,0 +1,3 @@ +provider "aws" { + region = var.region +} diff --git a/infra/bootstrap/terraform.tf b/infra/bootstrap/terraform.tf new file mode 100644 index 00000000..b1d45698 --- /dev/null +++ b/infra/bootstrap/terraform.tf @@ -0,0 +1,14 @@ +terraform { + required_version = ">= 0.14" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 3.29" + } + template = { + source = "hashicorp/template" + version = "~> 2.2.0" + } + } +} \ No newline at end of file diff --git a/infra/bootstrap/variables.tf b/infra/bootstrap/variables.tf new file mode 100644 index 00000000..80dd25ff --- /dev/null +++ b/infra/bootstrap/variables.tf @@ -0,0 +1,12 @@ +variable "region" {} + +variable "deployment_type" {} +variable "deployment_label" {} +variable "deployment_identifier" {} + +variable "storage_bucket_name" {} + +variable "allowed_account_ids" { + type = list(string) + default = [] +} diff --git a/infra/database/cluster.tf b/infra/database/cluster.tf new file mode 100644 index 00000000..9c2aec99 --- /dev/null +++ b/infra/database/cluster.tf @@ -0,0 +1,53 @@ +module "cluster" { + source = "infrablocks/cluster/mongodbatlas" + version = "2.0.0" + + component = var.component + deployment_identifier = var.deployment_identifier + + project_id = module.project.project_id + + mongo_db_major_version = var.database_version + + cloud_provider = { + name = "AWS" + region_name = replace(upper(var.region), "-", "_") + instance_size_name = var.database_instance_size_name + disk_iops = null + volume_type = null + backup_enabled = true + auto_scaling = { + compute = { + min_instance_size: null + max_instance_size: null + } + } + } + + database_users = [ + { + username = var.database_service_user_username + password = var.database_service_user_password + roles = [ + { + role_name = "readWriteAnyDatabase" + database_name = "admin" + collection_name = null + } + ] + labels = {} + }, + { + username = var.database_read_only_user_username + password = var.database_read_only_user_password + roles = [ + { + role_name = "readAnyDatabase" + database_name = "admin" + collection_name = null + } + ] + labels = {} + } + ] +} diff --git a/infra/database/endpoint.tf b/infra/database/endpoint.tf new file mode 100644 index 00000000..ed2bec9a --- /dev/null +++ b/infra/database/endpoint.tf @@ -0,0 +1,15 @@ +module "aws-private-endpoint" { + source = "infrablocks/aws-private-endpoint/mongodbatlas" + version = "1.0.0" + + component = var.component + deployment_identifier = var.deployment_identifier + + region = var.region + vpc_id = data.terraform_remote_state.network.outputs.vpc_id + subnet_ids = data.terraform_remote_state.network.outputs.private_subnet_ids + + project_id = module.project.project_id + + allow_cidrs = var.database_allow_cidrs +} diff --git a/infra/database/network.tf b/infra/database/network.tf new file mode 100644 index 00000000..04dc4a8d --- /dev/null +++ b/infra/database/network.tf @@ -0,0 +1,10 @@ +data "terraform_remote_state" "network" { + backend = "s3" + + config = { + bucket = var.network_state_bucket_name + key = var.network_state_key + region = var.network_state_bucket_region + encrypt = var.network_state_bucket_is_encrypted + } +} diff --git a/infra/database/outputs.tf b/infra/database/outputs.tf new file mode 100644 index 00000000..b0cda369 --- /dev/null +++ b/infra/database/outputs.tf @@ -0,0 +1,11 @@ +output "project_id" { + value = module.project.project_id +} + +output "cluster_id" { + value = module.cluster.cluster_id +} + +output "connection_string" { + value = module.cluster.connection_strings[0].private_endpoint[0].connection_string +} diff --git a/infra/database/project.tf b/infra/database/project.tf new file mode 100644 index 00000000..f51a78d5 --- /dev/null +++ b/infra/database/project.tf @@ -0,0 +1,9 @@ +module "project" { + source = "infrablocks/project/mongodbatlas" + version = "1.0.0" + + component = var.component + deployment_identifier = var.deployment_identifier + + organization_id = var.mongodb_atlas_organization_id +} diff --git a/infra/database/providers.tf b/infra/database/providers.tf new file mode 100644 index 00000000..19d0a693 --- /dev/null +++ b/infra/database/providers.tf @@ -0,0 +1,8 @@ +provider "aws" { + region = var.region +} + +provider "mongodbatlas" { + public_key = var.mongodb_atlas_public_key + private_key = var.mongodb_atlas_private_key +} diff --git a/infra/database/terraform.tf b/infra/database/terraform.tf new file mode 100644 index 00000000..8907a147 --- /dev/null +++ b/infra/database/terraform.tf @@ -0,0 +1,20 @@ +terraform { + required_version = ">= 0.14" + + required_providers { + mongodbatlas = { + source = "mongodb/mongodbatlas" + version = "0.8.2" + } + aws = { + source = "hashicorp/aws" + version = "~> 3.29" + } + template = { + source = "hashicorp/template" + version = "~> 2.2.0" + } + } + + backend "s3" {} +} diff --git a/infra/database/variables.tf b/infra/database/variables.tf new file mode 100644 index 00000000..21901ef1 --- /dev/null +++ b/infra/database/variables.tf @@ -0,0 +1,23 @@ +variable "region" {} + +variable "component" {} +variable "deployment_identifier" {} + +variable "database_version" {} +variable "database_instance_size_name" {} +variable "database_service_user_username" {} +variable "database_service_user_password" {} +variable "database_read_only_user_username" {} +variable "database_read_only_user_password" {} +variable "database_allow_cidrs" { + type = list(string) +} + +variable "mongodb_atlas_organization_id" {} +variable "mongodb_atlas_public_key" {} +variable "mongodb_atlas_private_key" {} + +variable "network_state_bucket_name" {} +variable "network_state_key" {} +variable "network_state_bucket_region" {} +variable "network_state_bucket_is_encrypted" {} diff --git a/infra/functions/lambda.tf b/infra/functions/lambda.tf new file mode 100644 index 00000000..f38e8b85 --- /dev/null +++ b/infra/functions/lambda.tf @@ -0,0 +1,242 @@ +data "aws_caller_identity" "caller" {} +data "terraform_remote_state" "service" { + backend = "s3" + + config = { + bucket = var.service_state_bucket_name + key = var.service_state_key + region = var.service_state_bucket_region + encrypt = var.service_state_bucket_is_encrypted + } +} + +resource "aws_secretsmanager_secret" "keepers_secretsmanager_secret" { + name = "keepersServiceSMSecrets-${var.deployment_identifier}" +} + +resource "aws_secretsmanager_secret_version" "keepers_secretsmanager_secret_version" { + secret_id = aws_secretsmanager_secret.keepers_secretsmanager_secret.id + secret_string = jsonencode(tomap({ + gcloudsecret = var.gcloud_keepers_secret + cashieraddress = var.cashier_address + executorsecret = var.executor_secret + networkname = "rinkeby" + etherscanapikey = var.etherscan_apikey + infuraapikey = var.infura_apikey + voucherkerneladdress = var.voucher_kernel_address + apiurl = "https://${data.terraform_remote_state.service.outputs.address}" + })) +} + +data "aws_iam_policy_document" "assume_role_policy" { + statement { + actions = ["sts:AssumeRole"] + + effect = "Allow" + + principals { + type = "Service" + identifiers = [ + "lambda.amazonaws.com", + "edgelambda.amazonaws.com" + ] + } + } +} + +data "aws_iam_policy_document" "execution_policy" { + statement { + actions = [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ] + resources = [ + "arn:aws:logs:*:${data.aws_caller_identity.caller.account_id}:*" + ] + } + + statement { + actions = ["iam:CreateServiceLinkedRole"] + resources = ["arn:aws:iam::*:role/*"] + } + + statement { + actions = [ + "lambda:GetFunction", + "lambda:EnableReplication*" + ] + resources = [ + "arn:aws:lambda:*:${data.aws_caller_identity.caller.account_id}:function:trigger-expirations", + "arn:aws:lambda:*:${data.aws_caller_identity.caller.account_id}:function:trigger-finalizations", + "arn:aws:lambda:*:${data.aws_caller_identity.caller.account_id}:function:trigger-withdrawals" + ] + } + + statement { + actions = [ + "secretsmanager:GetResourcePolicy", + "secretsmanager:GetSecretValue", + "secretsmanager:DescribeSecret", + "secretsmanager:ListSecretVersionIds", + "secretsmanager:ListSecrets" + ] + resources = ["*"] + } +} + +module "expirations_lambda" { + source = "./modules/lambda" + + region = var.region + account_id = data.aws_caller_identity.caller.account_id + component = var.component + deployment_identifier = var.deployment_identifier + + lambda_runtime = "nodejs14.x" + lambda_code_output_path = "${path.module}/.terraform/archive_files/triggerExpirations.zip" + lambda_code_source_dir = "${path.cwd}/external/lambdas/triggerExpirations/src" + + lambda_timeout = 900 + lambda_memory_size = 128 + + lambda_assume_role = data.aws_iam_policy_document.assume_role_policy.json + lambda_execution_policy = data.aws_iam_policy_document.execution_policy.json + + lambda_description = "Expirations Lambda" + lambda_function_name = "trigger-expirations-${var.deployment_identifier}" + lambda_handler = "index.handler" + + lambda_environment_variables = { + SSM_SECRET = "keepersServiceSMSecrets-${var.deployment_identifier}" + } + + deploy_in_vpc = "no" + + publish = "yes" +} + +resource "aws_cloudwatch_event_rule" "expirations_lambda_cron_schedule" { + name = replace("trigger-expirations-cron_schedule", "/(.{0,64}).*/", "$1") + description = "This event will run according to a schedule for Lambda trigger-expirations" + schedule_expression = "rate(5 minutes)" + is_enabled = true +} + +resource "aws_cloudwatch_event_target" "expirations_lambda_event_target" { + rule = aws_cloudwatch_event_rule.expirations_lambda_cron_schedule.name + arn = module.expirations_lambda.lambda_arn + + depends_on = [module.expirations_lambda] +} + +resource "aws_lambda_permission" "expirations_lambda_permission" { + action = "lambda:InvokeFunction" + function_name = "trigger-expirations-${var.deployment_identifier}" + principal = "events.amazonaws.com" + source_arn = aws_cloudwatch_event_rule.expirations_lambda_cron_schedule.arn +} + +module "finalizations_lambda" { + source = "./modules/lambda" + + region = var.region + account_id = data.aws_caller_identity.caller.account_id + component = var.component + deployment_identifier = var.deployment_identifier + + lambda_runtime = "nodejs14.x" + lambda_code_output_path = "${path.module}/.terraform/archive_files/triggerFinalizations.zip" + lambda_code_source_dir = "${path.cwd}/external/lambdas/triggerFinalizations/src" + + lambda_timeout = 900 + lambda_memory_size = 128 + + lambda_assume_role = data.aws_iam_policy_document.assume_role_policy.json + lambda_execution_policy = data.aws_iam_policy_document.execution_policy.json + + lambda_description = "Finalizations Lambda" + lambda_function_name = "trigger-finalizations-${var.deployment_identifier}" + lambda_handler = "index.handler" + + lambda_environment_variables = { + SSM_SECRET = "keepersServiceSMSecrets-${var.deployment_identifier}" + } + + deploy_in_vpc = "no" + + publish = "yes" +} + +resource "aws_cloudwatch_event_rule" "finalizations_lambda_cron_schedule" { + name = replace("trigger-finalizations-cron_schedule", "/(.{0,64}).*/", "$1") + description = "This event will run according to a schedule for Lambda trigger-finalizations" + schedule_expression = "rate(5 minutes)" + is_enabled = true +} + +resource "aws_cloudwatch_event_target" "finalizations_lambda_event_target" { + rule = aws_cloudwatch_event_rule.finalizations_lambda_cron_schedule.name + arn = module.finalizations_lambda.lambda_arn + + depends_on = [module.finalizations_lambda] +} + +resource "aws_lambda_permission" "finalizations_lambda_permission" { + action = "lambda:InvokeFunction" + function_name = "trigger-finalizations-${var.deployment_identifier}" + principal = "events.amazonaws.com" + source_arn = aws_cloudwatch_event_rule.finalizations_lambda_cron_schedule.arn +} + +module "withdrawals_lambda" { + source = "./modules/lambda" + + region = var.region + account_id = data.aws_caller_identity.caller.account_id + component = var.component + deployment_identifier = var.deployment_identifier + + lambda_runtime = "nodejs14.x" + lambda_code_output_path = "${path.module}/.terraform/archive_files/triggerWithdrawals.zip" + lambda_code_source_dir = "${path.cwd}/external/lambdas/triggerWithdrawals/src" + + lambda_timeout = 900 + lambda_memory_size = 256 + + lambda_assume_role = data.aws_iam_policy_document.assume_role_policy.json + lambda_execution_policy = data.aws_iam_policy_document.execution_policy.json + + lambda_description = "Withdrawals Lambda" + lambda_function_name = "trigger-withdrawals-${var.deployment_identifier}" + lambda_handler = "index.handler" + + lambda_environment_variables = { + SSM_SECRET = "keepersServiceSMSecrets-${var.deployment_identifier}" + } + + deploy_in_vpc = "no" + + publish = "yes" +} + +resource "aws_cloudwatch_event_rule" "withdrawals_lambda_cron_schedule" { + name = replace("trigger-withdrawals-cron_schedule", "/(.{0,64}).*/", "$1") + description = "This event will run according to a schedule for Lambda trigger-withdrawals" + schedule_expression = "rate(5 minutes)" + is_enabled = true +} + +resource "aws_cloudwatch_event_target" "withdrawals_lambda_event_target" { + rule = aws_cloudwatch_event_rule.withdrawals_lambda_cron_schedule.name + arn = module.withdrawals_lambda.lambda_arn + + depends_on = [module.withdrawals_lambda] +} + +resource "aws_lambda_permission" "withdrawals_lambda_permission" { + action = "lambda:InvokeFunction" + function_name = "trigger-withdrawals-${var.deployment_identifier}" + principal = "events.amazonaws.com" + source_arn = aws_cloudwatch_event_rule.withdrawals_lambda_cron_schedule.arn +} diff --git a/infra/functions/modules/lambda/iam.tf b/infra/functions/modules/lambda/iam.tf new file mode 100644 index 00000000..748ea015 --- /dev/null +++ b/infra/functions/modules/lambda/iam.tf @@ -0,0 +1,57 @@ +data "aws_caller_identity" "current" { +} + +resource "aws_iam_role" "lambda_execution_role" { + assume_role_policy = var.lambda_assume_role != "" ? var.lambda_assume_role : jsonencode( + { + "Version": "2012-10-17", + "Statement": [ + { + Action: "sts:AssumeRole", + Principal: { + "Service": "lambda.amazonaws.com" + }, + Effect: "Allow" + } + ] + }) + tags = local.tags +} + +resource "aws_iam_role_policy" "lambda_execution_policy" { + role = aws_iam_role.lambda_execution_role.id + policy = var.lambda_execution_policy != "" ? var.lambda_execution_policy : jsonencode( + { + "Version": "2012-10-17", + "Statement": [ + { + Effect: "Allow", + Action: [ + "ec2:CreateNetworkInterface", + "ec2:DescribeNetworkInterfaces", + "ec2:DeleteNetworkInterface", + "ec2:DescribeSecurityGroups", + "ec2:AssignPrivateIpAddresses", + "ec2:UnassignPrivateIpAddresses", + "ec2:DescribeSubnets", + "ec2:DescribeVpcs" + ], + Resource: [ + "*" + ] + }, + { + Effect: "Allow", + Action: [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + Resource: [ + "arn:aws:logs:${var.region}:${var.account_id}:*" + ] + } + ] + }) +} + diff --git a/infra/functions/modules/lambda/lambda.tf b/infra/functions/modules/lambda/lambda.tf new file mode 100644 index 00000000..46c8e8c5 --- /dev/null +++ b/infra/functions/modules/lambda/lambda.tf @@ -0,0 +1,60 @@ +resource "null_resource" "null_resource" { + + triggers = { + updated_at = timestamp() + } + + provisioner "local-exec" { + command = <=2.2.7 <3" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "optional": true + }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY=" + }, + "append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "requires": { + "default-require-extensions": "^3.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "archiver": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.1.1.tgz", + "integrity": "sha512-5Hxxcig7gw5Jod/8Gq0OneVgLYET+oNHcxgWItq4TbhOzRLKNAFUb9edAftiMKXvXfCB0vbGrJdZDNq0dWMsxg==", + "dev": true, + "requires": { + "archiver-utils": "^2.1.0", + "async": "^2.6.3", + "buffer-crc32": "^0.2.1", + "glob": "^7.1.4", + "readable-stream": "^3.4.0", + "tar-stream": "^2.1.0", + "zip-stream": "^2.1.2" + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dev": true, + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "optional": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + } + }, + "array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + } + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" + }, + "as-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/as-array/-/as-array-2.0.0.tgz", + "integrity": "sha1-TwSAXYf4/OjlEbwhCPjl46KH1Uc=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-retry": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.1.tgz", + "integrity": "sha512-aiieFW/7h3hY0Bq5d+ktDBejxuwR78vRu9hDUdR8rNhSaQ29VzPL4AoIRG7D/c7tdenwOcKvgPM6tIxB3cB6HA==", + "requires": { + "retry": "0.12.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sdk": { + "version": "2.908.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.908.0.tgz", + "integrity": "sha512-+UtrKOlwjFhGRRrtf3zl5iwFcAnvuh9m63gBnFj9aA+scbP4K2qOukJxPqXCBDeFPqLGH+ojmMJE/54oSlOfmQ==", + "requires": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "basic-auth-connect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz", + "integrity": "sha1-/bC0OWLKe0BFanwrtI/hc9otISI=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", + "dev": true + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "dev": true, + "requires": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + } + } + }, + "blakejs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "dev": true + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "dev": true + } + } + }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dev": true, + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "bson": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", + "dev": true + }, + "busboy": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", + "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", + "requires": { + "dicer": "0.2.5", + "readable-stream": "1.1.x" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "requires": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001202", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001202.tgz", + "integrity": "sha512-ZcijQNqrcF8JNLjzvEiXqX4JUYxoZa7Pvcsd9UD8Kz4TvhTonOSNRsK+qtvpVL4l6+T1Rh4LFtLfnNWg6BGWCQ==", + "dev": true + }, + "cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "dev": true, + "requires": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "requires": { + "check-error": "^1.0.2" + } + }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "dev": true, + "requires": { + "traverse": ">=0.3.0 <0.4" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "optional": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "cjson": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.3.3.tgz", + "integrity": "sha1-qS2ceG5b+bkwgGMp7gXV0yYbSvo=", + "dev": true, + "requires": { + "json-parse-helpfulerror": "^1.0.3" + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, + "cli-color": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz", + "integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==", + "dev": true, + "requires": { + "ansi-regex": "^2.1.1", + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.14", + "timers-ext": "^0.1.5" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-spinners": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", + "dev": true + }, + "cli-table": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.4.tgz", + "integrity": "sha512-1vinpnX/ZERcmE443i3SZTmU5DF0rPO9DrL4I2iVAllhxzCM9SzPlHnz19fsZB78htkKZvYBvj6SZ6vXnaxmTA==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "string-width": "^4.2.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true + }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "dev": true, + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-semver": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/compare-semver/-/compare-semver-1.1.0.tgz", + "integrity": "sha1-fAp5onu4C2xplERfgpWCWdPQIVM=", + "dev": true, + "requires": { + "semver": "^5.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "compress-commons": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-2.1.1.tgz", + "integrity": "sha512-eVw6n7CnEMFzc3duyFVrQEuY1BlHR3rYsSztyG32ibGMW722i3C6IizEGMFmfMU+A+fALvBIwxN3czffTcdA+Q==", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^3.0.1", + "normalize-path": "^3.0.0", + "readable-stream": "^2.3.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true + }, + "core-js": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.9.1.tgz", + "integrity": "sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "coverage-badge-creator": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/coverage-badge-creator/-/coverage-badge-creator-1.0.4.tgz", + "integrity": "sha512-A3QLEchd2nNfWuMqen+Ns9n0swBJGETMDN1H9olg0Nzjx1Fga91oCQ8bq7WFZ8rhPgr6QK1SK1opCmKJKTX+3A==", + "dev": true + }, + "crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dev": true, + "requires": { + "buffer": "^5.1.0" + } + }, + "crc32-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-3.0.1.tgz", + "integrity": "sha512-mctvpXlbzsvK+6z8kJwSJ5crm7yBwrQMTybJzMw1O4lLGJqjlDCXY2Zw7KheiA6XBEcBmfLx1D88mjRGVJtY9w==", + "dev": true, + "requires": { + "crc": "^3.4.4", + "readable-stream": "^3.4.0" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-env": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz", + "integrity": "sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.5" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" + }, + "csv-streamify": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/csv-streamify/-/csv-streamify-3.0.4.tgz", + "integrity": "sha1-TLYUxX4/KZzKF7Y/3LStFnd39Ho=", + "dev": true, + "requires": { + "through2": "2.0.1" + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-uri-to-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", + "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", + "dev": true + }, + "date-and-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/date-and-time/-/date-and-time-1.0.0.tgz", + "integrity": "sha512-477D7ypIiqlXBkxhU7YtG9wWZJEQ+RUpujt2quTfgf4+E8g5fNUkB0QIL0bVyP5/TKBg8y55Hfa1R/c4bt3dEw==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-freeze": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", + "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "requires": { + "strip-bom": "^4.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + } + } + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "degenerator": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-2.2.0.tgz", + "integrity": "sha512-aiQcQowF01RxFI4ZLFMpzyotbQonhNpBao6dkI8JPk5a+hmSjR5ErHp2CQySmQe8os3VBqLCIh87nDBgZXvsmg==", + "dev": true, + "requires": { + "ast-types": "^0.13.2", + "escodegen": "^1.8.1", + "esprima": "^4.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dicer": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", + "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", + "requires": { + "readable-stream": "1.1.x", + "streamsearch": "0.1.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "requires": { + "is-obj": "^2.0.0" + } + }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "duplexify": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.1.tgz", + "integrity": "sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA==", + "requires": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "electron-to-chromium": { + "version": "1.3.689", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.689.tgz", + "integrity": "sha512-WCn+ZaU3V8WttlLNSOGOAlR2XpxibGre7slwGrYBB6oTjYPgP29LNDGG6wLvLTMseLdE+G1vno7PfY7JyDV48g==", + "dev": true + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=" + }, + "env-paths": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", + "dev": true, + "optional": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + } + } + }, + "es-abstract": { + "version": "1.18.0-next.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", + "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.1", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "eslint": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz", + "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.3.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "eslint-config-prettier": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz", + "integrity": "sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-sig-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", + "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", + "dev": true, + "requires": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.0" + }, + "dependencies": { + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true + } + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "dev": true, + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "ethers": { + "version": "5.0.26", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.26.tgz", + "integrity": "sha512-MqA8Fvutn3qEW0yBJOHeV6KZmRpF2rqlL2B5058AGkUFsuu6j5Ns/FRlMsbGeQwBz801IB23jQp7vjRfFsKSkg==", + "requires": { + "@ethersproject/abi": "5.0.10", + "@ethersproject/abstract-provider": "5.0.8", + "@ethersproject/abstract-signer": "5.0.11", + "@ethersproject/address": "5.0.9", + "@ethersproject/base64": "5.0.7", + "@ethersproject/basex": "5.0.7", + "@ethersproject/bignumber": "5.0.13", + "@ethersproject/bytes": "5.0.9", + "@ethersproject/constants": "5.0.8", + "@ethersproject/contracts": "5.0.9", + "@ethersproject/hash": "5.0.10", + "@ethersproject/hdnode": "5.0.8", + "@ethersproject/json-wallets": "5.0.10", + "@ethersproject/keccak256": "5.0.7", + "@ethersproject/logger": "5.0.8", + "@ethersproject/networks": "5.0.7", + "@ethersproject/pbkdf2": "5.0.7", + "@ethersproject/properties": "5.0.7", + "@ethersproject/providers": "5.0.19", + "@ethersproject/random": "5.0.7", + "@ethersproject/rlp": "5.0.7", + "@ethersproject/sha2": "5.0.7", + "@ethersproject/signing-key": "5.0.8", + "@ethersproject/solidity": "5.0.8", + "@ethersproject/strings": "5.0.8", + "@ethersproject/transactions": "5.0.9", + "@ethersproject/units": "5.0.9", + "@ethersproject/wallet": "5.0.10", + "@ethersproject/web": "5.0.12", + "@ethersproject/wordlists": "5.0.8" + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "events-listener": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/events-listener/-/events-listener-1.1.0.tgz", + "integrity": "sha512-Kd3EgYfODHueq6GzVfs/VUolh2EgJsS8hkO3KpnDrxVjU3eq63eXM2ujXkhPP+OkeUOhL8CxdfZbQXzryb5C4g==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "exegesis": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/exegesis/-/exegesis-2.5.6.tgz", + "integrity": "sha512-e+YkH/zZTN2njiwrV8tY6tHGDsFu3LyR/YbrqdWvDZaAJ5YGWaBYyd3oX/Y26iGqQc+7jLEKLDTv2UPzjAYL8w==", + "dev": true, + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.3", + "ajv": "^6.12.2", + "body-parser": "^1.18.3", + "content-type": "^1.0.4", + "deep-freeze": "0.0.1", + "events-listener": "^1.1.0", + "glob": "^7.1.3", + "json-ptr": "^1.3.1", + "json-schema-traverse": "^0.4.1", + "lodash": "^4.17.11", + "openapi3-ts": "^1.2.0", + "promise-breaker": "^5.0.0", + "pump": "^3.0.0", + "qs": "^6.6.0", + "raw-body": "^2.3.3", + "semver": "^7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "exegesis-express": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/exegesis-express/-/exegesis-express-2.0.0.tgz", + "integrity": "sha512-NKvKBsBa2OvU+1BFpWbz3PzoRMhA9q7/wU2oMmQ9X8lPy/FRatADvhlkGO1zYOMgeo35k1ZLO9ZV0uIs9pPnXg==", + "dev": true, + "requires": { + "exegesis": "^2.0.0" + } + }, + "exit-code": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/exit-code/-/exit-code-1.0.2.tgz", + "integrity": "sha1-zhZYEcnxF69qX4gpQLlq5/muzDQ=", + "dev": true + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "express-basic-auth": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/express-basic-auth/-/express-basic-auth-1.2.0.tgz", + "integrity": "sha512-iJ0h1Gk6fZRrFmO7tP9nIbxwNgCUJASfNj5fb0Hy15lGtbqqsxpt7609+wq+0XlByZjXmC/rslWQtnuSTVRIcg==", + "requires": { + "basic-auth": "^2.0.1" + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "faker": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.3.1.tgz", + "integrity": "sha512-sVdoApX/awJHO9DZHZsHVaJBNFiJW0n3lPs0q/nFxp/Mtya1dr2sCMktST3mdxNMHjkvKTTMAW488E+jH1eSbg==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, + "fast-text-encoding": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz", + "integrity": "sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==" + }, + "fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=", + "dev": true, + "requires": { + "punycode": "^1.3.2" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "fecha": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", + "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", + "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" + }, + "file-uri-to-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz", + "integrity": "sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==", + "dev": true + }, + "filesize": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", + "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + } + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "firebase-tools": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/firebase-tools/-/firebase-tools-9.2.2.tgz", + "integrity": "sha512-AFjf7S9NjEM+u8ZByJEKASxRG1g+LLg/A0CrzA3V91P92MN+8cyrCigEs7mCdtFknLaShrCgzROyo/OEwd4xdA==", + "dev": true, + "requires": { + "@google-cloud/pubsub": "^2.7.0", + "JSONStream": "^1.2.1", + "abort-controller": "^3.0.0", + "archiver": "^3.0.0", + "body-parser": "^1.19.0", + "chokidar": "^3.0.2", + "cjson": "^0.3.1", + "cli-color": "^1.2.0", + "cli-table": "^0.3.1", + "commander": "^4.0.1", + "configstore": "^5.0.1", + "cross-env": "^5.1.3", + "cross-spawn": "^7.0.1", + "csv-streamify": "^3.0.4", + "dotenv": "^6.1.0", + "exegesis-express": "^2.0.0", + "exit-code": "^1.0.2", + "express": "^4.16.4", + "filesize": "^3.1.3", + "fs-extra": "^0.23.1", + "glob": "^7.1.2", + "google-auth-library": "^6.1.3", + "inquirer": "~6.3.1", + "js-yaml": "^3.13.1", + "jsonschema": "^1.0.2", + "jsonwebtoken": "^8.2.1", + "leven": "^3.1.0", + "lodash": "^4.17.19", + "marked": "^0.7.0", + "marked-terminal": "^3.3.0", + "minimatch": "^3.0.4", + "morgan": "^1.10.0", + "node-fetch": "^2.6.1", + "open": "^6.3.0", + "ora": "^3.4.0", + "plist": "^3.0.1", + "portfinder": "^1.0.23", + "progress": "^2.0.3", + "proxy-agent": "^4.0.0", + "request": "^2.87.0", + "rimraf": "^3.0.0", + "semver": "^5.7.1", + "superstatic": "^7.1.0", + "tar": "^4.3.0", + "tcp-port-used": "^1.0.1", + "tmp": "0.0.33", + "triple-beam": "^1.3.0", + "tweetsodium": "0.0.5", + "universal-analytics": "^0.4.16", + "unzipper": "^0.10.10", + "update-notifier": "^4.1.0", + "uuid": "^3.0.0", + "winston": "^3.0.0", + "ws": "^7.2.3" + }, + "dependencies": { + "dotenv": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", + "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "flat-arguments": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flat-arguments/-/flat-arguments-1.0.2.tgz", + "integrity": "sha1-m6p4Ct8FAfKC1ybJxqA426ROp28=", + "dev": true, + "requires": { + "array-flatten": "^1.0.0", + "as-array": "^1.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isobject": "^3.0.0" + }, + "dependencies": { + "as-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/as-array/-/as-array-1.0.0.tgz", + "integrity": "sha1-KKbu6qVynx9OyiBH316d4avaDtE=", + "dev": true, + "requires": { + "lodash.isarguments": "2.4.x", + "lodash.isobject": "^2.4.1", + "lodash.values": "^2.4.1" + }, + "dependencies": { + "lodash.isarguments": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-2.4.1.tgz", + "integrity": "sha1-STGpwIJTrfCRrnyhkiWKlzh27Mo=", + "dev": true + }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "dev": true, + "requires": { + "lodash._objecttypes": "~2.4.1" + } + } + } + }, + "lodash.isobject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", + "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=", + "dev": true + } + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "dev": true + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==", + "dev": true + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "freeport": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/freeport/-/freeport-1.0.5.tgz", + "integrity": "sha1-JV6KuEFwwzuoXZkOghrl9KGpvF0=", + "dev": true + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.23.1.tgz", + "integrity": "sha1-ZhHbpq3yq43Jxp+rN83fiBgVfj0=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", + "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", + "dev": true, + "optional": true + }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "ftp": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", + "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", + "dev": true, + "requires": { + "readable-stream": "1.1.x", + "xregexp": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "gaxios": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.1.0.tgz", + "integrity": "sha512-vb0to8xzGnA2qcgywAjtshOKKVDf2eQhJoiL6fHhgW5tVN7wNk7egnYIO9zotfn3lQ3De1VPdf7V5/BWfCtCmg==", + "requires": { + "abort-controller": "^3.0.0", + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.3.0" + } + }, + "gcp-metadata": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.1.tgz", + "integrity": "sha512-tSk+REe5iq/N+K+SK1XjZJUrFPuDqGZVzCy2vocIHIGmPlTGsa8owXMJwGkrXr73NO0AzhPW4MF2DEHz7P2AVw==", + "requires": { + "gaxios": "^4.0.0", + "json-bigint": "^1.0.0" + } + }, + "gcs-resumable-upload": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/gcs-resumable-upload/-/gcs-resumable-upload-3.1.4.tgz", + "integrity": "sha512-5dyDfHrrVcIskiw/cPssVD4HRiwoHjhk1Nd6h5W3pQ/qffDvhfy4oNCr1f3ZXFPwTnxkCbibsB+73oOM+NvmJQ==", + "requires": { + "abort-controller": "^3.0.0", + "configstore": "^5.0.0", + "extend": "^3.0.2", + "gaxios": "^4.0.0", + "google-auth-library": "^7.0.0", + "pumpify": "^2.0.0", + "stream-events": "^1.0.4" + }, + "dependencies": { + "google-auth-library": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.0.4.tgz", + "integrity": "sha512-o8irYyeijEiecTXeoEe8UKNEzV1X+uhR4b2oNdapDMZixypp0J+eHimGOyx5Joa3UAeokGngdtDLXtq9vDqG2Q==", + "requires": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^4.0.0", + "gcp-metadata": "^4.2.0", + "gtoken": "^5.0.4", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + } + } + } + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", + "integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==" + }, + "get-uri": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-3.0.2.tgz", + "integrity": "sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "data-uri-to-buffer": "3", + "debug": "4", + "file-uri-to-path": "2", + "fs-extra": "^8.1.0", + "ftp": "^0.3.10" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glob-slash/-/glob-slash-1.0.0.tgz", + "integrity": "sha1-/lLvpDMjP3Si/mTHq7m8hIICq5U=", + "dev": true + }, + "glob-slasher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glob-slasher/-/glob-slasher-1.0.1.tgz", + "integrity": "sha1-dHoOW7IiZC7hDT4FRD4QlJPLD44=", + "dev": true, + "requires": { + "glob-slash": "^1.0.0", + "lodash.isobject": "^2.4.1", + "toxic": "^1.0.0" + } + }, + "global-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "dev": true, + "requires": { + "ini": "1.3.7" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "google-auth-library": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-6.1.6.tgz", + "integrity": "sha512-Q+ZjUEvLQj/lrVHF/IQwRo6p3s8Nc44Zk/DALsN+ac3T4HY/g/3rrufkgtl+nZ1TW7DNAw5cTChdVp4apUXVgQ==", + "dev": true, + "requires": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^4.0.0", + "gcp-metadata": "^4.2.0", + "gtoken": "^5.0.4", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + } + }, + "google-gax": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-2.10.0.tgz", + "integrity": "sha512-K+1JK5ofNl5k30LsI8UQb/DeLMEbhL/SWirCx0L9pnMcApSfAjRAO7yajXT5X1vicxDBnNSwKs+cu4elxpYraw==", + "dev": true, + "requires": { + "@grpc/grpc-js": "~1.2.0", + "@grpc/proto-loader": "^0.5.1", + "@types/long": "^4.0.0", + "abort-controller": "^3.0.0", + "duplexify": "^4.0.0", + "fast-text-encoding": "^1.0.3", + "google-auth-library": "^6.1.3", + "is-stream-ended": "^0.1.4", + "node-fetch": "^2.6.1", + "protobufjs": "^6.10.2", + "retry-request": "^4.0.0" + } + }, + "google-p12-pem": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", + "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", + "requires": { + "node-forge": "^0.10.0" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gtoken": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.2.1.tgz", + "integrity": "sha512-OY0BfPKe3QnMsY9MzTHTSKn+Vl2l1CcLe6BwDEQj00mbbkl5nyQ/7EUREstg4fQNZ8iYE7br4JJ7TdKeDOPWmw==", + "requires": { + "gaxios": "^4.0.0", + "google-p12-pem": "^3.0.3", + "jws": "^4.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "hash-stream-validation": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/hash-stream-validation/-/hash-stream-validation-0.2.4.tgz", + "integrity": "sha512-Gjzu0Xn7IagXVkSu9cSFuK1fqzwtLwFhNhVL8IFJijRNMgUttFbBSIAzKuSIrsFMO1+g1RlsoN49zPIbwPDMGQ==" + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "requires": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/home-dir/-/home-dir-1.0.0.tgz", + "integrity": "sha1-KRfrRL3JByztqUJXlUOEfjAX/k4=", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" + }, + "html-comment-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", + "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==" + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.11", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + } + } + }, + "install": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==" + }, + "install-artifact-from-github": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/install-artifact-from-github/-/install-artifact-from-github-1.2.0.tgz", + "integrity": "sha512-3OxCPcY55XlVM3kkfIpeCgmoSKnMsz2A3Dbhsq0RXpIknKQmrX1YiznCeW9cD2ItFmDxziA3w6Eg8d80AoL3oA==", + "dev": true, + "optional": true + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", + "dev": true + }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "is-stream-ended": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "requires": { + "html-comment-regex": "^1.1.0" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, + "is2": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.6.tgz", + "integrity": "sha512-+Z62OHOjA6k2sUDOKXoZI3EXv7Fb1K52jpTBLbkfx62bcUeSsrTBLhEquCRDKTx0XE5XbHcG/S2vrtE3lnEDsQ==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "ip-regex": "^4.1.0", + "is-url": "^1.2.4" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "requires": { + "append-transform": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + } + }, + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" + }, + "join-path": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/join-path/-/join-path-1.1.1.tgz", + "integrity": "sha1-EFNaEm0ky9Zff/zfFe8uYxB2tQU=", + "dev": true, + "requires": { + "as-array": "^2.0.0", + "url-join": "0.0.1", + "valid-url": "^1" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", + "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", + "dev": true, + "requires": { + "jju": "^1.1.0" + } + }, + "json-ptr": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/json-ptr/-/json-ptr-1.3.2.tgz", + "integrity": "sha512-tFH40YQ+lG7mgYYM1kGZOhQngO4SbOEHZJlA4W+NtetWZ20EUU3BPU+30uWRKumuAJoSo5eqrsXD2h72ioS8ew==", + "dev": true, + "requires": { + "tslib": "^2.0.0" + } + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsonschema": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", + "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", + "dev": true + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "requires": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "kareem": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", + "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" + }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "dev": true, + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "keccak256": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.2.tgz", + "integrity": "sha512-f2EncSgmHmmQOkgxZ+/f2VaWTNkFL6f39VIrpoX+p8cEXJVyyCs/3h9GNz/ViHgwchxvv7oG5mjT2Tk4ZqInag==", + "dev": true, + "requires": { + "bn.js": "^4.11.8", + "keccak": "^3.0.1" + } + }, + "keythereum": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/keythereum/-/keythereum-1.2.0.tgz", + "integrity": "sha512-u3XnjIruOmjIvJ4tH1Wdr2y0X8+z8BZTQ+dqJuDMyLvNWw6VnH9XKtt0yauSE+96Bq97h6CPm4w5LbW3i28x0g==", + "dev": true, + "requires": { + "crypto-browserify": "3.12.0", + "keccak": "3.0.1", + "scrypt-js": "3.0.1", + "secp256k1": "4.0.2", + "sjcl": "1.0.6", + "uuid": "3.0.0" + }, + "dependencies": { + "uuid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", + "integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=", + "dev": true + } + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "dev": true + }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "lodash._isnative": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz", + "integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw=", + "dev": true + }, + "lodash._objecttypes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", + "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=", + "dev": true + }, + "lodash._shimkeys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", + "integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=", + "dev": true, + "requires": { + "lodash._objecttypes": "~2.4.1" + } + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "dev": true, + "requires": { + "lodash._objecttypes": "~2.4.1" + } + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "dev": true, + "requires": { + "lodash._isnative": "~2.4.1", + "lodash._shimkeys": "~2.4.1", + "lodash.isobject": "~2.4.1" + } + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "lodash.toarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", + "dev": true + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", + "dev": true + }, + "lodash.values": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz", + "integrity": "sha1-q/UUQ2s8twUAFieXjLzzCxKA7qQ=", + "dev": true, + "requires": { + "lodash.keys": "~2.4.1" + } + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "dev": true, + "requires": { + "chalk": "^2.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "logform": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "dev": true, + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + } + }, + "marked": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "dev": true + }, + "marked-terminal": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-3.3.0.tgz", + "integrity": "sha512-+IUQJ5VlZoAFsM5MHNT7g3RHSkA3eETqhRCdXv4niUMAKHQ7lb1yvAcuGPmm4soxhmtX13u4Li6ZToXtvSEH+A==", + "dev": true, + "requires": { + "ansi-escapes": "^3.1.0", + "cardinal": "^2.1.1", + "chalk": "^2.4.1", + "cli-table": "^0.3.1", + "node-emoji": "^1.4.1", + "supports-hyperlinks": "^1.0.1" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + }, + "dependencies": { + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + } + } + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.0.tgz", + "integrity": "sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==" + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "requires": { + "mime-db": "1.45.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "optional": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", + "dev": true, + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.3", + "debug": "4.2.0", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.2", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "chokidar": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "mock-express-request": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/mock-express-request/-/mock-express-request-0.2.2.tgz", + "integrity": "sha512-EymHjY1k1jWIsaVaCsPdFterWO18gcNwQMb99OryhSBtIA33SZJujOLeOe03Rf2DTV997xLPyl2I098WCFm/mA==", + "requires": { + "accepts": "^1.3.4", + "fresh": "^0.5.2", + "lodash": "^4.17.4", + "mock-req": "^0.2.0", + "parseurl": "^1.3.2", + "range-parser": "^1.2.0", + "type-is": "^1.6.15" + } + }, + "mock-req": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mock-req/-/mock-req-0.2.0.tgz", + "integrity": "sha1-dJRGgE0sAGFpNC7nvmu6HP/VNMI=" + }, + "mongodb": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", + "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.11.13", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.11.13.tgz", + "integrity": "sha512-rXbaxSJfLnKKO2RTm8MKt65glrtfKDc4ATEb6vEbbzsVGCiLut753K5axdpyvE7KeTH7GOh4LzmuQLOvaaWOmA==", + "requires": { + "@types/mongodb": "^3.5.27", + "bson": "^1.1.4", + "kareem": "2.3.2", + "mongodb": "3.6.3", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.8.3", + "mquery": "3.2.3", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.2.1", + "sift": "7.0.1", + "sliced": "1.0.1" + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mongoose-update-if-current": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/mongoose-update-if-current/-/mongoose-update-if-current-1.4.0.tgz", + "integrity": "sha512-Rau2nvdiLExqXrSOwMMgDYQgf/fwTJQpPidTcT7C9UMQ282gTKXjDuh5vrjVvVQpfuvkiPis0tGHdXffaD54bg==", + "requires": { + "core-js": "^3.2.1", + "kareem": "^2.3.0", + "regenerator-runtime": "^0.13.5" + } + }, + "morgan": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", + "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", + "dev": true, + "requires": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "mpath": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", + "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" + }, + "mquery": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.3.tgz", + "integrity": "sha512-cIfbP4TyMYX+SkaQ2MntD+F2XbqaBHUYWk3j+kqdDztPWok3tgyssOZxMHMtzbV1w9DaSlvEea0Iocuro41A4g==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "multer": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz", + "integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==", + "requires": { + "append-field": "^1.0.0", + "busboy": "^0.2.11", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.1", + "on-finished": "^2.3.0", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + } + }, + "multer-s3": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/multer-s3/-/multer-s3-2.9.0.tgz", + "integrity": "sha512-qLF8pCD5HhXLLd954q49B63x3bk6Fe0jqD3eM0FVcGtqhiSVuTrchEDAo0mnO5pc34cMuX/CVCCbPkGTjX2xUA==", + "requires": { + "file-type": "^3.3.0", + "is-svg": "^2.1.0", + "run-parallel": "^1.1.6" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, + "nanoid": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", + "dev": true + }, + "nash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/nash/-/nash-3.0.0.tgz", + "integrity": "sha512-M5SahEycXUmko3zOvsBkF6p94CWLhnyy9hfpQ9Qzp+rQkQ8D1OaTlfTl1OBWktq9Fak3oDXKU+ev7tiMaMu+1w==", + "dev": true, + "requires": { + "async": "^1.3.0", + "flat-arguments": "^1.0.0", + "lodash": "^4.17.5", + "minimist": "^1.1.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true + }, + "node-emoji": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", + "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==", + "dev": true, + "requires": { + "lodash.toarray": "^4.4.0" + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + }, + "node-gyp": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz", + "integrity": "sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ==", + "dev": true, + "optional": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.3", + "nopt": "^5.0.0", + "npmlog": "^4.1.2", + "request": "^2.88.2", + "rimraf": "^3.0.2", + "semver": "^7.3.2", + "tar": "^6.0.2", + "which": "^2.0.2" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "optional": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tar": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + } + } + }, + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", + "dev": true + }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "requires": { + "process-on-spawn": "^1.0.0" + } + }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "optional": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, + "npm": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/npm/-/npm-7.6.3.tgz", + "integrity": "sha512-+Cs8TEtkfdQGTIPw8AeqVtNNHyo1Zw8HATzAFFWYnK7jQYgT/CatEy85+BlEoEpqvga2uaKqVrXsTAYj28emjg==", + "requires": { + "@npmcli/arborist": "^2.2.8", + "@npmcli/ci-detect": "^1.2.0", + "@npmcli/config": "^1.2.9", + "@npmcli/run-script": "^1.8.3", + "abbrev": "~1.1.1", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "byte-size": "^7.0.1", + "cacache": "^15.0.5", + "chalk": "^4.1.0", + "chownr": "^2.0.0", + "cli-columns": "^3.1.2", + "cli-table3": "^0.6.0", + "columnify": "~1.5.4", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "hosted-git-info": "^3.0.8", + "ini": "^2.0.0", + "init-package-json": "^2.0.2", + "is-cidr": "^4.0.2", + "json-parse-even-better-errors": "^2.3.1", + "leven": "^3.1.0", + "libnpmaccess": "^4.0.1", + "libnpmdiff": "^2.0.4", + "libnpmfund": "^1.0.2", + "libnpmhook": "^6.0.1", + "libnpmorg": "^2.0.1", + "libnpmpack": "^2.0.1", + "libnpmpublish": "^4.0.0", + "libnpmsearch": "^3.1.0", + "libnpmteam": "^2.0.2", + "libnpmversion": "^1.0.11", + "make-fetch-happen": "^8.0.14", + "minipass": "^3.1.3", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "mkdirp-infer-owner": "^2.0.0", + "ms": "^2.1.2", + "node-gyp": "^7.1.2", + "nopt": "^5.0.0", + "npm-audit-report": "^2.1.4", + "npm-package-arg": "^8.1.1", + "npm-pick-manifest": "^6.1.0", + "npm-profile": "^5.0.2", + "npm-registry-fetch": "^9.0.0", + "npm-user-validate": "^1.0.1", + "npmlog": "~4.1.2", + "opener": "^1.5.2", + "pacote": "^11.3.0", + "parse-conflict-json": "^1.1.1", + "qrcode-terminal": "^0.12.0", + "read": "~1.0.7", + "read-package-json": "^3.0.1", + "read-package-json-fast": "^2.0.2", + "readdir-scoped-modules": "^1.1.0", + "rimraf": "^3.0.2", + "semver": "^7.3.4", + "ssri": "^8.0.1", + "tar": "^6.1.0", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "treeverse": "^1.0.4", + "validate-npm-package-name": "~3.0.0", + "which": "^2.0.2", + "write-file-atomic": "^3.0.3" + }, + "dependencies": { + "@npmcli/arborist": { + "version": "2.2.8", + "bundled": true, + "requires": { + "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/map-workspaces": "^1.0.2", + "@npmcli/metavuln-calculator": "^1.1.0", + "@npmcli/move-file": "^1.1.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^1.0.1", + "@npmcli/run-script": "^1.8.2", + "bin-links": "^2.2.1", + "cacache": "^15.0.3", + "common-ancestor-path": "^1.0.1", + "json-parse-even-better-errors": "^2.3.1", + "json-stringify-nice": "^1.1.1", + "mkdirp-infer-owner": "^2.0.0", + "npm-install-checks": "^4.0.0", + "npm-package-arg": "^8.1.0", + "npm-pick-manifest": "^6.1.0", + "npm-registry-fetch": "^9.0.0", + "pacote": "^11.2.6", + "parse-conflict-json": "^1.1.1", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^2.0.2", + "readdir-scoped-modules": "^1.1.0", + "semver": "^7.3.4", + "tar": "^6.1.0", + "treeverse": "^1.0.4", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/ci-detect": { + "version": "1.3.0", + "bundled": true + }, + "@npmcli/config": { + "version": "1.2.9", + "bundled": true, + "requires": { + "ini": "^2.0.0", + "mkdirp-infer-owner": "^2.0.0", + "nopt": "^5.0.0", + "semver": "^7.3.4", + "walk-up-path": "^1.0.0" + } + }, + "@npmcli/disparity-colors": { + "version": "1.0.1", + "bundled": true, + "requires": { + "ansi-styles": "^4.3.0" + } + }, + "@npmcli/git": { + "version": "2.0.6", + "bundled": true, + "requires": { + "@npmcli/promise-spawn": "^1.1.0", + "lru-cache": "^6.0.0", + "mkdirp": "^1.0.3", + "npm-pick-manifest": "^6.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.2", + "unique-filename": "^1.1.1", + "which": "^2.0.2" + } + }, + "@npmcli/installed-package-contents": { + "version": "1.0.7", + "bundled": true, + "requires": { + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "@npmcli/map-workspaces": { + "version": "1.0.3", + "bundled": true, + "requires": { + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^7.1.6", + "minimatch": "^3.0.4", + "read-package-json-fast": "^2.0.1" + } + }, + "@npmcli/metavuln-calculator": { + "version": "1.1.0", + "bundled": true, + "requires": { + "cacache": "^15.0.5", + "pacote": "^11.1.11", + "semver": "^7.3.2" + } + }, + "@npmcli/move-file": { + "version": "1.1.2", + "bundled": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@npmcli/name-from-folder": { + "version": "1.0.1", + "bundled": true + }, + "@npmcli/node-gyp": { + "version": "1.0.2", + "bundled": true + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "bundled": true, + "requires": { + "infer-owner": "^1.0.4" + } + }, + "@npmcli/run-script": { + "version": "1.8.3", + "bundled": true, + "requires": { + "@npmcli/node-gyp": "^1.0.2", + "@npmcli/promise-spawn": "^1.3.2", + "infer-owner": "^1.0.4", + "node-gyp": "^7.1.0", + "puka": "^1.0.1", + "read-package-json-fast": "^2.0.1" + } + }, + "@tootallnate/once": { + "version": "1.1.2", + "bundled": true + }, + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "agent-base": { + "version": "6.0.2", + "bundled": true, + "requires": { + "debug": "4" + } + }, + "agentkeepalive": { + "version": "4.1.4", + "bundled": true, + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + } + }, + "aggregate-error": { + "version": "3.1.0", + "bundled": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "bundled": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "ansi-styles": { + "version": "4.3.0", + "bundled": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true + }, + "aproba": { + "version": "2.0.0", + "bundled": true + }, + "archy": { + "version": "1.0.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "asap": { + "version": "2.0.6", + "bundled": true + }, + "asn1": { + "version": "0.2.4", + "bundled": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true + }, + "aws-sign2": { + "version": "0.7.0", + "bundled": true + }, + "aws4": { + "version": "1.11.0", + "bundled": true + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "bundled": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bin-links": { + "version": "2.2.1", + "bundled": true, + "requires": { + "cmd-shim": "^4.0.1", + "mkdirp": "^1.0.3", + "npm-normalize-package-bin": "^1.0.0", + "read-cmd-shim": "^2.0.0", + "rimraf": "^3.0.0", + "write-file-atomic": "^3.0.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "builtins": { + "version": "1.0.3", + "bundled": true + }, + "byte-size": { + "version": "7.0.1", + "bundled": true + }, + "cacache": { + "version": "15.0.5", + "bundled": true, + "requires": { + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.0", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + } + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "chalk": { + "version": "4.1.0", + "bundled": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chownr": { + "version": "2.0.0", + "bundled": true + }, + "cidr-regex": { + "version": "3.1.1", + "bundled": true, + "requires": { + "ip-regex": "^4.1.0" + } + }, + "clean-stack": { + "version": "2.2.0", + "bundled": true + }, + "cli-columns": { + "version": "3.1.2", + "bundled": true, + "requires": { + "string-width": "^2.0.0", + "strip-ansi": "^3.0.1" + } + }, + "cli-table3": { + "version": "0.6.0", + "bundled": true, + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "bundled": true + }, + "string-width": { + "version": "4.2.0", + "bundled": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "bundled": true + }, + "cmd-shim": { + "version": "4.1.0", + "bundled": true, + "requires": { + "mkdirp-infer-owner": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "color-convert": { + "version": "2.0.1", + "bundled": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "bundled": true + }, + "colors": { + "version": "1.4.0", + "bundled": true, + "optional": true + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "bundled": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "common-ancestor-path": { + "version": "1.0.1", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "4.3.1", + "bundled": true, + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "bundled": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "bundled": true + }, + "defaults": { + "version": "1.0.3", + "bundled": true, + "requires": { + "clone": "^1.0.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "depd": { + "version": "1.1.2", + "bundled": true + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "diff": { + "version": "5.0.0", + "bundled": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "bundled": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "bundled": true + }, + "encoding": { + "version": "0.1.13", + "bundled": true, + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + } + }, + "env-paths": { + "version": "2.2.0", + "bundled": true + }, + "err-code": { + "version": "2.0.3", + "bundled": true + }, + "extend": { + "version": "3.0.2", + "bundled": true + }, + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "bundled": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.3.3", + "bundled": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-minipass": { + "version": "2.1.0", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "function-bind": { + "version": "1.1.1", + "bundled": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.6", + "bundled": true + }, + "har-schema": { + "version": "2.0.0", + "bundled": true + }, + "har-validator": { + "version": "5.1.5", + "bundled": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "bundled": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "bundled": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hosted-git-info": { + "version": "3.0.8", + "bundled": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "bundled": true + }, + "http-proxy-agent": { + "version": "4.0.1", + "bundled": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "http-signature": { + "version": "1.2.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "bundled": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.6.2", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true + }, + "indent-string": { + "version": "4.0.0", + "bundled": true + }, + "infer-owner": { + "version": "1.0.4", + "bundled": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true + }, + "ini": { + "version": "2.0.0", + "bundled": true + }, + "init-package-json": { + "version": "2.0.2", + "bundled": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^8.1.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "^3.0.0", + "semver": "^7.3.2", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "^3.0.0" + } + }, + "ip": { + "version": "1.1.5", + "bundled": true + }, + "ip-regex": { + "version": "4.3.0", + "bundled": true + }, + "is-cidr": { + "version": "4.0.2", + "bundled": true, + "requires": { + "cidr-regex": "^3.1.1" + } + }, + "is-core-module": { + "version": "2.2.0", + "bundled": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + }, + "is-lambda": { + "version": "1.0.1", + "bundled": true + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "bundled": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "bundled": true + }, + "json-stringify-nice": { + "version": "1.1.1", + "bundled": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "jsonparse": { + "version": "1.3.1", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-diff": { + "version": "3.0.2", + "bundled": true + }, + "just-diff-apply": { + "version": "3.0.0", + "bundled": true + }, + "leven": { + "version": "3.1.0", + "bundled": true + }, + "libnpmaccess": { + "version": "4.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "minipass": "^3.1.1", + "npm-package-arg": "^8.0.0", + "npm-registry-fetch": "^9.0.0" + } + }, + "libnpmdiff": { + "version": "2.0.4", + "bundled": true, + "requires": { + "@npmcli/disparity-colors": "^1.0.1", + "@npmcli/installed-package-contents": "^1.0.7", + "binary-extensions": "^2.2.0", + "diff": "^5.0.0", + "minimatch": "^3.0.4", + "npm-package-arg": "^8.1.1", + "pacote": "^11.3.0", + "tar": "^6.1.0" + } + }, + "libnpmfund": { + "version": "1.0.2", + "bundled": true, + "requires": { + "@npmcli/arborist": "^2.0.0" + } + }, + "libnpmhook": { + "version": "6.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^9.0.0" + } + }, + "libnpmorg": { + "version": "2.0.1", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^9.0.0" + } + }, + "libnpmpack": { + "version": "2.0.1", + "bundled": true, + "requires": { + "@npmcli/run-script": "^1.8.3", + "npm-package-arg": "^8.1.0", + "pacote": "^11.2.6" + } + }, + "libnpmpublish": { + "version": "4.0.0", + "bundled": true, + "requires": { + "normalize-package-data": "^3.0.0", + "npm-package-arg": "^8.1.0", + "npm-registry-fetch": "^9.0.0", + "semver": "^7.1.3", + "ssri": "^8.0.0" + } + }, + "libnpmsearch": { + "version": "3.1.0", + "bundled": true, + "requires": { + "npm-registry-fetch": "^9.0.0" + } + }, + "libnpmteam": { + "version": "2.0.2", + "bundled": true, + "requires": { + "aproba": "^2.0.0", + "npm-registry-fetch": "^9.0.0" + } + }, + "libnpmversion": { + "version": "1.0.11", + "bundled": true, + "requires": { + "@npmcli/git": "^2.0.6", + "@npmcli/run-script": "^1.8.3", + "read-package-json-fast": "^2.0.1", + "semver": "^7.3.4", + "stringify-package": "^1.0.1" + } + }, + "lru-cache": { + "version": "6.0.0", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-fetch-happen": { + "version": "8.0.14", + "bundled": true, + "requires": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.0.5", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^5.0.0", + "ssri": "^8.0.0" + } + }, + "mime-db": { + "version": "1.45.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.28", + "bundled": true, + "requires": { + "mime-db": "1.45.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minipass": { + "version": "3.1.3", + "bundled": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-fetch": { + "version": "1.3.3", + "bundled": true, + "requires": { + "encoding": "^0.1.12", + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-json-stream": { + "version": "1.0.1", + "bundled": true, + "requires": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-sized": { + "version": "1.0.3", + "bundled": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "bundled": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "bundled": true + }, + "mkdirp-infer-owner": { + "version": "2.0.0", + "bundled": true, + "requires": { + "chownr": "^2.0.0", + "infer-owner": "^1.0.4", + "mkdirp": "^1.0.3" + } + }, + "ms": { + "version": "2.1.3", + "bundled": true + }, + "mute-stream": { + "version": "0.0.8", + "bundled": true + }, + "node-gyp": { + "version": "7.1.2", + "bundled": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.3", + "nopt": "^5.0.0", + "npmlog": "^4.1.2", + "request": "^2.88.2", + "rimraf": "^3.0.2", + "semver": "^7.3.2", + "tar": "^6.0.2", + "which": "^2.0.2" + } + }, + "nopt": { + "version": "5.0.0", + "bundled": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "3.0.0", + "bundled": true, + "requires": { + "hosted-git-info": "^3.0.6", + "resolve": "^1.17.0", + "semver": "^7.3.2", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-audit-report": { + "version": "2.1.4", + "bundled": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "npm-bundled": { + "version": "1.1.1", + "bundled": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-install-checks": { + "version": "4.0.0", + "bundled": true, + "requires": { + "semver": "^7.1.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true + }, + "npm-package-arg": { + "version": "8.1.1", + "bundled": true, + "requires": { + "hosted-git-info": "^3.0.6", + "semver": "^7.0.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-packlist": { + "version": "2.1.4", + "bundled": true, + "requires": { + "glob": "^7.1.6", + "ignore-walk": "^3.0.3", + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-pick-manifest": { + "version": "6.1.0", + "bundled": true, + "requires": { + "npm-install-checks": "^4.0.0", + "npm-package-arg": "^8.0.0", + "semver": "^7.0.0" + } + }, + "npm-profile": { + "version": "5.0.2", + "bundled": true, + "requires": { + "npm-registry-fetch": "^9.0.0" + } + }, + "npm-registry-fetch": { + "version": "9.0.0", + "bundled": true, + "requires": { + "@npmcli/ci-detect": "^1.0.0", + "lru-cache": "^6.0.0", + "make-fetch-happen": "^8.0.9", + "minipass": "^3.1.3", + "minipass-fetch": "^1.3.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.0.0", + "npm-package-arg": "^8.0.0" + } + }, + "npm-user-validate": { + "version": "1.0.1", + "bundled": true + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.9.0", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.5.2", + "bundled": true + }, + "p-map": { + "version": "4.0.0", + "bundled": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "pacote": { + "version": "11.3.0", + "bundled": true, + "requires": { + "@npmcli/git": "^2.0.1", + "@npmcli/installed-package-contents": "^1.0.6", + "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/run-script": "^1.8.2", + "cacache": "^15.0.5", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "infer-owner": "^1.0.4", + "minipass": "^3.1.3", + "mkdirp": "^1.0.3", + "npm-package-arg": "^8.0.1", + "npm-packlist": "^2.1.4", + "npm-pick-manifest": "^6.0.0", + "npm-registry-fetch": "^9.0.0", + "promise-retry": "^2.0.1", + "read-package-json-fast": "^2.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.1.0" + } + }, + "parse-conflict-json": { + "version": "1.1.1", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^2.3.0", + "just-diff": "^3.0.1", + "just-diff-apply": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "path-parse": { + "version": "1.0.6", + "bundled": true + }, + "performance-now": { + "version": "2.1.0", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true + }, + "promise-all-reject-late": { + "version": "1.0.1", + "bundled": true + }, + "promise-call-limit": { + "version": "1.0.1", + "bundled": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true + }, + "promise-retry": { + "version": "2.0.1", + "bundled": true, + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "requires": { + "read": "1" + } + }, + "psl": { + "version": "1.8.0", + "bundled": true + }, + "puka": { + "version": "1.0.1", + "bundled": true + }, + "punycode": { + "version": "2.1.1", + "bundled": true + }, + "qrcode-terminal": { + "version": "0.12.0", + "bundled": true + }, + "qs": { + "version": "6.5.2", + "bundled": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-cmd-shim": { + "version": "2.0.0", + "bundled": true + }, + "read-package-json": { + "version": "3.0.1", + "bundled": true, + "requires": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^3.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "read-package-json-fast": { + "version": "2.0.2", + "bundled": true, + "requires": { + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdir-scoped-modules": { + "version": "1.1.0", + "bundled": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "request": { + "version": "2.88.2", + "bundled": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "bundled": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "resolve": { + "version": "1.20.0", + "bundled": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "retry": { + "version": "0.12.0", + "bundled": true + }, + "rimraf": { + "version": "3.0.2", + "bundled": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true + }, + "semver": { + "version": "7.3.4", + "bundled": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.3", + "bundled": true + }, + "smart-buffer": { + "version": "4.1.0", + "bundled": true + }, + "socks": { + "version": "2.5.1", + "bundled": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.1.0" + } + }, + "socks-proxy-agent": { + "version": "5.0.0", + "bundled": true, + "requires": { + "agent-base": "6", + "debug": "4", + "socks": "^2.3.3" + } + }, + "spdx-correct": { + "version": "3.1.1", + "bundled": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "bundled": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "bundled": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.7", + "bundled": true + }, + "sshpk": { + "version": "1.16.1", + "bundled": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "8.0.1", + "bundled": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "stringify-package": { + "version": "1.0.1", + "bundled": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "bundled": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar": { + "version": "6.1.0", + "bundled": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true + }, + "tiny-relative-date": { + "version": "1.3.0", + "bundled": true + }, + "treeverse": { + "version": "1.0.4", + "bundled": true + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "bundled": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "unique-filename": { + "version": "1.1.1", + "bundled": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "uri-js": { + "version": "4.4.1", + "bundled": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.4.0", + "bundled": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "bundled": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "walk-up-path": { + "version": "1.0.0", + "bundled": true + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "2.0.2", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "write-file-atomic": { + "version": "3.0.3", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "yallist": { + "version": "4.0.0", + "bundled": true + } + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "optional": true + }, + "nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "requires": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.values": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz", + "integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "has": "^1.0.3" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "dev": true, + "requires": { + "fn.name": "1.x.x" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "open": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", + "integrity": "sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "openapi3-ts": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-1.4.0.tgz", + "integrity": "sha512-8DmE2oKayvSkIR3XSZ4+pRliBsx19bSNeIzkTPswY8r4wvjX86bMxsORdqwAwMxE8PefOcSAT2auvi/0TZe9yA==", + "dev": true + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "ora": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", + "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-spinners": "^2.0.0", + "log-symbols": "^2.2.0", + "strip-ansi": "^5.2.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, + "p-defer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz", + "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pac-proxy-agent": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-4.1.0.tgz", + "integrity": "sha512-ejNgYm2HTXSIYX9eFlkvqFp8hyJ374uDf0Zq5YUAifiSh1D6fo+iBivQZirGvVv8dCYUsLhmLBRhlAYvBKI5+Q==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4", + "get-uri": "3", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "5", + "pac-resolver": "^4.1.0", + "raw-body": "^2.2.0", + "socks-proxy-agent": "5" + } + }, + "pac-resolver": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-4.1.0.tgz", + "integrity": "sha512-d6lf2IrZJJ7ooVHr7BfwSjRO1yKSJMaiiWYSHcrxSIUtZrCa4KKGwcztdkZ/E9LFleJfjoi1yl+XLR7AX24nbQ==", + "dev": true, + "requires": { + "degenerator": "^2.2.0", + "ip": "^1.1.5", + "netmask": "^1.0.6" + } + }, + "package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "^2.0.0" + } + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "pbkdf2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, + "plist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", + "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", + "dev": true, + "requires": { + "base64-js": "^1.2.3", + "xmlbuilder": "^9.0.7", + "xmldom": "0.1.x" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "requires": { + "fromentries": "^1.2.0" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-breaker": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/promise-breaker/-/promise-breaker-5.0.0.tgz", + "integrity": "sha512-mgsWQuG4kJ1dtO6e/QlNDLFtMkMzzecsC69aI5hlLEjGHFNpHrvGhFi4LiK5jg2SMQj74/diH+wZliL9LpGsyA==", + "dev": true + }, + "protobufjs": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", + "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", + "dev": true, + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "13.13.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz", + "integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ==", + "dev": true + } + } + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-4.0.1.tgz", + "integrity": "sha512-ODnQnW2jc/FUVwHHuaZEfN5otg/fMbvMxz9nMSUQfJ9JU7q2SZvSULSsjLloVgJOiv9yhc8GlNMKc4GkFmcVEA==", + "dev": true, + "requires": { + "agent-base": "^6.0.0", + "debug": "4", + "http-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", + "lru-cache": "^5.1.1", + "pac-proxy-agent": "^4.1.0", + "proxy-from-env": "^1.0.0", + "socks-proxy-agent": "^5.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-2.0.1.tgz", + "integrity": "sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==", + "requires": { + "duplexify": "^4.1.1", + "inherits": "^2.0.3", + "pump": "^3.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, + "re2": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/re2/-/re2-1.15.9.tgz", + "integrity": "sha512-AXWEhpMTBdC+3oqbjdU07dk0pBCvxh5vbOMLERL6Y8FYBSGn4vXlLe8cYszn64Yy7H8keVMrgPzoSvOd4mePpg==", + "dev": true, + "optional": true, + "requires": { + "install-artifact-from-github": "^1.2.0", + "nan": "^2.14.2", + "node-gyp": "^7.1.2" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + } + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "dev": true, + "requires": { + "esprima": "~4.0.0" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + } + } + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + }, + "retry-request": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-4.1.3.tgz", + "integrity": "sha512-QnRZUpuPNgX0+D1xVxul6DbJ9slvo4Rm6iV/dn63e048MvGbUZiKySVt6Tenp04JqmchxjiLltGerOJys7kJYQ==", + "requires": { + "debug": "^4.1.1" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "dev": true, + "requires": { + "bn.js": "^4.11.1" + } + }, + "router": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/router/-/router-1.3.5.tgz", + "integrity": "sha512-kozCJZUhuSJ5VcLhSb3F8fsmGXy+8HaDbKCAerR1G6tq3mnMZFMuSohbFvGv1c5oMFipijDjRZuuN/Sq5nMf3g==", + "dev": true, + "requires": { + "array-flatten": "3.0.0", + "debug": "2.6.9", + "methods": "~1.1.2", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "setprototypeof": "1.2.0", + "utils-merge": "1.0.1" + }, + "dependencies": { + "array-flatten": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-3.0.0.tgz", + "integrity": "sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + } + } + }, + "rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "dev": true, + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + } + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "sjcl": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.6.tgz", + "integrity": "sha1-ZBVGKmPMDUIVxJuuydP6DBtTUg8=", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "smart-buffer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", + "dev": true + }, + "snakeize": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/snakeize/-/snakeize-0.1.0.tgz", + "integrity": "sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0=" + }, + "socks": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.5.1.tgz", + "integrity": "sha512-oZCsJJxapULAYJaEYBSzMcz8m3jqgGrHaGhkmU/o/PQfFWYWxkAaA0UMGImb6s6tEXfKi959X6VJjMMQ3P6TTQ==", + "dev": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.1.0" + } + }, + "socks-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz", + "integrity": "sha512-lEpa1zsWCChxiynk+lCycKuC502RxDWLKJZoIhnxrWNjLSDGYRFflHA1/228VkRcnv9TIb8w98derGbpKxJRgA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4", + "socks": "^2.3.3" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "requires": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + } + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "stream-events": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", + "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "requires": { + "stubs": "^3.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" + }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" + }, + "string-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", + "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "stubs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=" + }, + "superagent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-6.1.0.tgz", + "integrity": "sha512-OUDHEssirmplo3F+1HWKUrUjvnQuA+nZI6i/JJBdXb5eq9IyEQwPyPpqND+SSsxf6TygpBEkUjISVRN4/VOpeg==", + "dev": true, + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "dependencies": { + "form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "superagent-auth-bearer": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/superagent-auth-bearer/-/superagent-auth-bearer-0.0.1.tgz", + "integrity": "sha1-wYQrNKf/Sx73mM5I/DcXZ1CYFTc=", + "dev": true + }, + "superstatic": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/superstatic/-/superstatic-7.1.0.tgz", + "integrity": "sha512-yBU8iw07nM3Bu4jFc8lnKwLey0cj61OaGmFJZcYC2X+kEpXVmXzERJ3OTAHZAESe1OTeNIuWadt81U5IULGGAA==", + "dev": true, + "requires": { + "basic-auth-connect": "^1.0.0", + "chalk": "^1.1.3", + "compare-semver": "^1.0.0", + "compression": "^1.7.0", + "connect": "^3.6.2", + "destroy": "^1.0.4", + "fast-url-parser": "^1.1.3", + "fs-extra": "^8.1.0", + "glob-slasher": "^1.0.1", + "home-dir": "^1.0.0", + "is-url": "^1.2.2", + "join-path": "^1.1.1", + "lodash": "^4.17.19", + "mime-types": "^2.1.16", + "minimatch": "^3.0.4", + "morgan": "^1.8.2", + "nash": "^3.0.0", + "on-finished": "^2.2.0", + "on-headers": "^1.0.0", + "path-to-regexp": "^1.8.0", + "re2": "^1.15.8", + "router": "^1.3.1", + "rsvp": "^4.8.5", + "string-length": "^1.0.0", + "update-notifier": "^4.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-hyperlinks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", + "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "dev": true, + "requires": { + "has-flag": "^2.0.0", + "supports-color": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + } + } + }, + "table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz", + "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "bl": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + } + } + }, + "tcp-port-used": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz", + "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==", + "dev": true, + "requires": { + "debug": "4.3.1", + "is2": "^2.0.6" + } + }, + "teeny-request": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.0.1.tgz", + "integrity": "sha512-sasJmQ37klOlplL4Ia/786M5YlOcoLGQyq2TE4WHSRupbAuDaQW0PfVxV4MtdBtRJ4ngzS+1qim8zP6Zp35qCw==", + "requires": { + "http-proxy-agent": "^4.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "stream-events": "^1.0.5", + "uuid": "^8.0.0" + } + }, + "term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", + "integrity": "sha1-OE51MU1J8y3hLuu4E2uOtrXVnak=", + "dev": true, + "requires": { + "readable-stream": "~2.0.0", + "xtend": "~4.0.0" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "toxic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toxic/-/toxic-1.0.1.tgz", + "integrity": "sha512-WI3rIGdcaKULYg7KVoB0zcjikqvcYYvcuT6D89bFPz2rVR0Rl0PK6x8/X62rtdLtBKIE985NzVf/auTtGegIIg==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "dev": true + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", + "dev": true + }, + "tweetsodium": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/tweetsodium/-/tweetsodium-0.0.5.tgz", + "integrity": "sha512-T3aXZtx7KqQbutTtBfn+P5By3HdBuB1eCoGviIrRJV2sXeToxv2X2cv5RvYqgG26PSnN5m3fYixds22Gkfd11w==", + "dev": true, + "requires": { + "blakejs": "^1.1.0", + "tweetnacl": "^1.0.1" + }, + "dependencies": { + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true + } + } + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "requires": { + "crypto-random-string": "^2.0.0" + } + }, + "universal-analytics": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/universal-analytics/-/universal-analytics-0.4.23.tgz", + "integrity": "sha512-lgMIH7XBI6OgYn1woDEmxhGdj8yDefMKg7GkWdeATAlQZFrMrNyxSkpDzY57iY0/6fdlzTbBV03OawvvzG+q7A==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "request": "^2.88.2", + "uuid": "^3.0.0" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unzipper": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", + "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==", + "dev": true, + "requires": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + }, + "dependencies": { + "bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "update-notifier": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "dev": true, + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-join": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-0.0.1.tgz", + "integrity": "sha1-HbSK1CLTQCRpqH99l73r/k+x48g=", + "dev": true + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "v8-compile-cache": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "dev": true + }, + "valid-url": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", + "integrity": "sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, + "winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "dev": true, + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + }, + "dependencies": { + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + } + } + }, + "winston-transport": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "dev": true, + "requires": { + "readable-stream": "^2.3.7", + "triple-beam": "^1.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "workerpool": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", + "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "ws": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, + "xmldom": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", + "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", + "dev": true + }, + "xregexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", + "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + } + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" + }, + "zip-stream": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-2.1.3.tgz", + "integrity": "sha512-EkXc2JGcKhO5N5aZ7TmuNo45budRaFGHOmz24wtJR7znbNqDPmdZtUauKX6et8KAVseAMBOyWJqEpXcHTBsh7Q==", + "dev": true, + "requires": { + "archiver-utils": "^2.1.0", + "compress-commons": "^2.1.1", + "readable-stream": "^3.4.0" + } + } + } +} diff --git a/package.json b/package.json index e6df8b9a..7bc4fc96 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,91 @@ { - "name": "redeemeum-api", + "name": "leptonite-api", + "description": "A demo marketplace powered by Boson Protocol.", + "keywords": [ + "leptonite", + "boson", + "boson protocol", + "reference", + "backend", + "back-end" + ], + "homepage": "https://github.com/bosonprotocol/reference-backend", + "bugs": "https://github.com/bosonprotocol/reference-backend", "version": "1.0.0", "main": "app.js", "scripts": { - "start": "node app.js" + "start": "node app.js", + "start:local:triggers": "node external/lambdas/localTriggers.js", + "start:local:keepers": "cd external/keepers/src && node index.js", + "app:lint": "eslint app.js \"src/**/*.js\"", + "app:lint-fix": "eslint --fix app.js \"src/**/*.js\"", + "app:format": "prettier --list-different app.js \"src/**/*.js\"", + "app:format-fix": "prettier --write app.js \"src/**/*.js\"", + "tests:app:lint": "eslint \"test/**/*.js\"", + "tests:app:lint-fix": "eslint --fix \"test/**/*.js\"", + "tests:app:format": "prettier --list-different \"test/**/*.js\"", + "tests:app:format-fix": "prettier --write \"test/**/*.js\"", + "tests:app:unit": "mocha --reporter spec \"test/unit/**/*.test.js\"", + "tests:app:integration": "mocha --reporter spec \"test/integration/**/*.test.js\"", + "tests:app:persistence": "mocha --reporter spec \"test/persistence/**/*.test.js\"", + "tests:app:component": "mocha --reporter spec \"test/component/**/*.test.js\"", + "tests:app:unit:coverage": "nyc --all --no-clean --silent npm run tests:app:unit", + "tests:app:persistence:coverage": "nyc --all --no-clean --silent npm run tests:app:persistence", + "tests:app:component:coverage": "nyc --all --no-clean --silent npm run tests:app:component", + "tests:coverage:badge": "nyc report --reporter=json-summary --reporter=lcov && coverage-badge-creator" + }, + "contributors": [ + "HristiyanG", + "George Spasov", + "Vladislav Ivanov", + "Aneta", + "Richard Littauer (https://burntfen.com)", + "thecryptofruit" + ], + "license": "LGPL-3.0-only", + "repository": { + "type": "git", + "url": "https://github.com/bosonprotocol/reference-backend.git" }, - "license": "ISC", "dependencies": { "@google-cloud/storage": "^5.1.1", + "aws-sdk": "^2.907.0", "axios": "^0.19.0", "body-parser": "^1.19.0", "cors": "^2.8.5", "dotenv": "^8.2.0", - "ethers": "^5.0.4", + "eslint-plugin-import": "^2.22.1", + "ethers": "^5.0.24", "express": "^4.17.1", + "express-basic-auth": "^1.2.0", + "form-data": "^4.0.0", + "install": "^0.13.0", "jsonwebtoken": "^8.5.1", + "mock-express-request": "^0.2.2", "mongodb": "^3.5.8", "mongoose": "^5.9.19", - "multer": "^1.4.2" + "mongoose-update-if-current": "^1.4.0", + "multer": "^1.4.2", + "multer-s3": "^2.9.0", + "npm": "^7.6.3", + "uuid": "^8.3.2" + }, + "devDependencies": { + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "coverage-badge-creator": "^1.0.4", + "eslint": "^7.18.0", + "eslint-config-prettier": "^7.2.0", + "eth-sig-util": "^3.0.1", + "faker": "^5.3.1", + "firebase-tools": "^9.2.2", + "freeport": "^1.0.5", + "keccak256": "^1.0.2", + "keythereum": "^1.2.0", + "mocha": "^8.2.1", + "nyc": "^15.1.0", + "prettier": "^2.2.1", + "superagent": "^6.1.0", + "superagent-auth-bearer": "0.0.1" } } diff --git a/pipelines/builder/handle-pr-event/task.sh b/pipelines/builder/handle-pr-event/task.sh new file mode 100755 index 00000000..6e561a3f --- /dev/null +++ b/pipelines/builder/handle-pr-event/task.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +./go "ci:pipeline:pr:handle[${CI_DEPLOYMENT_TYPE},${CI_DEPLOYMENT_LABEL}]" diff --git a/pipelines/builder/handle-pr-event/task.yaml b/pipelines/builder/handle-pr-event/task.yaml new file mode 100644 index 00000000..405879ee --- /dev/null +++ b/pipelines/builder/handle-pr-event/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/builder/handle-pr-event/task.sh diff --git a/pipelines/builder/pipeline.yaml b/pipelines/builder/pipeline.yaml new file mode 100644 index 00000000..99fca14a --- /dev/null +++ b/pipelines/builder/pipeline.yaml @@ -0,0 +1,39 @@ +resource_types: + - name: pull-request + type: docker-image + source: + repository: teliaoss/github-pr-resource + +resources: + - name: source + type: pull-request + check_every: 1h + webhook_token: ((webhook_token)) + source: + repository: ((source_repository_name)) + access_token: ((github_access_token)) + states: + - OPEN + - MERGED + - CLOSED + + - name: node-builder-image + type: docker-image + source: + repository: ((node_builder_image_repository_url)) + +jobs: + - name: handle-pr-event + plan: + - in_parallel: + - get: source + trigger: true + version: every + - get: node-builder-image + - task: handle-pr-event + image: node-builder-image + file: source/pipelines/builder/handle-pr-event/task.yaml + params: + GPG_KEY: ((gpg_key)) + CI_DEPLOYMENT_TYPE: ((ci_deployment_type)) + CI_DEPLOYMENT_LABEL: ((ci_deployment_label)) diff --git a/pipelines/demo/pipeline.yaml b/pipelines/demo/pipeline.yaml new file mode 100644 index 00000000..8ba5d945 --- /dev/null +++ b/pipelines/demo/pipeline.yaml @@ -0,0 +1,372 @@ +resource_types: + - name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + tag: latest + +resources: + - name: source + type: git + source: + uri: ((source_repository_url)) + branch: demo + private_key: ((git_ssh_key)) + + - name: updated-source + type: git + source: + uri: ((source_repository_url)) + branch: demo + private_key: ((git_ssh_key)) + + - name: app-image + type: docker-image + source: + repository: ((app_image_repository_url)) + aws_access_key_id: ((aws_access_key_id)) + aws_secret_access_key: ((aws_secret_access_key)) + + - name: keepers-image + type: docker-image + source: + repository: ((keepers_image_repository_url)) + aws_access_key_id: ((aws_access_key_id)) + aws_secret_access_key: ((aws_secret_access_key)) + + - name: node-builder-image + type: docker-image + source: + repository: ((node_builder_image_repository_url)) + + - name: version + type: semver + source: + driver: s3 + initial_version: 0.1.0 + bucket: ((storage_bucket_name)) + key: reference-backend/metadata/demo/version + region_name: ((storage_bucket_region)) + server_side_encryption: ((storage_bucket_encryption)) + access_key_id: ((aws_access_key_id)) + secret_access_key: ((aws_secret_access_key)) + + - name: notify-success + type: slack-notification + source: + url: ((slack_builds_webhook_url)) + + - name: notify-failure + type: slack-notification + source: + url: ((slack_engineering_webhook_url)) + +groups: + - name: ci + jobs: + - build + - test + - provision-keepers-image-repository + - provision-image-repository + - publish-image + - publish-image-keepers + - name: demo-mendelevium + jobs: + - provision-demo-mendelevium-database + - provision-demo-mendelevium-image-storage-bucket + - provision-demo-mendelevium-service + - provision-demo-mendelevium-keepers-service + - provision-demo-mendelevium-functions + +jobs: + - name: build + serial: true + plan: + - in_parallel: + - get: source + trigger: true + - get: node-builder-image + - task: build + image: node-builder-image + file: source/pipelines/shared/build/task.yaml + + on_success: &on_success + put: notify-success + params: + text: ((slack_success_message)) + channel: ((slack_success_channel)) + + on_failure: &on_failure + put: notify-failure + params: + text: ((slack_failure_message)) + channel: ((slack_failure_channel)) + + on_error: &on_error + put: notify-failure + params: + text: ((slack_error_message)) + channel: ((slack_error_channel)) + + on_abort: &on_abort + put: notify-failure + params: + text: ((slack_abort_message)) + channel: ((slack_abort_channel)) + + - name: test + plan: + - in_parallel: + - get: source + trigger: true + passed: + - build + - get: updated-source + - get: node-builder-image + - task: test + image: node-builder-image + file: source/pipelines/shared/coverage/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: updated-source + params: + repository: source + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-keepers-image-repository + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - test + - get: node-builder-image + - task: provision-keepers-image-repository + image: node-builder-image + file: source/pipelines/demo/provision-keepers-image-repository/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-image-repository + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - test + - get: node-builder-image + - task: provision-image-repository + image: node-builder-image + file: source/pipelines/demo/provision-image-repository/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: publish-image + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-keepers-image-repository + - provision-image-repository + - put: version + params: + pre: rc + - get: node-builder-image + - task: publish-image + image: node-builder-image + file: source/pipelines/demo/publish-image/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: app-image + params: + build: image-build-directory + cache: true + cache_tag: latest + tag: image-build-directory/TAG + tag_as_latest: true + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: publish-image-keepers + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-keepers-image-repository + - provision-image-repository + - publish-image + - get: version + - get: node-builder-image + - task: publish-image-keepers + image: node-builder-image + file: source/pipelines/demo/publish-image-keepers/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: keepers-image + params: + build: image-build-directory + cache: true + cache_tag: latest + tag: image-build-directory/TAG + tag_as_latest: true + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-demo-mendelevium-database + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - publish-image + - publish-image-keepers + - get: node-builder-image + - task: provision-database + image: node-builder-image + file: source/pipelines/demo/provision-database/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((demo_mendelevium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((demo_mendelevium_deployment_type)) + DEPLOYMENT_LABEL: ((demo_mendelevium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-demo-mendelevium-image-storage-bucket + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-demo-mendelevium-database + - get: version + - get: node-builder-image + - task: provision-image-storage-bucket + image: node-builder-image + file: source/pipelines/demo/provision-image-storage-bucket/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((demo_mendelevium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((demo_mendelevium_deployment_type)) + DEPLOYMENT_LABEL: ((demo_mendelevium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-demo-mendelevium-service + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-demo-mendelevium-image-storage-bucket + - get: version + - get: node-builder-image + - task: provision-service + image: node-builder-image + file: source/pipelines/demo/provision-service/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((demo_mendelevium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((demo_mendelevium_deployment_type)) + DEPLOYMENT_LABEL: ((demo_mendelevium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-demo-mendelevium-keepers-service + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-demo-mendelevium-service + - get: version + - get: node-builder-image + - task: provision-keepers-service + image: node-builder-image + file: source/pipelines/demo/provision-keepers-service/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((demo_mendelevium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((demo_mendelevium_deployment_type)) + DEPLOYMENT_LABEL: ((demo_mendelevium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-demo-mendelevium-functions + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-demo-mendelevium-keepers-service + - get: version + - get: node-builder-image + - task: provision-functions + image: node-builder-image + file: source/pipelines/demo/provision-functions/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((demo_mendelevium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((demo_mendelevium_deployment_type)) + DEPLOYMENT_LABEL: ((demo_mendelevium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort diff --git a/pipelines/demo/provision-database/task.sh b/pipelines/demo/provision-database/task.sh new file mode 100755 index 00000000..a50db957 --- /dev/null +++ b/pipelines/demo/provision-database/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "database:environment:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-database/task.yaml b/pipelines/demo/provision-database/task.yaml new file mode 100644 index 00000000..a78e5f14 --- /dev/null +++ b/pipelines/demo/provision-database/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/demo/provision-database/task.sh diff --git a/pipelines/demo/provision-functions/task.sh b/pipelines/demo/provision-functions/task.sh new file mode 100755 index 00000000..5c5b1e55 --- /dev/null +++ b/pipelines/demo/provision-functions/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "lambda:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-functions/task.yaml b/pipelines/demo/provision-functions/task.yaml new file mode 100644 index 00000000..20dbe129 --- /dev/null +++ b/pipelines/demo/provision-functions/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/demo/provision-functions/task.sh diff --git a/pipelines/demo/provision-image-repository/task.sh b/pipelines/demo/provision-image-repository/task.sh new file mode 100755 index 00000000..b1be7856 --- /dev/null +++ b/pipelines/demo/provision-image-repository/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "image_repository:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-image-repository/task.yaml b/pipelines/demo/provision-image-repository/task.yaml new file mode 100644 index 00000000..5988fa7c --- /dev/null +++ b/pipelines/demo/provision-image-repository/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/demo/provision-image-repository/task.sh diff --git a/pipelines/demo/provision-image-storage-bucket/task.sh b/pipelines/demo/provision-image-storage-bucket/task.sh new file mode 100755 index 00000000..7efb2732 --- /dev/null +++ b/pipelines/demo/provision-image-storage-bucket/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "image_storage_bucket:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-image-storage-bucket/task.yaml b/pipelines/demo/provision-image-storage-bucket/task.yaml new file mode 100644 index 00000000..94702c62 --- /dev/null +++ b/pipelines/demo/provision-image-storage-bucket/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/demo/provision-image-storage-bucket/task.sh diff --git a/pipelines/demo/provision-keepers-image-repository/task.sh b/pipelines/demo/provision-keepers-image-repository/task.sh new file mode 100755 index 00000000..7062624b --- /dev/null +++ b/pipelines/demo/provision-keepers-image-repository/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "keepers_image_repository:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-keepers-image-repository/task.yaml b/pipelines/demo/provision-keepers-image-repository/task.yaml new file mode 100644 index 00000000..7a04596f --- /dev/null +++ b/pipelines/demo/provision-keepers-image-repository/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/demo/provision-keepers-image-repository/task.sh diff --git a/pipelines/demo/provision-keepers-service/task.sh b/pipelines/demo/provision-keepers-service/task.sh new file mode 100755 index 00000000..275312a8 --- /dev/null +++ b/pipelines/demo/provision-keepers-service/task.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export GIT_SHA="$(git rev-parse --short HEAD)" + +mkdir -p "$PROJECT_DIR/build" +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "service_keepers:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-keepers-service/task.yaml b/pipelines/demo/provision-keepers-service/task.yaml new file mode 100644 index 00000000..218c18e0 --- /dev/null +++ b/pipelines/demo/provision-keepers-service/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/demo/provision-keepers-service/task.sh diff --git a/pipelines/demo/provision-service/task.sh b/pipelines/demo/provision-service/task.sh new file mode 100755 index 00000000..c28428c4 --- /dev/null +++ b/pipelines/demo/provision-service/task.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export GIT_SHA="$(git rev-parse --short HEAD)" + +mkdir -p "$PROJECT_DIR/build" +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "service:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/demo/provision-service/task.yaml b/pipelines/demo/provision-service/task.yaml new file mode 100644 index 00000000..a75db42d --- /dev/null +++ b/pipelines/demo/provision-service/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/demo/provision-service/task.sh diff --git a/pipelines/demo/publish-image-keepers/task.sh b/pipelines/demo/publish-image-keepers/task.sh new file mode 100755 index 00000000..d0ec6c8d --- /dev/null +++ b/pipelines/demo/publish-image-keepers/task.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +export GIT_SHA="$(git rev-parse --short HEAD)" + +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "image_keepers:prepare[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" + +cp -R "build/images/keepers"/* "$ROOT_DIR/image-build-directory/" diff --git a/pipelines/demo/publish-image-keepers/task.yaml b/pipelines/demo/publish-image-keepers/task.yaml new file mode 100644 index 00000000..6230325e --- /dev/null +++ b/pipelines/demo/publish-image-keepers/task.yaml @@ -0,0 +1,11 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +outputs: + - name: image-build-directory +run: + dir: /source + path: ./pipelines/demo/publish-image-keepers/task.sh diff --git a/pipelines/demo/publish-image/task.sh b/pipelines/demo/publish-image/task.sh new file mode 100755 index 00000000..d4b246d7 --- /dev/null +++ b/pipelines/demo/publish-image/task.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +export GIT_SHA="$(git rev-parse --short HEAD)" + +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "image:prepare[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" + +cp -R "build/images/reference-backend"/* "$ROOT_DIR/image-build-directory/" diff --git a/pipelines/demo/publish-image/task.yaml b/pipelines/demo/publish-image/task.yaml new file mode 100644 index 00000000..7eb822cc --- /dev/null +++ b/pipelines/demo/publish-image/task.yaml @@ -0,0 +1,11 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +outputs: + - name: image-build-directory +run: + dir: /source + path: ./pipelines/demo/publish-image/task.sh diff --git a/pipelines/develop/pipeline.yaml b/pipelines/develop/pipeline.yaml new file mode 100644 index 00000000..be17bdf6 --- /dev/null +++ b/pipelines/develop/pipeline.yaml @@ -0,0 +1,372 @@ +resource_types: + - name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + tag: latest + +resources: + - name: source + type: git + source: + uri: ((source_repository_url)) + branch: ((source_repository_branch)) + private_key: ((git_ssh_key)) + + - name: updated-source + type: git + source: + uri: ((source_repository_url)) + branch: ((source_repository_branch)) + private_key: ((git_ssh_key)) + + - name: app-image + type: docker-image + source: + repository: ((app_image_repository_url)) + aws_access_key_id: ((aws_access_key_id)) + aws_secret_access_key: ((aws_secret_access_key)) + + - name: keepers-image + type: docker-image + source: + repository: ((keepers_image_repository_url)) + aws_access_key_id: ((aws_access_key_id)) + aws_secret_access_key: ((aws_secret_access_key)) + + - name: node-builder-image + type: docker-image + source: + repository: ((node_builder_image_repository_url)) + + - name: version + type: semver + source: + driver: s3 + initial_version: 0.1.0 + bucket: ((storage_bucket_name)) + key: reference-backend/metadata/develop/version + region_name: ((storage_bucket_region)) + server_side_encryption: ((storage_bucket_encryption)) + access_key_id: ((aws_access_key_id)) + secret_access_key: ((aws_secret_access_key)) + + - name: notify-success + type: slack-notification + source: + url: ((slack_builds_webhook_url)) + + - name: notify-failure + type: slack-notification + source: + url: ((slack_engineering_webhook_url)) + +groups: + - name: ci + jobs: + - build + - test + - provision-keepers-image-repository + - provision-image-repository + - publish-image + - publish-image-keepers + - name: development-plutonium + jobs: + - provision-development-plutonium-database + - provision-development-plutonium-image-storage-bucket + - provision-development-plutonium-service + - provision-development-plutonium-keepers-service + - provision-development-plutonium-functions + +jobs: + - name: build + serial: true + plan: + - in_parallel: + - get: source + trigger: true + - get: node-builder-image + - task: build + image: node-builder-image + file: source/pipelines/shared/build/task.yaml + + on_success: &on_success + put: notify-success + params: + text: ((slack_success_message)) + channel: ((slack_success_channel)) + + on_failure: &on_failure + put: notify-failure + params: + text: ((slack_failure_message)) + channel: ((slack_failure_channel)) + + on_error: &on_error + put: notify-failure + params: + text: ((slack_error_message)) + channel: ((slack_error_channel)) + + on_abort: &on_abort + put: notify-failure + params: + text: ((slack_abort_message)) + channel: ((slack_abort_channel)) + + - name: test + plan: + - in_parallel: + - get: source + trigger: true + passed: + - build + - get: updated-source + - get: node-builder-image + - task: test + image: node-builder-image + file: source/pipelines/shared/coverage/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: updated-source + params: + repository: source + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-keepers-image-repository + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - test + - get: node-builder-image + - task: provision-keepers-image-repository + image: node-builder-image + file: source/pipelines/develop/provision-keepers-image-repository/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-image-repository + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - test + - get: node-builder-image + - task: provision-image-repository + image: node-builder-image + file: source/pipelines/develop/provision-image-repository/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: publish-image + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-keepers-image-repository + - provision-image-repository + - put: version + params: + pre: rc + - get: node-builder-image + - task: publish-image + image: node-builder-image + file: source/pipelines/develop/publish-image/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: app-image + params: + build: image-build-directory + cache: true + cache_tag: latest + tag: image-build-directory/TAG + tag_as_latest: true + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: publish-image-keepers + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-keepers-image-repository + - provision-image-repository + - publish-image + - get: version + - get: node-builder-image + - task: publish-image-keepers + image: node-builder-image + file: source/pipelines/develop/publish-image-keepers/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: keepers-image + params: + build: image-build-directory + cache: true + cache_tag: latest + tag: image-build-directory/TAG + tag_as_latest: true + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-development-plutonium-database + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - publish-image + - publish-image-keepers + - get: node-builder-image + - task: provision-database + image: node-builder-image + file: source/pipelines/develop/provision-database/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((development_plutonium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((development_plutonium_deployment_type)) + DEPLOYMENT_LABEL: ((development_plutonium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-development-plutonium-image-storage-bucket + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-development-plutonium-database + - get: version + - get: node-builder-image + - task: provision-image-storage-bucket + image: node-builder-image + file: source/pipelines/develop/provision-image-storage-bucket/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((development_plutonium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((development_plutonium_deployment_type)) + DEPLOYMENT_LABEL: ((development_plutonium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-development-plutonium-service + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-development-plutonium-image-storage-bucket + - get: version + - get: node-builder-image + - task: provision-service + image: node-builder-image + file: source/pipelines/develop/provision-service/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((development_plutonium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((development_plutonium_deployment_type)) + DEPLOYMENT_LABEL: ((development_plutonium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-development-plutonium-keepers-service + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-development-plutonium-service + - get: version + - get: node-builder-image + - task: provision-keepers-service + image: node-builder-image + file: source/pipelines/develop/provision-keepers-service/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((development_plutonium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((development_plutonium_deployment_type)) + DEPLOYMENT_LABEL: ((development_plutonium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-development-plutonium-functions + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-development-plutonium-keepers-service + - get: version + - get: node-builder-image + - task: provision-functions + image: node-builder-image + file: source/pipelines/develop/provision-functions/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((development_plutonium_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((development_plutonium_deployment_type)) + DEPLOYMENT_LABEL: ((development_plutonium_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort diff --git a/pipelines/develop/provision-database/task.sh b/pipelines/develop/provision-database/task.sh new file mode 100755 index 00000000..a50db957 --- /dev/null +++ b/pipelines/develop/provision-database/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "database:environment:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-database/task.yaml b/pipelines/develop/provision-database/task.yaml new file mode 100644 index 00000000..f814aa1c --- /dev/null +++ b/pipelines/develop/provision-database/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/develop/provision-database/task.sh diff --git a/pipelines/develop/provision-functions/task.sh b/pipelines/develop/provision-functions/task.sh new file mode 100755 index 00000000..5c5b1e55 --- /dev/null +++ b/pipelines/develop/provision-functions/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "lambda:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-functions/task.yaml b/pipelines/develop/provision-functions/task.yaml new file mode 100644 index 00000000..ee2f7fbe --- /dev/null +++ b/pipelines/develop/provision-functions/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/develop/provision-functions/task.sh diff --git a/pipelines/develop/provision-image-repository/task.sh b/pipelines/develop/provision-image-repository/task.sh new file mode 100755 index 00000000..b1be7856 --- /dev/null +++ b/pipelines/develop/provision-image-repository/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "image_repository:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-image-repository/task.yaml b/pipelines/develop/provision-image-repository/task.yaml new file mode 100644 index 00000000..c372b33b --- /dev/null +++ b/pipelines/develop/provision-image-repository/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/develop/provision-image-repository/task.sh diff --git a/pipelines/develop/provision-image-storage-bucket/task.sh b/pipelines/develop/provision-image-storage-bucket/task.sh new file mode 100755 index 00000000..7efb2732 --- /dev/null +++ b/pipelines/develop/provision-image-storage-bucket/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "image_storage_bucket:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-image-storage-bucket/task.yaml b/pipelines/develop/provision-image-storage-bucket/task.yaml new file mode 100644 index 00000000..57a7feea --- /dev/null +++ b/pipelines/develop/provision-image-storage-bucket/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/develop/provision-image-storage-bucket/task.sh diff --git a/pipelines/develop/provision-keepers-image-repository/task.sh b/pipelines/develop/provision-keepers-image-repository/task.sh new file mode 100755 index 00000000..7062624b --- /dev/null +++ b/pipelines/develop/provision-keepers-image-repository/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "keepers_image_repository:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-keepers-image-repository/task.yaml b/pipelines/develop/provision-keepers-image-repository/task.yaml new file mode 100644 index 00000000..7f9321c3 --- /dev/null +++ b/pipelines/develop/provision-keepers-image-repository/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/develop/provision-keepers-image-repository/task.sh diff --git a/pipelines/develop/provision-keepers-service/task.sh b/pipelines/develop/provision-keepers-service/task.sh new file mode 100755 index 00000000..275312a8 --- /dev/null +++ b/pipelines/develop/provision-keepers-service/task.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export GIT_SHA="$(git rev-parse --short HEAD)" + +mkdir -p "$PROJECT_DIR/build" +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "service_keepers:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-keepers-service/task.yaml b/pipelines/develop/provision-keepers-service/task.yaml new file mode 100644 index 00000000..aabda087 --- /dev/null +++ b/pipelines/develop/provision-keepers-service/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/develop/provision-keepers-service/task.sh diff --git a/pipelines/develop/provision-service/task.sh b/pipelines/develop/provision-service/task.sh new file mode 100755 index 00000000..c28428c4 --- /dev/null +++ b/pipelines/develop/provision-service/task.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export GIT_SHA="$(git rev-parse --short HEAD)" + +mkdir -p "$PROJECT_DIR/build" +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "service:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/develop/provision-service/task.yaml b/pipelines/develop/provision-service/task.yaml new file mode 100644 index 00000000..b7524e43 --- /dev/null +++ b/pipelines/develop/provision-service/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/develop/provision-service/task.sh diff --git a/pipelines/develop/publish-image-keepers/task.sh b/pipelines/develop/publish-image-keepers/task.sh new file mode 100755 index 00000000..d0ec6c8d --- /dev/null +++ b/pipelines/develop/publish-image-keepers/task.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +export GIT_SHA="$(git rev-parse --short HEAD)" + +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "image_keepers:prepare[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" + +cp -R "build/images/keepers"/* "$ROOT_DIR/image-build-directory/" diff --git a/pipelines/develop/publish-image-keepers/task.yaml b/pipelines/develop/publish-image-keepers/task.yaml new file mode 100644 index 00000000..10737029 --- /dev/null +++ b/pipelines/develop/publish-image-keepers/task.yaml @@ -0,0 +1,11 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +outputs: + - name: image-build-directory +run: + dir: /source + path: ./pipelines/develop/publish-image-keepers/task.sh diff --git a/pipelines/develop/publish-image/task.sh b/pipelines/develop/publish-image/task.sh new file mode 100755 index 00000000..d4b246d7 --- /dev/null +++ b/pipelines/develop/publish-image/task.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +export GIT_SHA="$(git rev-parse --short HEAD)" + +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "image:prepare[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" + +cp -R "build/images/reference-backend"/* "$ROOT_DIR/image-build-directory/" diff --git a/pipelines/develop/publish-image/task.yaml b/pipelines/develop/publish-image/task.yaml new file mode 100644 index 00000000..4b7d876d --- /dev/null +++ b/pipelines/develop/publish-image/task.yaml @@ -0,0 +1,11 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +outputs: + - name: image-build-directory +run: + dir: /source + path: ./pipelines/develop/publish-image/task.sh diff --git a/pipelines/pr/pipeline.yaml b/pipelines/pr/pipeline.yaml new file mode 100644 index 00000000..e8ebe46f --- /dev/null +++ b/pipelines/pr/pipeline.yaml @@ -0,0 +1,172 @@ +resource_types: + - name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + tag: latest + + - name: github-status + type: docker-image + source: + repository: resource/github-status + +resources: + - name: source + type: git + source: + uri: ((source_repository_url)) + branch: ((source_repository_branch)) + private_key: ((git_ssh_key)) + + - name: status + type: github-status + source: + repo: ((source_repository_name)) + access_token: ((github_access_token)) + + - name: node-builder-image + type: docker-image + source: + repository: ((node_builder_image_repository_url)) + + - name: notify-success + type: slack-notification + source: + url: ((slack_builds_webhook_url)) + + - name: notify-failure + type: slack-notification + source: + url: ((slack_engineering_webhook_url)) + +jobs: + - name: build + serial: true + plan: + - in_parallel: + - get: source + trigger: true + - get: node-builder-image + - put: status + params: + path: source + state: pending + context: "CI Pipeline" + description: "Running build..." + - task: build + image: node-builder-image + file: source/pipelines/shared/build/task.yaml + + on_success: + put: notify-success + params: + text: ((slack_success_message)) + channel: ((slack_success_channel)) + + on_failure: + do: + - put: status + params: + path: source + state: failure + context: "CI Pipeline" + description: "Build failed." + - put: notify-failure + params: + text: ((slack_failure_message)) + channel: ((slack_failure_channel)) + + on_error: + do: + - put: status + params: + path: source + state: failure + context: "CI Pipeline" + description: "Build errored." + - put: notify-failure + params: + text: ((slack_error_message)) + channel: ((slack_error_channel)) + + on_abort: + do: + - put: status + params: + path: source + state: failure + context: "CI Pipeline" + description: "Build aborted." + - put: notify-failure + params: + text: ((slack_abort_message)) + channel: ((slack_abort_channel)) + + - name: test + plan: + - in_parallel: + - get: source + trigger: true + passed: + - build + - get: node-builder-image + - task: test + image: node-builder-image + file: source/pipelines/shared/test/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: + do: + - put: status + params: + path: source + state: success + context: "CI Pipeline" + description: "Pipeline succeeded." + - put: notify-success + params: + text: ((slack_success_message)) + channel: ((slack_success_channel)) + + on_failure: + do: + - put: status + params: + path: source + state: failure + context: "CI Pipeline" + description: "Test failed." + - put: notify-failure + params: + text: ((slack_failure_message)) + channel: ((slack_failure_channel)) + + on_error: + do: + - put: status + params: + path: source + state: failure + context: "CI Pipeline" + description: "Test errored." + - put: notify-failure + params: + text: ((slack_error_message)) + channel: ((slack_error_channel)) + + on_abort: + do: + - put: status + params: + path: source + state: failure + context: "CI Pipeline" + description: "Test aborted." + - put: notify-failure + params: + text: ((slack_abort_message)) + channel: ((slack_abort_channel)) diff --git a/pipelines/shared/build/task.sh b/pipelines/shared/build/task.sh new file mode 100755 index 00000000..31589dde --- /dev/null +++ b/pipelines/shared/build/task.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +./go build diff --git a/pipelines/shared/build/task.yaml b/pipelines/shared/build/task.yaml new file mode 100644 index 00000000..fc3f0096 --- /dev/null +++ b/pipelines/shared/build/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + +run: + dir: /source + path: ./pipelines/shared/build/task.sh diff --git a/pipelines/shared/coverage/task.sh b/pipelines/shared/coverage/task.sh new file mode 100755 index 00000000..530bfde6 --- /dev/null +++ b/pipelines/shared/coverage/task.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "${PROVISIONING_ROLE_ARN}" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export INCLUDE_COVERAGE="true" + +./go "test[${DEPLOYMENT_TYPE},${DEPLOYMENT_LABEL}]" +./go "tests:app:coverage:badge" + +git config --global user.email "ci@redeemeum.com" +git config --global user.name "Redeemeum CI" +git add . +git diff --staged --quiet || git commit -m "Update coverage badge [ci skip]" diff --git a/pipelines/shared/coverage/task.yaml b/pipelines/shared/coverage/task.yaml new file mode 100644 index 00000000..984bfab8 --- /dev/null +++ b/pipelines/shared/coverage/task.yaml @@ -0,0 +1,12 @@ +--- +platform: linux + +inputs: + - name: source + +outputs: + - name: source + +run: + dir: /source + path: ./pipelines/shared/coverage/task.sh diff --git a/pipelines/shared/test/task.sh b/pipelines/shared/test/task.sh new file mode 100755 index 00000000..730af29f --- /dev/null +++ b/pipelines/shared/test/task.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "${PROVISIONING_ROLE_ARN}" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +./go "test[${DEPLOYMENT_TYPE},${DEPLOYMENT_LABEL}]" diff --git a/pipelines/shared/test/task.yaml b/pipelines/shared/test/task.yaml new file mode 100644 index 00000000..10068508 --- /dev/null +++ b/pipelines/shared/test/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + +run: + dir: /source + path: ./pipelines/shared/test/task.sh diff --git a/pipelines/tag/pipeline.yaml b/pipelines/tag/pipeline.yaml new file mode 100644 index 00000000..6a7ade41 --- /dev/null +++ b/pipelines/tag/pipeline.yaml @@ -0,0 +1,377 @@ +resource_types: + - name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + tag: latest + + - name: git-tag + type: docker-image + source: + repository: sarquella/concourse-git-tag-resource + +resources: + - name: source + type: git-tag + source: + uri: ((source_repository_url)) + tag_filter: v* + private_key: ((git_ssh_key)) + + - name: updated-source + type: git-tag + source: + uri: ((source_repository_url)) + tag_filter: v* + private_key: ((git_ssh_key)) + + - name: app-image + type: docker-image + source: + repository: ((app_image_repository_url)) + aws_access_key_id: ((aws_access_key_id)) + aws_secret_access_key: ((aws_secret_access_key)) + + - name: keepers-image + type: docker-image + source: + repository: ((keepers_image_repository_url)) + aws_access_key_id: ((aws_access_key_id)) + aws_secret_access_key: ((aws_secret_access_key)) + + - name: node-builder-image + type: docker-image + source: + repository: ((node_builder_image_repository_url)) + + - name: version + type: semver + source: + driver: s3 + initial_version: 0.1.0 + bucket: ((storage_bucket_name)) + key: reference-backend/metadata/tag/version + region_name: ((storage_bucket_region)) + server_side_encryption: ((storage_bucket_encryption)) + access_key_id: ((aws_access_key_id)) + secret_access_key: ((aws_secret_access_key)) + + - name: notify-success + type: slack-notification + source: + url: ((slack_builds_webhook_url)) + + - name: notify-failure + type: slack-notification + source: + url: ((slack_engineering_webhook_url)) + +groups: + - name: ci + jobs: + - build + - test + - provision-keepers-image-repository + - provision-image-repository + - publish-image + - publish-image-keepers + - name: production-oganesson + jobs: + - provision-production-oganesson-database + - provision-production-oganesson-image-storage-bucket + - provision-production-oganesson-service + - provision-production-oganesson-keepers-service + - provision-production-oganesson-functions + +jobs: + - name: build + serial: true + plan: + - in_parallel: + - get: source + trigger: true + - get: node-builder-image + - task: build + image: node-builder-image + file: source/pipelines/shared/build/task.yaml + + on_success: &on_success + put: notify-success + params: + text: ((slack_success_message)) + channel: ((slack_success_channel)) + + on_failure: &on_failure + put: notify-failure + params: + text: ((slack_failure_message)) + channel: ((slack_failure_channel)) + + on_error: &on_error + put: notify-failure + params: + text: ((slack_error_message)) + channel: ((slack_error_channel)) + + on_abort: &on_abort + put: notify-failure + params: + text: ((slack_abort_message)) + channel: ((slack_abort_channel)) + + - name: test + plan: + - in_parallel: + - get: source + trigger: true + passed: + - build + - get: updated-source + - get: node-builder-image + - task: test + image: node-builder-image + file: source/pipelines/shared/coverage/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: updated-source + params: + repository: source + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-keepers-image-repository + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - test + - get: node-builder-image + - task: provision-keepers-image-repository + image: node-builder-image + file: source/pipelines/tag/provision-keepers-image-repository/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-image-repository + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - test + - get: node-builder-image + - task: provision-image-repository + image: node-builder-image + file: source/pipelines/tag/provision-image-repository/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: publish-image + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-keepers-image-repository + - provision-image-repository + - put: version + params: + pre: rc + - get: node-builder-image + - task: publish-image + image: node-builder-image + file: source/pipelines/tag/publish-image/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: app-image + params: + build: image-build-directory + cache: true + cache_tag: latest + tag: image-build-directory/TAG + tag_as_latest: true + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: publish-image-keepers + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-keepers-image-repository + - provision-image-repository + - publish-image + - get: version + - get: node-builder-image + - task: publish-image-keepers + image: node-builder-image + file: source/pipelines/tag/publish-image-keepers/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((ci_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((ci_deployment_type)) + DEPLOYMENT_LABEL: ((ci_deployment_label)) + - put: keepers-image + params: + build: image-build-directory + cache: true + cache_tag: latest + tag: image-build-directory/TAG + tag_as_latest: true + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-production-oganesson-database + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - publish-image + - publish-image-keepers + - get: node-builder-image + - task: provision-database + image: node-builder-image + file: source/pipelines/tag/provision-database/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((production_oganesson_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((production_oganesson_deployment_type)) + DEPLOYMENT_LABEL: ((production_oganesson_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-production-oganesson-image-storage-bucket + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-production-oganesson-database + - get: version + - get: node-builder-image + - task: provision-image-storage-bucket + image: node-builder-image + file: source/pipelines/tag/provision-image-storage-bucket/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((production_oganesson_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((production_oganesson_deployment_type)) + DEPLOYMENT_LABEL: ((production_oganesson_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-production-oganesson-service + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-production-oganesson-image-storage-bucket + - get: version + - get: node-builder-image + - task: provision-service + image: node-builder-image + file: source/pipelines/tag/provision-service/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((production_oganesson_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((production_oganesson_deployment_type)) + DEPLOYMENT_LABEL: ((production_oganesson_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-production-oganesson-keepers-service + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-production-oganesson-service + - get: version + - get: node-builder-image + - task: provision-keepers-service + image: node-builder-image + file: source/pipelines/tag/provision-keepers-service/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((production_oganesson_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((production_oganesson_deployment_type)) + DEPLOYMENT_LABEL: ((production_oganesson_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort + + - name: provision-production-oganesson-functions + serial: true + plan: + - in_parallel: + - get: source + trigger: true + passed: + - provision-production-oganesson-keepers-service + - get: version + - get: node-builder-image + - task: provision-functions + image: node-builder-image + file: source/pipelines/tag/provision-functions/task.yaml + params: + GPG_KEY: ((gpg_key)) + PROVISIONING_ROLE_ARN: ((production_oganesson_provisioning_role_arn)) + DEPLOYMENT_TYPE: ((production_oganesson_deployment_type)) + DEPLOYMENT_LABEL: ((production_oganesson_deployment_label)) + + on_success: *on_success + on_failure: *on_failure + on_error: *on_error + on_abort: *on_abort diff --git a/pipelines/tag/provision-database/task.sh b/pipelines/tag/provision-database/task.sh new file mode 100755 index 00000000..a50db957 --- /dev/null +++ b/pipelines/tag/provision-database/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "database:environment:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-database/task.yaml b/pipelines/tag/provision-database/task.yaml new file mode 100644 index 00000000..df7970a2 --- /dev/null +++ b/pipelines/tag/provision-database/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/tag/provision-database/task.sh diff --git a/pipelines/tag/provision-functions/task.sh b/pipelines/tag/provision-functions/task.sh new file mode 100755 index 00000000..5c5b1e55 --- /dev/null +++ b/pipelines/tag/provision-functions/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "lambda:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-functions/task.yaml b/pipelines/tag/provision-functions/task.yaml new file mode 100644 index 00000000..c270a36e --- /dev/null +++ b/pipelines/tag/provision-functions/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/tag/provision-functions/task.sh diff --git a/pipelines/tag/provision-image-repository/task.sh b/pipelines/tag/provision-image-repository/task.sh new file mode 100755 index 00000000..b1be7856 --- /dev/null +++ b/pipelines/tag/provision-image-repository/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "image_repository:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-image-repository/task.yaml b/pipelines/tag/provision-image-repository/task.yaml new file mode 100644 index 00000000..a17a4f2d --- /dev/null +++ b/pipelines/tag/provision-image-repository/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/tag/provision-image-repository/task.sh diff --git a/pipelines/tag/provision-image-storage-bucket/task.sh b/pipelines/tag/provision-image-storage-bucket/task.sh new file mode 100755 index 00000000..7efb2732 --- /dev/null +++ b/pipelines/tag/provision-image-storage-bucket/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "image_storage_bucket:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-image-storage-bucket/task.yaml b/pipelines/tag/provision-image-storage-bucket/task.yaml new file mode 100644 index 00000000..479a1c64 --- /dev/null +++ b/pipelines/tag/provision-image-storage-bucket/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/tag/provision-image-storage-bucket/task.sh diff --git a/pipelines/tag/provision-keepers-image-repository/task.sh b/pipelines/tag/provision-keepers-image-repository/task.sh new file mode 100755 index 00000000..7062624b --- /dev/null +++ b/pipelines/tag/provision-keepers-image-repository/task.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +./go "keepers_image_repository:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-keepers-image-repository/task.yaml b/pipelines/tag/provision-keepers-image-repository/task.yaml new file mode 100644 index 00000000..24720810 --- /dev/null +++ b/pipelines/tag/provision-keepers-image-repository/task.yaml @@ -0,0 +1,8 @@ +--- +platform: linux + +inputs: + - name: source +run: + dir: /source + path: ./pipelines/tag/provision-keepers-image-repository/task.sh diff --git a/pipelines/tag/provision-keepers-service/task.sh b/pipelines/tag/provision-keepers-service/task.sh new file mode 100755 index 00000000..275312a8 --- /dev/null +++ b/pipelines/tag/provision-keepers-service/task.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export GIT_SHA="$(git rev-parse --short HEAD)" + +mkdir -p "$PROJECT_DIR/build" +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "service_keepers:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-keepers-service/task.yaml b/pipelines/tag/provision-keepers-service/task.yaml new file mode 100644 index 00000000..9778ebe9 --- /dev/null +++ b/pipelines/tag/provision-keepers-service/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/tag/provision-keepers-service/task.sh diff --git a/pipelines/tag/provision-service/task.sh b/pipelines/tag/provision-service/task.sh new file mode 100755 index 00000000..c28428c4 --- /dev/null +++ b/pipelines/tag/provision-service/task.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +export AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +export AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +export AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export GIT_SHA="$(git rev-parse --short HEAD)" + +mkdir -p "$PROJECT_DIR/build" +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "service:provision[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" diff --git a/pipelines/tag/provision-service/task.yaml b/pipelines/tag/provision-service/task.yaml new file mode 100644 index 00000000..e3af9674 --- /dev/null +++ b/pipelines/tag/provision-service/task.yaml @@ -0,0 +1,9 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +run: + dir: /source + path: ./pipelines/tag/provision-service/task.sh diff --git a/pipelines/tag/publish-image-keepers/task.sh b/pipelines/tag/publish-image-keepers/task.sh new file mode 100755 index 00000000..d0ec6c8d --- /dev/null +++ b/pipelines/tag/publish-image-keepers/task.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +export GIT_SHA="$(git rev-parse --short HEAD)" + +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "image_keepers:prepare[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" + +cp -R "build/images/keepers"/* "$ROOT_DIR/image-build-directory/" diff --git a/pipelines/tag/publish-image-keepers/task.yaml b/pipelines/tag/publish-image-keepers/task.yaml new file mode 100644 index 00000000..59ed9854 --- /dev/null +++ b/pipelines/tag/publish-image-keepers/task.yaml @@ -0,0 +1,11 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +outputs: + - name: image-build-directory +run: + dir: /source + path: ./pipelines/tag/publish-image-keepers/task.sh diff --git a/pipelines/tag/publish-image/task.sh b/pipelines/tag/publish-image/task.sh new file mode 100755 index 00000000..d4b246d7 --- /dev/null +++ b/pipelines/tag/publish-image/task.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +[ -n "$TRACE" ] && set -x +set -e +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PROJECT_DIR="$( cd "$SCRIPT_DIR/../../.." && pwd )" +ROOT_DIR="$( cd "$PROJECT_DIR/.." && pwd )" + +cd "$PROJECT_DIR" + +echo "$GPG_KEY" | gpg --import - +git crypt unlock + +mkdir build +aws sts assume-role \ + --role-arn "$PROVISIONING_ROLE_ARN" \ + --role-session-name CI \ + > build/session + +AWS_ACCESS_KEY_ID="$(jq -M -r .Credentials.AccessKeyId build/session)" +AWS_SECRET_ACCESS_KEY="$(jq -M -r .Credentials.SecretAccessKey build/session)" +AWS_SESSION_TOKEN="$(jq -M -r .Credentials.SessionToken build/session)" + +export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN + +export GIT_SHA="$(git rev-parse --short HEAD)" + +cp "$ROOT_DIR/version/version" "$PROJECT_DIR/build/version" + +./go "image:prepare[$DEPLOYMENT_TYPE,$DEPLOYMENT_LABEL]" + +cp -R "build/images/reference-backend"/* "$ROOT_DIR/image-build-directory/" diff --git a/pipelines/tag/publish-image/task.yaml b/pipelines/tag/publish-image/task.yaml new file mode 100644 index 00000000..b94cc567 --- /dev/null +++ b/pipelines/tag/publish-image/task.yaml @@ -0,0 +1,11 @@ +--- +platform: linux + +inputs: + - name: source + - name: version +outputs: + - name: image-build-directory +run: + dir: /source + path: ./pipelines/tag/publish-image/task.sh diff --git a/src/Server.js b/src/Server.js new file mode 100644 index 00000000..0524b6d1 --- /dev/null +++ b/src/Server.js @@ -0,0 +1,57 @@ +const express = require("express"); +const cors = require("cors"); + +const ErrorHandlingMiddleware = require("./api/middlewares/ErrorHandlingMiddleware"); + +class Server { + constructor() { + this.app = express(); + + this.app.use(express.json()); + this.app.use(function (req, res, next) { + next(); + }); + this.app.use(cors()); + } + + get address() { + const serverAddress = this.server.address(); + const serverHost = + serverAddress.family === "IPv6" + ? `[${serverAddress.address}]` + : serverAddress.address; + + return `http://${serverHost}:${serverAddress.port}`; + } + + withModule(module) { + const router = express.Router(); + this.app.use(module.mountPoint(), module.addRoutesTo(router)); + return this; + } + + withMongooseClient(mongooseClient) { + this.mongooseClient = mongooseClient; + return this; + } + + start(port) { + this.app.use(ErrorHandlingMiddleware.apiErrorHandler); + + this.server = this.app.listen(port, async () => { + await this.mongooseClient.connect(); + + console.info(`App listening on: ` + port); + }); + return this; + } + + stop() { + this.server.close(() => { + console.info(`App shutting down...`); + }); + return this; + } +} + +module.exports = Server; diff --git a/src/api/ApiError.js b/src/api/ApiError.js new file mode 100644 index 00000000..d6469aa7 --- /dev/null +++ b/src/api/ApiError.js @@ -0,0 +1,11 @@ +/** + * Standard Error thrown by our API + */ +class ApiError { + constructor(code, message) { + this.code = code; + this.message = message; + } +} + +module.exports = ApiError; diff --git a/src/api/api-error.js b/src/api/api-error.js deleted file mode 100644 index 2124e64b..00000000 --- a/src/api/api-error.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Standard Error thrown by our API - */ -class ApiError { - - constructor (code, message) { - this.code = code; - this.message = message; - } - -} - -module.exports = ApiError; \ No newline at end of file diff --git a/src/api/controllers/AdministrationController.js b/src/api/controllers/AdministrationController.js new file mode 100644 index 00000000..5bc19317 --- /dev/null +++ b/src/api/controllers/AdministrationController.js @@ -0,0 +1,83 @@ +const ethers = require("ethers"); + +const ApiError = require("../ApiError"); +const Superadmin = require("../../utils/Superadmin"); + +class AdministrationController { + constructor( + authenticationService, + usersRepository, + voucherSuppliesRepository + ) { + this.authenticationService = authenticationService; + this.usersRepository = usersRepository; + this.voucherSuppliesRepository = voucherSuppliesRepository; + } + + async logInSuperadmin(req, res) { + const fiveMinutesInSeconds = 300; + + const authToken = this.authenticationService.generateToken( + Superadmin.instance(), + fiveMinutesInSeconds + ); + + res.status(201).send(authToken); + } + + async makeAdmin(req, res, next) { + const address = req.params.address.toLowerCase(); + + if (!ethers.utils.isAddress(address)) { + return next( + new ApiError( + 400, + `Provided address: ${address} is not a valid ETH address!` + ) + ); + } + + try { + const user = await this.usersRepository.getUser(address); + + if (!user) { + return next( + new ApiError(400, `Provided user does not exist in the DB!`) + ); + } + + await this.usersRepository.setUserToAdmin(address); + } catch (error) { + console.log(error); + return next( + new ApiError(400, `Provided address: ${address} was not set as admin!`) + ); + } + + res.status(200).send({ updated: true }); + } + + async changeVoucherSupplyVisibility(req, res, next) { + const supplyID = req.params.supplyID; + let voucherSupply; + let updatedVoucherSupply; + + try { + voucherSupply = await this.voucherSuppliesRepository.getVoucherSupplyById( + supplyID + ); + updatedVoucherSupply = await this.voucherSuppliesRepository.toggleVoucherSupplyVisibility( + voucherSupply.id + ); + } catch (error) { + console.log(error); + return next( + new ApiError(400, `Voucher with ID: ${supplyID} does not exist!`) + ); + } + + res.status(200).send({ visible: updatedVoucherSupply.visible }); + } +} + +module.exports = AdministrationController; diff --git a/src/api/controllers/EventsController.js b/src/api/controllers/EventsController.js new file mode 100644 index 00000000..f8f05627 --- /dev/null +++ b/src/api/controllers/EventsController.js @@ -0,0 +1,97 @@ +const ApiError = require("../ApiError"); + +class EventsController { + constructor(eventsRepository) { + this.eventsRepository = eventsRepository; + } + + async create(req, res, next) { + let event; + const address = res.locals.address; + + try { + const metadata = { + name: req.body.name, + address: address, + _correlationId: req.body._correlationId + ? req.body._correlationId + : null, + _tokenId: req.body._tokenId ? req.body._tokenId : null, + }; + + event = await this.eventsRepository.create(metadata); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request!")); + } + + res.status(201).send({ eventId: event.id }); + } + + async updateByCorrelationId(req, res, next) { + try { + await this.eventsRepository.update(res.locals.event); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request!")); + } + + res.status(200).send({ updated: true }); + } + + async updateByTokenId(req, res, next) { + try { + await this.eventsRepository.update(res.locals.event); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request!")); + } + + res.status(200).send({ updated: true }); + } + + async getAll(req, res, next) { + let detected, failed; + try { + detected = await this.eventsRepository.getAllDetected(); + failed = await this.eventsRepository.getAllFailed(); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request!")); + } + + res.status(200).send({ + succeeded: detected.length, + failed: failed.length, + events: [...detected, ...failed], + }); + } + + async getDetected(req, res, next) { + let detected; + + try { + detected = await this.eventsRepository.getAllDetected(); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request!")); + } + + res.status(200).send({ succeeded: detected.length, events: detected }); + } + + async getFailed(req, res, next) { + let failed; + + try { + failed = await this.eventsRepository.getAllFailed(); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request!")); + } + + res.status(200).send({ failed: failed.length, events: failed }); + } +} + +module.exports = EventsController; diff --git a/src/api/controllers/HealthController.js b/src/api/controllers/HealthController.js new file mode 100644 index 00000000..4dbf9260 --- /dev/null +++ b/src/api/controllers/HealthController.js @@ -0,0 +1,7 @@ +class HealthController { + async getHealth(req, res) { + res.status(200).send({ healthy: true }); + } +} + +module.exports = HealthController; diff --git a/src/api/controllers/PaymentsController.js b/src/api/controllers/PaymentsController.js new file mode 100644 index 00000000..53d215af --- /dev/null +++ b/src/api/controllers/PaymentsController.js @@ -0,0 +1,137 @@ +const ethers = require("ethers"); + +const ApiError = require("../ApiError"); +const paymentTypes = require("../../utils/paymentTypes"); + +const actors = { + BUYER: "buyer", + SELLER: "seller", + ESCROW: "escrow", +}; + +class PaymentsController { + constructor(vouchersRepository, paymentsRepository) { + this.vouchersRepository = vouchersRepository; + this.paymentsRepository = paymentsRepository; + } + + async getPaymentActors(req, res, next) { + const objectId = req.params.voucherID; + + let userVoucher; + + const distributedAmounts = { + payment: { + buyer: ethers.BigNumber.from(0), + seller: ethers.BigNumber.from(0), + escrow: ethers.BigNumber.from(0), + }, + sellerDeposit: { + buyer: ethers.BigNumber.from(0), + seller: ethers.BigNumber.from(0), + escrow: ethers.BigNumber.from(0), + }, + buyerDeposit: { + buyer: ethers.BigNumber.from(0), + seller: ethers.BigNumber.from(0), + escrow: ethers.BigNumber.from(0), + }, + }; + + try { + userVoucher = await this.vouchersRepository.getVoucherById(objectId); + const buyer = userVoucher._holder; + + // TODO this must come from the voucher, not voucher owner as, the voucher + // might be transferred and we do not want to update every single + // possible userVoucher with the newly owner from that supply + const seller = userVoucher.voucherOwner; + const payments = await this.paymentsRepository.getPaymentsByVoucherTokenId( + userVoucher._tokenIdVoucher + ); + + for (const key in payments) { + if (payments[key]._to.toLowerCase() === buyer) { + this.addPayment(payments[key], actors.BUYER, distributedAmounts); + } else if (payments[key]._to.toLowerCase() === seller) { + this.addPayment(payments[key], actors.SELLER, distributedAmounts); + } else { + this.addPayment(payments[key], actors.ESCROW, distributedAmounts); + } + } + } catch (error) { + console.log(error); + return next( + new ApiError( + 400, + `Get payment actors for voucher id: ${userVoucher._tokenIdVoucher} could not be completed.` + ) + ); + } + + res.status(200).send({ distributedAmounts }); + } + + addPayment(paymentDetails, actor, distributedAmounts) { + if (paymentDetails._type === paymentTypes.PAYMENT) { + distributedAmounts.payment[actor] = ethers.BigNumber.from( + distributedAmounts.payment[actor].toString() + ).add(paymentDetails._payment.toString()); + } else if (paymentDetails._type === paymentTypes.SELLER_DEPOSIT) { + distributedAmounts.sellerDeposit[actor] = ethers.BigNumber.from( + distributedAmounts.sellerDeposit[actor].toString() + ).add(paymentDetails._payment.toString()); + } else if (paymentDetails._type === paymentTypes.BUYER_DEPOSIT) { + distributedAmounts.buyerDeposit[actor] = ethers.BigNumber.from( + distributedAmounts.buyerDeposit[actor].toString() + ).add(paymentDetails._payment.toString()); + } + } + + async createPayments(req, res, next) { + const events = req.body; + let promises = []; + + try { + for (const key in events) { + promises.push(this.paymentsRepository.createPayment(events[key])); + } + + await Promise.all(promises); + } catch (error) { + console.log(error); + return next( + new ApiError( + 400, + `Create payment operation for voucher id: ${events[0]._tokenIdVoucher} could not be completed.` + ) + ); + } + + res.status(200).send({ updated: true }); + } + + async getPaymentsByVoucherID(req, res, next) { + const tokenIdVoucher = req.params.tokenIdVoucher; + + let payments; + + try { + payments = await this.paymentsRepository.getPaymentsByVoucherTokenId( + tokenIdVoucher + ); + } catch (error) { + console.log(error); + return next( + new ApiError( + 400, + `Get payment for voucher id: ${tokenIdVoucher} could not be completed.` + ) + ); + } + + res.status(200).send({ payments }); + } +} + +module.exports = PaymentsController; diff --git a/src/api/controllers/UsersController.js b/src/api/controllers/UsersController.js new file mode 100644 index 00000000..78f55c91 --- /dev/null +++ b/src/api/controllers/UsersController.js @@ -0,0 +1,65 @@ +const ApiError = require("../ApiError"); + +const nonceUtils = require("../../utils/nonceUtils"); + +class UsersController { + constructor(authenticationService, usersRepository) { + this.authenticationService = authenticationService; + this.usersRepository = usersRepository; + } + + async generateNonce(req, res, next) { + const address = req.params.address; + let randomNonce; + + try { + randomNonce = nonceUtils.generateRandomNumber(); + await this.usersRepository.preserveNonce( + address.toLowerCase(), + randomNonce + ); + } catch (error) { + console.log(error); + return next( + new ApiError(400, `Could not preserve nonce for user: ${address}.`) + ); + } + + res.status(200).json(randomNonce); + } + + async verifySignature(req, res, next) { + const address = req.params.address; + + let user; + + try { + user = await this.usersRepository.getUser(address.toLowerCase()); + + const message = { + value: `Authentication message: ${user.nonce}`, + }; + + const isSignatureVerified = this.authenticationService.isSignatureVerified( + address, + req.body.domain, + req.body.types, + message, + req.body.signature + ); + + if (!isSignatureVerified && !req.body.isSmartWallet) { + return next(new ApiError(401, "Unauthorized.")); + } + } catch (error) { + console.log(error); + return next(new ApiError(400, `Signature was not verified!`)); + } + + const authToken = this.authenticationService.generateToken(user); + + res.status(200).send(authToken); + } +} + +module.exports = UsersController; diff --git a/src/api/controllers/VoucherSuppliesController.js b/src/api/controllers/VoucherSuppliesController.js new file mode 100644 index 00000000..1c851e6a --- /dev/null +++ b/src/api/controllers/VoucherSuppliesController.js @@ -0,0 +1,357 @@ +// @ts-nocheck +const { BigNumber } = require("ethers"); +const ApiError = require("../ApiError"); + +const voucherUtils = require("../../utils/voucherUtils"); + +class VoucherSuppliesController { + constructor(voucherSuppliesRepository) { + this.voucherSuppliesRepository = voucherSuppliesRepository; + } + + async getVoucherSupply(req, res, next) { + let voucherSupply; + + if (typeof req.params.id === "undefined") { + console.log(`An error occurred while tried to fetch Voucher.`); + return next(new ApiError(400, "No VoucherID was presented")); + } + + try { + voucherSupply = await this.voucherSuppliesRepository.getVoucherSupplyById( + req.params.id + ); + voucherSupply.voucherStatus = voucherUtils.calcVoucherSupplyStatus( + voucherSupply.startDate, + voucherSupply.expiryDate, + voucherSupply.qty + ); + } catch (error) { + console.log( + `An error occurred while tried to fetch Voucher Supply with ID: [${req.params.id}].` + ); + console.log(error); + return next( + new ApiError(400, `Could not get voucher with ID: ${req.params.id}`) + ); + } + + res.status(200).send({ + voucherSupply, + }); + } + + async getAllVoucherSupplies(req, res, next) { + let voucherSupplies; + + try { + voucherSupplies = await this.voucherSuppliesRepository.getAllVoucherSupplies(); + } catch (error) { + console.log( + `An error occurred while tried to fetch all voucher supplies!` + ); + console.log(error); + return next(new ApiError(400, `Error fetching all voucher supplies.`)); + } + + res.status(200).send({ voucherSupplies }); + } + + async getSellerSupplies(req, res, next) { + let voucherSupplies; + const owner = req.params.address.toLowerCase(); + + try { + voucherSupplies = await this.voucherSuppliesRepository.getAllVoucherSuppliesByOwner( + owner + ); + + voucherSupplies.forEach((supply) => { + supply.voucherStatus = voucherUtils.calcVoucherSupplyStatus( + supply.startDate, + supply.expiryDate, + supply.qty + ); + }); + } catch (error) { + console.log( + `An error occurred while user [${owner}] tried to fetch Vouchers.` + ); + console.log(error); + return next(new ApiError(400, "Invalid operation")); + } + + res.status(200).send({ voucherSupplies }); + } + + async getBuyerSupplies(req, res, next) { + let voucherSupplies; + const buyer = req.params.address.toLowerCase(); + + try { + voucherSupplies = await this.voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + buyer + ); + } catch (error) { + console.log( + `An error occurred while user [${buyer}] tried to fetch Vouchers.` + ); + console.log(error); + return next(new ApiError(400, "Invalid operation")); + } + + res.status(200).send({ voucherSupplies }); + } + + async getSupplyStatuses(req, res, next) { + let active, + inactive = []; + const address = res.locals.address; + + try { + active = await this.voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + address + ); + inactive = await this.voucherSuppliesRepository.getInactiveVoucherSuppliesByOwner( + address + ); + } catch (error) { + console.log( + `An error occurred while user tried to fetch Supply Statuses.` + ); + console.log(error); + return next(new ApiError(400, "Bad request.")); + } + + res.status(200).send({ active: active.length, inactive: inactive.length }); + } + + async getActiveSupplies(req, res, next) { + let active = []; + const address = res.locals.address; + + try { + active = await this.voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + address + ); + } catch (error) { + console.log( + `An error occurred while user tried to fetch Active Supplies.` + ); + console.log(error); + return next(new ApiError(400, "Bad request.")); + } + + res.status(200).send({ + voucherSupplies: active, + }); + } + + async getInactiveSupplies(req, res, next) { + let inActive = []; + const address = res.locals.address; + + try { + inActive = await this.voucherSuppliesRepository.getInactiveVoucherSuppliesByOwner( + address + ); + } catch (error) { + console.log(error); + return next(new ApiError(400, "Bad request.")); + } + + res.status(200).send({ + voucherSupplies: inActive, + }); + } + + async createVoucherSupply(req, res, next) { + const metadata = { + ...req.body, + location: res.locals.location, + }; + const fileRefs = req.files.map((file) => ({ + url: file.location, + type: "image", + })); + const voucherOwner = res.locals.address; + let voucherSupply; + + try { + voucherSupply = await this.voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ); + } catch (error) { + console.log( + `An error occurred while user [${voucherOwner}] tried to create Voucher.` + ); + console.log(error.message); + return next(new ApiError(400, "Invalid voucher model")); + } + + res.status(201).send({ voucherSupply }); + } + + async updateVoucherSupply(req, res, next) { + const metadata = { + ...req.body, + location: res.locals.location, + }; + const fileRefs = req.files.map((file) => ({ + url: file.location, + type: "image", + })); + const voucherOwner = res.locals.address; + const voucher = res.locals.voucherSupply; + + try { + await this.voucherSuppliesRepository.updateVoucherSupply( + voucher, + metadata, + fileRefs + ); + } catch (error) { + console.log( + `An error occurred while user [${voucherOwner}] tried to update Voucher.` + ); + console.log(error); + return next(new ApiError(400, "Invalid voucher model")); + } + + res.status(200).send({ success: true }); + } + + /** + * @notice This function is triggered while event 'LogOrderCreated' is emitted + */ + async setSupplyMetaOnOrderCreated(req, res, next) { + try { + await this.voucherSuppliesRepository.setVoucherSupplyMeta(req.body); + } catch (error) { + console.log( + `An error occurred while user [${req.body.voucherOwner}] tried to update Voucher.` + ); + console.log(error); + return next(new ApiError(400, "Invalid voucher model")); + } + + res.status(200).send({ success: true }); + } + + /** + * @notice This function is triggered while one of the following events is emitted + * TransferSingle + * TransferBatch + */ + async updateSupplyOnTransfer(req, res, next) { + let promises = []; + let vouchersSupplies = req.body.voucherSupplies; + let quantities = req.body.quantities; + + try { + const startCorrelationId = + req.body._correlationId - vouchersSupplies.length; + + for (let i = 0; i < vouchersSupplies.length; i++) { + let metadata; + + try { + metadata = { + voucherOwner: req.body.voucherOwner.toLowerCase(), + _tokenIdSupply: BigNumber.from(vouchersSupplies[i]).toString(), + qty: BigNumber.from(quantities[i]).toString(), + _correlationId: startCorrelationId + i, + }; + } catch (error) { + console.log( + `Error while trying to convert vouchersSupply: ${JSON.stringify( + vouchersSupplies[i] + )} or quantity: ${JSON.stringify(quantities[i])} from BigNumber!` + ); + continue; + } + + promises.push( + this.voucherSuppliesRepository.updateSupplyMeta(metadata) + ); + } + + await Promise.all(promises); + } catch (error) { + console.log( + `An error occurred while trying to update a voucher from Transfer event.` + ); + console.log(error.message); + return next( + new ApiError(404, "Could not update the database from Transfer event!") + ); + } + + res.status(200).send({ success: true }); + } + + async updateSupplyOnCancel(req, res, next) { + try { + let metadata; + + metadata = { + voucherOwner: req.body.voucherOwner.toLowerCase(), + _tokenIdSupply: req.body._tokenIdSupply.toString(), + qty: req.body.qty, + }; + + await this.voucherSuppliesRepository.updateSupplyMeta(metadata); + } catch (error) { + console.log( + `An error occurred while trying to update a voucher from Cancel Voucher Set event.` + ); + console.log(error.message); + return next( + new ApiError(404, "Could not update the database from Transfer event!") + ); + } + + res.status(200).send({ success: true }); + } + + async deleteVoucherSupply(req, res, next) { + const voucherSupply = res.locals.voucherSupply; + + try { + await this.voucherSuppliesRepository.deleteVoucherSupply( + voucherSupply.id + ); + } catch (error) { + console.log( + `An error occurred while user [${req.body.voucherOwner}] tried to delete Voucher.` + ); + return next(new ApiError(400, "Invalid operation")); + } + + res.status(200).send({ success: true }); + } + + async deleteImage(req, res, next) { + const voucherSupply = res.locals.voucherSupply; + const imageUrl = req.body.imageUrl; + + try { + await this.voucherSuppliesRepository.deleteVoucherSupplyImage( + voucherSupply.id, + imageUrl + ); + } catch (error) { + console.log( + `An error occurred while image from document [${req.params.id}] was tried to be deleted.` + ); + console.log(error); + return next(new ApiError(400, "Invalid operation")); + } + + res.status(200).send({ success: true }); + } +} + +module.exports = VoucherSuppliesController; diff --git a/src/api/controllers/VouchersController.js b/src/api/controllers/VouchersController.js new file mode 100644 index 00000000..bdcd8694 --- /dev/null +++ b/src/api/controllers/VouchersController.js @@ -0,0 +1,255 @@ +// @ts-nocheck +const ApiError = require("../ApiError"); + +const voucherUtils = require("../../utils/voucherUtils"); + +class VouchersController { + constructor(voucherSuppliesRepository, vouchersRepository) { + this.voucherSuppliesRepository = voucherSuppliesRepository; + this.vouchersRepository = vouchersRepository; + } + + async getVouchers(req, res, next) { + const voucherData = []; + const address = res.locals.address; + + try { + const promises = []; + const userVouchers = await this.vouchersRepository.getAllVouchersByHolder( + address + ); + + userVouchers.forEach((userVoucher) => { + promises.push( + this.voucherSuppliesRepository.getVoucherSupplyDetails( + userVoucher, + voucherData + ) + ); + }); + + await Promise.all(promises); + } catch (error) { + console.log( + `An error occurred while tried to get all vouchers for user: ${address}!` + ); + console.log(error.message); + return next( + new ApiError(400, `Error processing User Vouchers for user: ${address}`) + ); + } + + res.status(200).send({ voucherData }); + } + + async getBoughtVouchersForSupply(req, res, next) { + const owner = res.locals.address; + const supplyID = req.params.supplyID; + let vouchers = {}; + try { + vouchers = await this.vouchersRepository.getAllVouchersByVoucherSupplyIdAndOwner( + supplyID, + owner + ); + } catch (error) { + console.log( + `An error occurred while tried to get bought vouchers with Supply ID: [${supplyID}]!` + ); + console.log(error.message); + return next( + new ApiError(400, `Error fetching all buyers for Voucher: ${supplyID}`) + ); + } + res.status(200).send({ vouchers }); + } + + async getVoucherDetails(req, res, next) { + const voucherID = req.params.voucherID; + + let voucher; + try { + const userVoucher = await this.vouchersRepository.getVoucherById( + voucherID + ); + const voucherSupply = await this.voucherSuppliesRepository.getVoucherSupplyById( + userVoucher.supplyID + ); + + voucher = { + _id: userVoucher.id, + _tokenIdVoucher: userVoucher._tokenIdVoucher, + _holder: userVoucher._holder, + _tokenIdSupply: userVoucher._tokenIdSupply, + buyerStatus: userVoucher.status, + CANCELLED: userVoucher.CANCELLED, + COMMITTED: userVoucher.COMMITTED, + COMPLAINED: userVoucher.COMPLAINED, + REDEEMED: userVoucher.REDEEMED, + REFUNDED: userVoucher.REFUNDED, + FINALIZED: userVoucher.FINALIZED, + EXPIRED: userVoucher.EXPIRED, + supplyID: voucherSupply.id, + voucherStatus: voucherUtils.calcVoucherSupplyStatus( + voucherSupply.startDate, + voucherSupply.expiryDate, + voucherSupply.qty + ), + title: voucherSupply.title, + qty: voucherSupply.qty, + description: voucherSupply.description, + location: voucherSupply.location, + contact: voucherSupply.contact, + conditions: voucherSupply.conditions, + imagefiles: voucherSupply.imagefiles, + category: voucherSupply.category, + startDate: voucherSupply.startDate, + expiryDate: voucherSupply.expiryDate, + price: voucherSupply.price, + buyerDeposit: voucherSupply.buyerDeposit, + sellerDeposit: voucherSupply.sellerDeposit, + voucherOwner: voucherSupply.voucherOwner, + paymentType: voucherSupply._paymentType, + }; + } catch (error) { + console.log( + `An error occurred while tried to fetch voucher details with ID: [${voucherID}]!` + ); + console.log(error.message); + return next( + new ApiError( + 400, + `Error fetching Voucher Details for voucher: ${voucherID}` + ) + ); + } + res.status(200).send({ voucher }); + } + + async commitToBuy(req, res, next) { + const supplyID = req.params.supplyID; + const metadata = req.body; + let voucher; + + try { + voucher = await this.vouchersRepository.createVoucher(metadata, supplyID); + } catch (error) { + console.log(error); + return next( + new ApiError( + 400, + `Buy operation for Supply id: ${supplyID} could not be completed.` + ) + ); + } + + res.status(200).send({ voucherID: voucher.id }); + } + + /** + * @notice This function is triggered while event 'LogVoucherDelivered' is emitted + */ + async updateVoucherDelivered(req, res, next) { + let voucher; + + try { + voucher = await this.vouchersRepository.updateVoucherDelivered(req.body); + + await this.voucherSuppliesRepository.decrementVoucherSupplyQty( + req.body._tokenIdSupply + ); + } catch (error) { + console.log(error); + return next( + new ApiError( + 400, + `Update operation for voucher id: ${req.body._tokenIdVoucher} could not be completed.` + ) + ); + } + + res.status(200).send({ voucher: voucher.id }); + } + + /** + * @notice This function is triggered while some of the following events is emitted + * LogVoucherRedeemed + * LogVoucherRefunded + * LogVoucherComplain + * LogVoucherFaultCancel + * Transfer (e.g ERC-721) + */ + async updateVoucherOnCommonEvent(req, res, next) { + let voucher; + + try { + voucher = await this.vouchersRepository.getVoucherByVoucherTokenId( + req.body._tokenIdVoucher + ); + + if (!voucher) { + return next( + new ApiError( + 404, + `User Voucher with voucherTokenId ${req.body._tokenIdVoucher} not found!` + ) + ); + } + + await this.vouchersRepository.updateVoucherOnCommonEvent( + voucher.id, + req.body + ); + } catch (error) { + console.log(error); + return next( + new ApiError( + 400, + `Update operation for voucher id: ${voucher.id} could not be completed.` + ) + ); + } + + res.status(200).send({ updated: true }); + } + + async updateStatusFromKeepers(req, res, next) { + const tokenIdVoucher = req.body[0]._tokenIdVoucher; + const status = req.body[0].status; + + try { + await this.vouchersRepository.updateStatusFromKeepers( + tokenIdVoucher, + status + ); + } catch (error) { + console.log( + `An error occurred while tried to finalize voucher with ID: [${tokenIdVoucher}]!` + ); + console.log(error); + return next( + new ApiError( + 400, + `Finalize operation for token voucher id: ${tokenIdVoucher} could not be completed.` + ) + ); + } + + res.status(200).send({ updated: true }); + } + + async getAllVouchers(req, res, next) { + let vouchers; + + try { + vouchers = await this.vouchersRepository.getAllVouchers(); + } catch (error) { + console.log(`An error occurred while tried to fetch all vouchers!`); + console.log(error); + return next(new ApiError(400, `Error fetching all vouchers.`)); + } + + res.status(200).send({ vouchers }); + } +} + +module.exports = VouchersController; diff --git a/src/api/controllers/admin-controller.js b/src/api/controllers/admin-controller.js deleted file mode 100644 index 12eb3b65..00000000 --- a/src/api/controllers/admin-controller.js +++ /dev/null @@ -1,39 +0,0 @@ -const mongooseService = require('../../database/index.js'); -const ApiError = require('../api-error'); -const ethers = require('ethers') -class AdminController { - - static async changeTokenSupplyIDVisibility(req, res, next) { - const voucherID = req.params.voucherID; - let voucher; - - try { - voucher = await mongooseService.getVoucher(voucherID) - } catch (error) { - return next(new ApiError(400, `Voucher with ID: ${voucherID} does not exist!`)) - } - - const updatedVoucher = await mongooseService.updateVoucherVisibilityStatus(voucher.id); - res.status(200).send({ visible: updatedVoucher.visible }); - } - - static async makeAdmin(req, res, next) { - const address = req.params.address.toLowerCase(); - - if (!ethers.utils.isAddress(address)) { - return next(new ApiError(400, `Provided address: ${address} is not a valid ETH address!`)) - } - - const user = await mongooseService.getUser(address) - - if (!user) { - return next(new ApiError(400, `Provided user does not exist in the DB!`)) - } - - await mongooseService.makeAdmin(address); - - res.status(200).send({updated: true}) - } -} - -module.exports = AdminController; diff --git a/src/api/controllers/payment-controller.js b/src/api/controllers/payment-controller.js deleted file mode 100644 index c764de50..00000000 --- a/src/api/controllers/payment-controller.js +++ /dev/null @@ -1,99 +0,0 @@ -const { mongo } = require('mongoose'); -const mongooseService = require('../../database/index.js') -const APIError = require('../api-error') -const ethers = require('ethers'); - -const actors = { - BUYER: 'buyer', - SELLER: 'seller', - ESCROW: 'escrow' -} - -class PaymentController { - - static async getPaymentActors(req, res, next) { - const objectId = req.params.voucherID - - const distributedAmounts = { - payment: { - buyer: ethers.BigNumber.from(0), - seller: ethers.BigNumber.from(0), - escrow: ethers.BigNumber.from(0) - }, - sellerDeposit: { - buyer: ethers.BigNumber.from(0), - seller: ethers.BigNumber.from(0), - escrow: ethers.BigNumber.from(0) - }, - buyerDeposit: { - buyer: ethers.BigNumber.from(0), - seller: ethers.BigNumber.from(0), - escrow: ethers.BigNumber.from(0) - } - } - - try { - const userVoucher = await mongooseService.getMyVoucherByID(objectId) - const buyer = userVoucher._holder; - const seller = userVoucher.voucherOwner - const payments = await mongooseService.getPaymentsByVoucherID(userVoucher._tokenIdVoucher); - - for (const key in payments) { - if (payments[key]._to.toLowerCase() == buyer) { - PaymentController.addPayment(payments[key], actors.BUYER, distributedAmounts) - } else if (payments[key]._to.toLowerCase() == seller) { - PaymentController.addPayment(payments[key], actors.SELLER, distributedAmounts) - } else { - PaymentController.addPayment(payments[key], actors.ESCROW, distributedAmounts) - } - } - - } catch (error) { - console.error(error) - return next(new APIError(400, `Get payment actors for voucher id: ${ userVoucher._tokenIdVoucher } could not be completed.`)) - } - - res.status(200).send({ distributedAmounts }); - } - - static addPayment(paymentDetails, actor, distributedAmounts) { - // _type: 0 - Payment, 1 - Seller Deposit, 2 - Buyer Deposit - if (paymentDetails._type == 0) { - distributedAmounts.payment[actor] = ethers.BigNumber.from(distributedAmounts.payment[actor].toString()).add(paymentDetails._payment.toString()) - } else if (paymentDetails._type == 1) { - distributedAmounts.sellerDeposit[actor] = ethers.BigNumber.from(distributedAmounts.sellerDeposit[actor].toString()).add(paymentDetails._payment.toString()) - } else if (paymentDetails._type == 2){ - distributedAmounts.buyerDeposit[actor] = ethers.BigNumber.from(distributedAmounts.buyerDeposit[actor].toString()).add(paymentDetails._payment.toString()) - } - } - - static async createPayments(req, res, next) { - const events = res.locals.events - let promises = [] - - try { - for (const key in events) { - promises.push(mongooseService.createPayment(events[key])) - } - - await Promise.all(promises) - - } catch (error) { - console.error(error) - return next(new APIError(400, `Create payment operation for voucher id: ${ events[0]._tokenIdVoucher } could not be completed.`)) - } - - res.status(200).send({ updated: true }); - } - - static async getPaymentsByVoucherID(req, res, next) { - const tokenIdVoucher = req.params.tokenIdVoucher; - - const payments = await mongooseService.getPaymentsByVoucherID(tokenIdVoucher); - - res.status(200).send({ payments }) - } - -} - -module.exports = PaymentController; diff --git a/src/api/controllers/user-vouchers-controller.js b/src/api/controllers/user-vouchers-controller.js deleted file mode 100644 index 78b7766c..00000000 --- a/src/api/controllers/user-vouchers-controller.js +++ /dev/null @@ -1,114 +0,0 @@ -//@ts-nocheck - -const mongooseService = require('../../database/index.js') -const APIError = require('../api-error') -const voucherUtils = require('../../utils/voucherUtils') -const statuses = require('../../utils/userVoucherStatus'); - -class UserVoucherController { - - static async getMyVouchers(req, res, next) { - const voucherData = [] - const address = res.locals.address; - - const userVouchersDocuments = await mongooseService.getMyVouchers(address) - - const promises = [] - userVouchersDocuments.forEach(e => { - promises.push(mongooseService.getVouchersDetails(e, voucherData)) - }) - - await Promise.all(promises) - - res.status(200).send({ voucherData }) - } - - static async getBuyersByVoucherID(req, res, next) { - const owner = res.locals.address - const voucherID = req.params.voucherID - let vouchers = {}; - try { - vouchers = await mongooseService.findAllUsersByVoucherID(voucherID, owner) - } catch (error) { - console.error(error.message); - - } - res.status(200).send({vouchers}); - } - - static async getVoucherDetails(req, res, next) { - const myVoucherID = req.params.voucherID - - const myVoucherDocument = await mongooseService.getMyVoucherByID(myVoucherID) - const voucherDetailsDocument = await mongooseService.getVoucher(myVoucherDocument.voucherID) - - const voucher = { - _id: myVoucherDocument.id, - _tokenIdVoucher: myVoucherDocument._tokenIdVoucher, - _holder: myVoucherDocument._holder, - _tokenIdSupply: myVoucherDocument._tokenIdSupply, - buyerStatus: myVoucherDocument.status, - CANCELLED: myVoucherDocument.CANCELLED, - COMMITTED: myVoucherDocument.COMMITTED, - COMPLAINED: myVoucherDocument.COMPLAINED, - REDEEMED: myVoucherDocument.REDEEMED, - REFUNDED: myVoucherDocument.REFUNDED, - FINALIZED: myVoucherDocument.FINALIZED, - voucherID: voucherDetailsDocument.id, - voucherStatus: voucherUtils.calcVoucherStatus(voucherDetailsDocument.startDate, voucherDetailsDocument.expiryDate, voucherDetailsDocument.qty), - title: voucherDetailsDocument.title, - qty: voucherDetailsDocument.qty, - description: voucherDetailsDocument.description, - location: voucherDetailsDocument.location, - contact: voucherDetailsDocument.contact, - conditions: voucherDetailsDocument.conditions, - imagefiles: voucherDetailsDocument.imagefiles, - category: voucherDetailsDocument.category, - startDate: voucherDetailsDocument.startDate, - expiryDate: voucherDetailsDocument.expiryDate, - price: voucherDetailsDocument.price, - buyerDeposit: voucherDetailsDocument.buyerDeposit, - sellerDeposit: voucherDetailsDocument.sellerDeposit, - voucherOwner: voucherDetailsDocument.voucherOwner, - } - - res.status(200).send({ voucher }) - } - - static async updateMyVoucher(req, res, next) { - const userVoucherID = res.locals.userVoucher.id; - const status = req.body.status - - try { - const myVoucherDocument = await mongooseService.updateMyVoucherStatus(userVoucherID, status) - } catch (error) { - console.error(error) - return next(new APIError(400, `Redeem operation for user voucher id: ${userVoucherID} could not be completed.`)) - } - - res.status(200).send({ updated: true }) - } - - static async finalizeVoucher(req, res, next) { - const tokenIdVoucher = res.locals.events[0]._tokenIdVoucher; - const status = res.locals.events[0].status - - try { - await mongooseService.finalizeVoucher(tokenIdVoucher, status) - } catch (error) { - console.error(error) - return next(new APIError(400, `Finalize operation for token voucher id: ${userVoucherID} could not be completed.`)) - } - - res.status(200).send({ updated: true }) - } - - static async getAllVouchers(req, res, next) { - const vouchersDocuments = await mongooseService.getAllVouchers(); - - res.status(200).send({ vouchersDocuments }) - } - -} - -module.exports = UserVoucherController; diff --git a/src/api/controllers/users-controller.js b/src/api/controllers/users-controller.js deleted file mode 100644 index bad9faad..00000000 --- a/src/api/controllers/users-controller.js +++ /dev/null @@ -1,57 +0,0 @@ -const nonceUtils = require('../../utils/nonceUtils') -const mongooseService = require('../../database/index.js') -const AuthValidator = require('../services/auth-service') -const APIError = require('../api-error') - -class UserController { - - static async isUserRegistered(req, res, next) { - const address = req.params.address.toLowerCase() - const isRegistered = await mongooseService.isUserRegistered(address); - - res.status(200).json({ isRegistered }); - } - - static async generateNonce(req, res, next) { - - const address = req.params.address; - const randomNonce = nonceUtils.generateRandomNumber(); - await mongooseService.preserveNonce(address.toLowerCase(), randomNonce) - - res.status(200).json( - randomNonce - ); - } - - static async verifySignature(req, res, next) { - const address = req.params.address - const nonce = await mongooseService.getNonce(address.toLowerCase()) - - if (!await AuthValidator.isSignatureVerified(address, nonce, req.body.signature)) { - return next(new APIError(401, 'Unauthorized.')) - } - - const authToken = AuthValidator.generateAccessToken(address) - res.status(200).send(authToken) - } - - static async commitToBuy(req, res, next) { - const voucherID = req.params.voucherID - const metadata = req.body; - const buyer = res.locals.address - let userVoucher; - - try { - userVoucher = await mongooseService.createUserVoucher(metadata, voucherID); - await mongooseService.updateVoucherQty(voucherID); - - } catch (error) { - console.error(error) - return next(new APIError(400, `Buy operation for voucher id: ${metadata.voucherID} could not be completed.`)) - } - - res.status(200).send({ userVoucherID: userVoucher.id}); - } -} - -module.exports = UserController; \ No newline at end of file diff --git a/src/api/controllers/vouchers-controller.js b/src/api/controllers/vouchers-controller.js deleted file mode 100644 index 52c73159..00000000 --- a/src/api/controllers/vouchers-controller.js +++ /dev/null @@ -1,180 +0,0 @@ -//@ts-nocheck - -const mongooseService = require('../../database/index.js') -const AuthValidator = require('../services/auth-service') -const APIError = require('../api-error') -const voucherUtils = require('../../utils/voucherUtils'); - -class VouchersController { - - static async getVoucher(req, res, next) { - let voucher; - - if (typeof req.params.id === 'undefined') { - console.error(`An error occurred while tried to fetch Voucher.`); - return next(new APIError(400, 'No VoucherID was presented')); - } - - try { - voucher = await mongooseService.getVoucher(req.params.id) - - const voucherStatus = voucherUtils.calcVoucherStatus(voucher.startDate, voucher.expiryDate, voucher.qty ) - voucher.voucherStatus = voucherStatus - } catch (error) { - console.error(error) - return next(new APIError(400, `${error.message}`)); - } - - res.status(200).send({ - voucher - }); - } - - static async getSellVouchers(req, res, next) { - let vouchers; - const owner = req.params.address.toLowerCase(); - - try { - vouchers = await mongooseService.getVouchersByOwner(owner) - - vouchers.forEach(voucher => { - const voucherStatus = voucherUtils.calcVoucherStatus(voucher.startDate, voucher.expiryDate, voucher.qty) - voucher.voucherStatus = voucherStatus - }) - - } catch (error) { - console.error(`An error occurred while user [${owner}] tried to fetch Vouchers.`); - return next(new APIError(400, 'Invalid operation')); - } - - res.status(200).send({ vouchers }); - } - - static async getBuyVouchers(req, res, next) { - let vouchers; - const buyer = req.params.address.toLowerCase(); - - try { - vouchers = await mongooseService.getVouchersByBuyer(buyer) - } catch (error) { - console.error(`An error occurred while user [${buyer}] tried to fetch Vouchers.`); - console.error(error) - return next(new APIError(400, 'Invalid operation')); - } - - res.status(200).send({ vouchers }); - } - - static async getVouchersStatus(req, res, next) { - let active, inactive = []; - const address = res.locals.address; - - try { - active = await mongooseService.getActiveVouchers(address) - inactive = await mongooseService.getInactiveVouchers(address) - } catch (error) { - return next(new APIError(400, 'Bad request.')); - } - - res.status(200).send({ active: active.length, inactive: inactive.length }); - } - - static async getAllActiveVouchers(req, res, next) { - let active = []; - const address = res.locals.address; - - try { - active = await mongooseService.getActiveVouchers(address) - } catch (error) { - return next(new APIError(400, 'Bad request.')); - } - - res.status(200).send({ - vouchers: active - }) - } - - static async getAllInactiveVouchers(req, res, next) { - let inActive = []; - const address = res.locals.address; - - try { - inActive = await mongooseService.getInactiveVouchers(address) - } catch (error) { - return next(new APIError(400, 'Bad request.')); - } - - res.status(200).send({ - vouchers: inActive - }) - } - - static async createVoucher(req, res, next) { - const fileRefs = await voucherUtils.uploadFiles(req); - const voucherOwner = res.locals.address; - - try { - await mongooseService.createVoucher(req.body, fileRefs, voucherOwner) - } catch (error) { - console.error(`An error occurred while user [${voucherOwner}] tried to create Voucher.`); - console.error(error) - return next(new APIError(400, 'Invalid voucher model')); - } - - res.status(200).send({ success: true }); - } - - static async updateVoucher(req, res, next) { - const fileRefs = await voucherUtils.uploadFiles(req); - const voucherOwner = res.locals.address; - const voucher = res.locals.voucher - - try { - await mongooseService.updateVoucher(voucher, req.body, fileRefs) - } catch (error) { - console.error(`An error occurred while user [${voucherOwner}] tried to update Voucher.`); - console.error(error) - return next(new APIError(400, 'Invalid voucher model')); - } - - res.status(200).send({ success: true }); - } - - static async deleteVoucher(req, res, next) { - const voucher = res.locals.voucher - - try { - await mongooseService.deleteVoucher(voucher.id); - } catch (error) { - console.error(`An error occurred while user [${req.body.voucherOwner}] tried to delete Voucher.`); - return next(new APIError(400, 'Invalid operation')); - } - - res.status(200).send({ success: true }); - } - - static async deleteImage(req, res, next) { - const voucher = res.locals.voucher - const imageUrl = req.query.imageUrl; - - try { - //TODO validate voucher exists - await mongooseService.deleteImage(voucher.id, imageUrl); - } catch (error) { - console.error(`An error occurred while image frpm document [${req.params.id}] was tried to be deleted.`); - console.error(error) - return next(new APIError(400, 'Invalid operation')); - } - - res.status(200).send({ success: true }); - } - - - static async buy(req, res, next) { - - await mongooseService.buy(); - res.status(200).send({ success: true }); - } -} - -module.exports = VouchersController; \ No newline at end of file diff --git a/src/api/middlewares/AdministratorAuthenticationMiddleware.js b/src/api/middlewares/AdministratorAuthenticationMiddleware.js new file mode 100644 index 00000000..1d286c58 --- /dev/null +++ b/src/api/middlewares/AdministratorAuthenticationMiddleware.js @@ -0,0 +1,36 @@ +// @ts-nocheck +const ApiError = require("./../ApiError"); +const userRoles = require("../../database/User/userRoles"); + +class AdministratorAuthenticationMiddleware { + constructor(authenticationService, usersRepository) { + this.authenticationService = authenticationService; + this.usersRepository = usersRepository; + } + + async validateAdminAccess(req, res, next) { + const authHeader = req.headers["authorization"]; + const token = authHeader && authHeader.split(" ")[1]; + + if (token == null) { + return next(new ApiError(401, "Unauthorized.")); + } + + try { + const payload = this.authenticationService.verifyToken(token); + + if (payload.role !== userRoles.ADMIN) { + return next(new ApiError(403, "User is not admin!")); + } + + res.locals.address = payload.user; + } catch (error) { + console.log(error); + return next(new ApiError(403, "Forbidden.")); + } + + next(); + } +} + +module.exports = AdministratorAuthenticationMiddleware; diff --git a/src/api/middlewares/ErrorHandlingMiddleware.js b/src/api/middlewares/ErrorHandlingMiddleware.js new file mode 100644 index 00000000..8cdf5d2e --- /dev/null +++ b/src/api/middlewares/ErrorHandlingMiddleware.js @@ -0,0 +1,46 @@ +const ApiError = require("../ApiError"); + +class ErrorHandlingMiddleware { + /** + * API Error handler used as a middleware. Triggered only by thrown Error by + * us + * @param err + * @param req + * @param res + * @param next + */ + static apiErrorHandler(err, req, res, next) { + if (err instanceof ApiError) { + res.status(err.code).json(err.message); + } else { + // This should not happen. If an error is thrown using NEXT it should be + // API Error. + console.log( + "An error occurred. Normal error was thrown using next, and not " + + `using API Error object - ${err}. Error stack: ${err.stack}` + ); + res.status(500).json("Internal Server Error"); + } + next(); + } + + /** + * Global Error Handler that handles unexpected throws (NOT BY US) + * @returns {Function} + * @param f + */ + static globalErrorHandler(f) { + return async (req, res, next) => { + try { + await f(req, res, next); + } catch (error) { + console.log( + `Something went wrong while executing request. ${error.stack}` + ); + res.status(500).json("Internal Server Error"); + } + }; + } +} + +module.exports = ErrorHandlingMiddleware; diff --git a/src/api/middlewares/EventValidationMiddleware.js b/src/api/middlewares/EventValidationMiddleware.js new file mode 100644 index 00000000..dcf2a88f --- /dev/null +++ b/src/api/middlewares/EventValidationMiddleware.js @@ -0,0 +1,130 @@ +const ApiError = require("../ApiError"); +const { BigNumber } = require("ethers"); + +class EventValidationMiddleware { + constructor(eventRepository) { + this.eventRepository = eventRepository; + } + + async validateUserVoucherMetadata(req, res, next) { + if (!req.body) { + console.log("Empty body sent while, trying to update a user voucher!"); + return next(new ApiError(400, "Bad request.")); + } + + if ( + !Object.prototype.hasOwnProperty.call(req.body, "_tokenIdVoucher") || + !req.body._tokenIdVoucher + ) { + console.log("_tokenIdVoucher is empty!"); + return next(new ApiError(400, "Bad request.")); + } + + next(); + } + + // ERC1155 TransferSingle / TransferBatch Validation + async validateVoucherMetadataOnTransfer(req, res, next) { + const metadata = req.body; + + if (!metadata || Object.keys(metadata).length === 0) { + console.log("Empty body sent while, trying to update a voucher!"); + return next(new ApiError(400, "Bad request.")); + } + + if (!metadata.voucherOwner) { + console.log("Does not have voucherOwner field!"); + return next(new ApiError(400, "Bad request.")); + } + + if ( + !Object.prototype.hasOwnProperty.call(metadata, "voucherSupplies") || + !metadata.voucherSupplies || + !metadata.voucherSupplies.length + ) { + console.log("Does not have voucherSupplies to update"); + return next(new ApiError(400, "Bad request.")); + } + + if (!Object.prototype.hasOwnProperty.call(metadata, "_correlationId")) { + console.log("Does not have _correlationId to update"); + return next(new ApiError(400, "Bad request.")); + } + + try { + BigNumber.from(metadata._correlationId); + } catch (error) { + console.log("Tx ID cannot be casted to BN!"); + return next(new ApiError(400, "Bad request.")); + } + + next(); + } + + async validateVoucherMetadata(req, res, next) { + if (!req.body || Object.keys(req.body).length === 0) { + console.log("Empty body sent while, trying to update a user voucher!"); + return next(new ApiError(400, "Bad request.")); + } + + /*eslint no-prototype-builtins: "error"*/ + if ( + !Object.prototype.hasOwnProperty.call(req.body, "_tokenIdSupply") || + !req.body._tokenIdSupply + ) { + console.log("_tokenIdSupply is missing!"); + return next(new ApiError(400, "Bad request.")); + } + + next(); + } + + async validateEventMetadata(req, res, next) { + if (!req.body._correlationId && !req.body._tokenId) { + return next(new ApiError(400, "Bad request.")); + } + + next(); + } + + async validateEventExistsByCorrelationId(req, res, next) { + let event; + + try { + const metadata = { + name: req.body.name, + _correlationId: req.body._correlationId, + address: req.body.address.toLowerCase(), + }; + + event = await this.eventRepository.findByCorrelationId(metadata); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request.")); + } + + res.locals.event = event; + next(); + } + + async validateEventExistsByTokenId(req, res, next) { + let event; + + try { + const metadata = { + name: req.body.name, + _tokenId: req.body._tokenId, + }; + + event = await this.eventRepository.findByTokenId(metadata); + } catch (error) { + console.log(error.message); + return next(new ApiError(400, "Bad request.")); + } + + res.locals.event = event; + next(); + } +} + +module.exports = EventValidationMiddleware; diff --git a/src/api/middlewares/FileStorageMiddleware.js b/src/api/middlewares/FileStorageMiddleware.js new file mode 100644 index 00000000..1db52459 --- /dev/null +++ b/src/api/middlewares/FileStorageMiddleware.js @@ -0,0 +1,28 @@ +const multer = require("multer"); + +const ApiError = require("../ApiError"); + +class FileStorageMiddleware { + constructor(fieldName, limit, validator, storage) { + this.storage = storage; + this.delegate = multer({ storage }).array(fieldName, limit); + this.validator = validator; + } + + async storeFiles(req, res, next) { + this.delegate(req, res, () => { + req.files = req.files || []; + + if (req.files.some((file) => !this.validator.isValid(file))) { + return this.storage._removeFiles(req, req.files, () => { + req.files = []; + return next(new ApiError(400, "Invalid file.")); + }); + } + + next(); + }); + } +} + +module.exports = FileStorageMiddleware; diff --git a/src/api/middlewares/PaymentValidationMiddleware.js b/src/api/middlewares/PaymentValidationMiddleware.js new file mode 100644 index 00000000..d03fda6b --- /dev/null +++ b/src/api/middlewares/PaymentValidationMiddleware.js @@ -0,0 +1,39 @@ +// @ts-nocheck +const isValid = require("mongoose").isValidObjectId; + +const ApiError = require("./../ApiError"); + +class PaymentValidationMiddleware { + async validatePaymentData(req, res, next) { + const payload = req.body; + + if (!Array.isArray(payload)) { + return next(new ApiError(400, `Payload is not an array!`)); + } + + if (!(typeof payload[0] === "object")) { + return next( + new ApiError(400, `Payload does not contain the required information!`) + ); + } + + if (!Object.prototype.hasOwnProperty.call(payload[0], "_tokenIdVoucher")) { + return next( + new ApiError(400, `Payload is not set to specific Voucher ID!`) + ); + } + + next(); + } + + //TODO ObjectIDs should be validated in all routes, where applicable. Currently on payments route only. + async validateID(req, res, next) { + if (!isValid(req.params.voucherID)) { + return next(new ApiError(400, `Invalid Object ID!`)); + } + + next(); + } +} + +module.exports = PaymentValidationMiddleware; diff --git a/src/api/middlewares/UserAuthenticationMiddleware.js b/src/api/middlewares/UserAuthenticationMiddleware.js new file mode 100644 index 00000000..8c4d4d57 --- /dev/null +++ b/src/api/middlewares/UserAuthenticationMiddleware.js @@ -0,0 +1,50 @@ +// @ts-nocheck +const ApiError = require("./../ApiError"); + +class UserAuthenticationMiddleware { + constructor(gcloudSecret, authenticationService) { + this.gcloudSecret = gcloudSecret; + this.authenticationService = authenticationService; + } + + async authenticateToken(req, res, next) { + const authHeader = req.headers["authorization"]; + const token = authHeader && authHeader.split(" ")[1]; + + if (token == null) { + return next(new ApiError(401, "Unauthorized.")); + } + + try { + const userObj = this.authenticationService.verifyToken(token); + res.locals.address = userObj.user.toLowerCase(); + } catch (error) { + return next(new ApiError(403, "Forbidden.")); + } + + next(); + } + + async authenticateGCLOUDService(req, res, next) { + const authHeader = req.headers["authorization"]; + const token = authHeader && authHeader.split(" ")[1]; + + if (token == null) { + return next(new ApiError(401, "Unauthorized.")); + } + + try { + const payload = this.authenticationService.verifyToken(token); + if (payload.token !== this.gcloudSecret) { + return next(new ApiError(403, "Forbidden.")); + } + } catch (error) { + console.log(error); + return next(new ApiError(403, "Forbidden.")); + } + + next(); + } +} + +module.exports = UserAuthenticationMiddleware; diff --git a/src/api/middlewares/UserValidationMiddleware.js b/src/api/middlewares/UserValidationMiddleware.js new file mode 100644 index 00000000..f40ce258 --- /dev/null +++ b/src/api/middlewares/UserValidationMiddleware.js @@ -0,0 +1,41 @@ +// @ts-nocheck +const ApiError = require("./../ApiError"); + +class UserValidationMiddleware { + constructor(vouchersRepository) { + this.vouchersRepository = vouchersRepository; + } + + async validateMetadata(req, res, next) { + const voucherHolder = req.body._holder; + + if (voucherHolder.toLowerCase() !== res.locals.address) { + return next(new ApiError(403, "Forbidden.")); + } + + next(); + } + + async validateVoucherHolder(req, res, next) { + let userVoucher; + + try { + userVoucher = await this.vouchersRepository.getVoucherById(req.body._id); + } catch (error) { + return next(new ApiError(404, "Voucher not found!")); + } + + if ( + userVoucher._holder !== res.locals.address && + userVoucher.voucherOwner !== res.locals.address + ) { + return next(new ApiError(403, "Forbidden.")); + } + + res.locals.userVoucher = userVoucher; + + next(); + } +} + +module.exports = UserValidationMiddleware; diff --git a/src/api/middlewares/VoucherSupplyValidationMiddleware.js b/src/api/middlewares/VoucherSupplyValidationMiddleware.js new file mode 100644 index 00000000..328848c7 --- /dev/null +++ b/src/api/middlewares/VoucherSupplyValidationMiddleware.js @@ -0,0 +1,187 @@ +const ApiError = require("../ApiError"); + +class VoucherSupplyValidationMiddleware { + constructor(voucherSuppliesRepository) { + this.voucherSuppliesRepository = voucherSuppliesRepository; + } + + async validateVoucherSupplyExists(req, res, next) { + let voucherSupply; + const voucherSupplyId = req.params.id; + + try { + voucherSupply = await this.voucherSuppliesRepository.getVoucherSupplyById( + voucherSupplyId + ); + } catch (error) { + return next( + new ApiError( + 404, + `VoucherSupply with ID: ${voucherSupplyId} does not exist!` + ) + ); + } + + if (!voucherSupply) { + return next( + new ApiError(400, `Voucher with ID: ${voucherSupplyId} does not exist!`) + ); + } + + res.locals.voucherSupply = voucherSupply; + + next(); + } + + async validateVoucherSupplyByCorrelationIdDoesNotExist(req, res, next) { + let voucherSupply; + const metadata = { + voucherOwner: res.locals.address, + _correlationId: req.body._correlationId, + }; + + try { + voucherSupply = await this.voucherSuppliesRepository.getVoucherSupplyByOwnerAndCorrelationId( + metadata + ); + + if (voucherSupply) { + throw new Error( + `VoucherSupply for User: ${res.locals.address} and CorrelationID: ${req.body._correlationId} already exits!` + ); + } + } catch (error) { + console.log(error.message); + return next( + new ApiError( + 400, + `VoucherSupply for User: ${res.locals.address} and CorrelationID: ${req.body._correlationId} already exits!` + ) + ); + } + + next(); + } + + async validateVoucherSupplyExistsByOwnerAndCorrelationId(req, res, next) { + let voucherSupply; + + try { + voucherSupply = await this.voucherSuppliesRepository.getVoucherSupplyByOwnerAndCorrelationId( + req.body + ); + } catch (error) { + return next( + new ApiError( + 404, + `VoucherSupply with Owner: ${req.body.voucherOwner} and CorrelationID: ${req.body._correlationId} does not exist!` + ) + ); + } + + if (!voucherSupply) { + return next( + new ApiError( + 400, + `Voucher with Owner: ${req.body.voucherOwner} and CorrelationID: ${req.body._correlationId} does not exist!` + ) + ); + } + + res.locals.voucherSupply = voucherSupply; + + next(); + } + + async validateCanDelete(req, res, next) { + if (res.locals.voucherSupply.voucherOwner !== res.locals.address) { + return next(new ApiError(401, "Unauthorized.")); + } + next(); + } + + async validateCanUpdateVoucherSupply(req, res, next) { + if (res.locals.voucherSupply.voucherOwner !== res.locals.address) { + return next(new ApiError(401, "Unauthorized.")); + } + + next(); + } + + async validateDates(req, res, next) { + const start = new Date(); + start.setHours(0, 0, 0, 0); + + const today = new Date(start).getTime(); + const startDateToMillis = new Date(req.body.startDate).getTime(); + const endDateToMillis = new Date(req.body.expiryDate).getTime(); + + if (startDateToMillis < today || endDateToMillis < startDateToMillis) { + return next(new ApiError(400, "Invalid Dates.")); + } + + next(); + } + + async validateLocation(req, res, next) { + const minExpectedLocationProps = [ + "country", + "city", + "addressLineOne", + "postcode", + ]; + + const maxExpectedLocationProps = [ + "country", + "city", + "addressLineOne", + "addressLineTwo", + "postcode", + ]; + + if (!req.body.location) { + return next(new ApiError(400, "Location missing!")); + } + + let parsedLocation; + try { + parsedLocation = JSON.parse(req.body.location); + } catch (error) { + return next(new ApiError(400, "Bad request!")); + } + + const isObject = + typeof parsedLocation === "object" && parsedLocation !== null; + + if (!isObject) { + return next(new ApiError(400, "Provided Location is not an Object!")); + } + + if (Object.keys(parsedLocation).length < minExpectedLocationProps.length) { + return next( + new ApiError( + 400, + "Location object properties does not correspond to the required length!" + ) + ); + } + + const receivedLocationProps = Object.getOwnPropertyNames(parsedLocation); + if ( + minExpectedLocationProps.sort().join(",") !== + receivedLocationProps.sort().join(",") && + maxExpectedLocationProps.sort().join(",") !== + receivedLocationProps.sort().join(",") + ) { + return next( + new ApiError(400, "Location must contain all required fields") + ); + } + + res.locals.location = parsedLocation; + + next(); + } +} + +module.exports = VoucherSupplyValidationMiddleware; diff --git a/src/api/middlewares/VoucherValidationMiddleware.js b/src/api/middlewares/VoucherValidationMiddleware.js new file mode 100644 index 00000000..14c7632e --- /dev/null +++ b/src/api/middlewares/VoucherValidationMiddleware.js @@ -0,0 +1,59 @@ +const ApiError = require("../ApiError"); +const voucherStatuses = require("../../utils/voucherStatuses"); + +class VoucherValidationMiddleware { + constructor(vouchersRepository) { + this.vouchersRepository = vouchersRepository; + } + + async validateVoucherByCorrelationIdDoesNotExist(req, res, next) { + let voucher; + const metadata = { + _holder: res.locals.address, + _correlationId: req.body._correlationId, + }; + + try { + voucher = await this.vouchersRepository.getVoucherByOwnerAndCorrelationId( + metadata + ); + + if (voucher) { + throw new Error( + `VoucherSupply for User: ${res.locals.address} and CorrelationID: ${req.body._correlationId} already exits!` + ); + } + } catch (error) { + console.log(error.message); + return next( + new ApiError( + 400, + `VoucherSupply for User: ${res.locals.address} and CorrelationID: ${req.body._correlationId} already exits!` + ) + ); + } + + next(); + } + + async validateVoucherStatus(req, res, next) { + const status = Array.isArray(req.body) + ? req.body[0].status + : req.body.status; // support keeper's body (array) + + const validVoucherStatuses = Object.values(voucherStatuses); // extract as array + + if (!validVoucherStatuses.includes(status)) { + return next( + new ApiError( + 400, + `UPDATE voucher operation could not be completed with invalid status: ${status}` + ) + ); + } + + next(); + } +} + +module.exports = VoucherValidationMiddleware; diff --git a/src/api/middlewares/admin-auth.js b/src/api/middlewares/admin-auth.js deleted file mode 100644 index c9c3e276..00000000 --- a/src/api/middlewares/admin-auth.js +++ /dev/null @@ -1,38 +0,0 @@ -//@ts-nocheck -const APIError = require('./../api-error'); -const AuthService = require('../services/auth-service') -const mongooseService = require('../../database/index.js'); -const roles = require('../../database/User/user-roles') - -class AdminAuth { - - static async validateAdminAccess(req, res, next) { - - const authHeader = req.headers['authorization'] - const token = authHeader && authHeader.split(' ')[1] - - if (token == null) { - return next(new APIError(401, 'Unauthorized.')) - } - - try { - const userObj = await AuthService.verifyToken(token) - const ethAddress = userObj.user.toLowerCase() - const user = await mongooseService.getUser(ethAddress) - - if (user.role != roles.ADMIN) { - return next(new APIError(403, 'User is not admin!')); - } - - res.locals.address = ethAddress; - - } catch (error) { - console.log(error); - return next(new APIError(403, 'Forbidden.')) - } - - next(); - } -} - -module.exports = AdminAuth \ No newline at end of file diff --git a/src/api/middlewares/authentication.js b/src/api/middlewares/authentication.js deleted file mode 100644 index 38cd668e..00000000 --- a/src/api/middlewares/authentication.js +++ /dev/null @@ -1,53 +0,0 @@ -//@ts-nocheck -const APIError = require('./../api-error'); -const AuthService = require('../services/auth-service') - -class Authentication { - - static async authenticateToken(req, res, next) { - - const authHeader = req.headers['authorization'] - const token = authHeader && authHeader.split(' ')[1] - - if (token == null) { - return next(new APIError(401, 'Unauthorized.')) - } - - try { - const userObj = await AuthService.verifyToken(token) - res.locals.address = userObj.user.toLowerCase() - } catch (error) { - return next(new APIError(403, 'Forbidden.')) - } - - next(); - } - - static async authenticateGCLOUDService(req, res, next) { - //TODO add process.env.GCLOUD_SECRET in the GCP, otherwise this will always revert - - // const authHeader = req.headers['authorization'] - // const token = authHeader && authHeader.split(' ')[1] - // if (token == null) { - // return next(new APIError(401, 'Unauthorized.')) - // } - - // try { - // const payload = await AuthService.verifyToken(token) - // if (payload.token != process.env.GCLOUD_SECRET) { - // return next(new APIError(403, 'Forbidden.')) - // } - - res.locals.events = req.body; - - // } catch (error) { - // console.log(error); - // return next(new APIError(403, 'Forbidden.')) - // } - - next(); - } - -} - -module.exports = Authentication; diff --git a/src/api/middlewares/error-handler.js b/src/api/middlewares/error-handler.js deleted file mode 100644 index 7edfde54..00000000 --- a/src/api/middlewares/error-handler.js +++ /dev/null @@ -1,40 +0,0 @@ -const APIError = require('../api-error'); - -class ErrorHandlers { - - /** - * API Error handler used as a middleware. Triggered only by thrown Error by us - * @param err - * @param req - * @param res - * @param next - */ - static apiErrorHandler (err, req, res, next) { - if (err instanceof APIError) { - res.status(err.code).json(err.message); - } else { - // This should not happen. If an error is thrown using NEXT it should be API Error. - console.error(`An error occurred. Normal error was thrown using next, and not using API Error object - ${err}. Error stack: ${err.stack}`); - res.status(500).json('Internal Server Error'); - } - } - - /** - * Global Error Handler that handles unexpected throws (NOT BY US) - * @returns {Function} - * @param f - */ - static globalErrorHandler (f) { - return async(req, res, next) => { - try { - await f(req, res, next); - } catch (error) { - console.error(`Something went wrong while executing request. ${error.stack}`); - res.status(500).json('Internal Server Error'); - } - } - } - -} - -module.exports = ErrorHandlers; \ No newline at end of file diff --git a/src/api/middlewares/user-validator.js b/src/api/middlewares/user-validator.js deleted file mode 100644 index e28b2127..00000000 --- a/src/api/middlewares/user-validator.js +++ /dev/null @@ -1,32 +0,0 @@ -//@ts-nocheck - -const APIError = require('./../api-error'); -const mongooseService = require('../../database/index.js'); - -class UserValidator { - - static async ValidateMetadata(req, res, next) { - const voucherHolder = req.body._holder - - if (voucherHolder.toLowerCase() != res.locals.address) { - return next(new APIError(403, 'Forbidden.')) - } - - next(); - } - - static async ValidateVoucherHolder(req, res, next) { - const userVoucher = await mongooseService.findUserVoucherById(req.body._id) - - if (userVoucher._holder != res.locals.address && userVoucher.voucherOwner != res.locals.address) { - return next(new APIError(403, 'Forbidden.')) - } - - res.locals.userVoucher = userVoucher; - - next(); - } - -} - -module.exports = UserValidator; \ No newline at end of file diff --git a/src/api/middlewares/voucher-validator.js b/src/api/middlewares/voucher-validator.js deleted file mode 100644 index c8e30f77..00000000 --- a/src/api/middlewares/voucher-validator.js +++ /dev/null @@ -1,37 +0,0 @@ -const APIError = require('./../api-error'); -const AuthService = require('../services/auth-service') -const mongooseService = require('../../database/index.js'); -const { mongo } = require('mongoose'); - -class VoucherValidator { - - static async ValidateVoucherExists(req, res, next) { - const voucher = await mongooseService.getVoucher(req.params.id); - - if (!voucher) { - return next(new APIError(`Voucher with ID: ${req.params.id} does not exist!`)) - } - - res.locals.voucher = voucher - - next(); - } - - static async ValidateCanDelete(req, res, next) { - if (res.locals.voucher.voucherOwner != res.locals.address) { - return next(new APIError(401, 'Unauthorized.')) - } - next(); - } - - static async ValidateCanUpdateVoucher(req, res, next) { - if (res.locals.voucher.voucherOwner != res.locals.address) { - return next(new APIError(401, 'Unauthorized.')) - } - - next(); - } - -} - -module.exports = VoucherValidator; \ No newline at end of file diff --git a/src/api/routes/admin-route.js b/src/api/routes/admin-route.js deleted file mode 100644 index 642af5e8..00000000 --- a/src/api/routes/admin-route.js +++ /dev/null @@ -1,22 +0,0 @@ -const AdminController = require('../controllers/admin-controller'); -const ErrorHandlers = require('../middlewares/error-handler'); -const AdminAuth = require('../middlewares/admin-auth'); - -class UserVoucherController { - - static route(expressApp) { - let router = expressApp.Router(); - - router.patch('/:address', - ErrorHandlers.globalErrorHandler(AdminAuth.validateAdminAccess), - ErrorHandlers.globalErrorHandler(AdminController.makeAdmin)); - - router.patch('/updateVisibleStatus/:voucherID', - ErrorHandlers.globalErrorHandler(AdminAuth.validateAdminAccess), - ErrorHandlers.globalErrorHandler(AdminController.changeTokenSupplyIDVisibility)); - - return router; - } -} - -module.exports = UserVoucherController; diff --git a/src/api/routes/payments-route.js b/src/api/routes/payments-route.js deleted file mode 100644 index 26c47c37..00000000 --- a/src/api/routes/payments-route.js +++ /dev/null @@ -1,26 +0,0 @@ -const paymentsController = require('../controllers/payment-controller'); -const ErrorHandlers = require('../middlewares/error-handler'); -const authenticationMiddleware = require('../middlewares/authentication'); - -class UserVoucherController { - - static route(expressApp) { - let router = expressApp.Router(); - router.get('/check-payment/:tokenIdVoucher', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateGCLOUDService), - ErrorHandlers.globalErrorHandler(paymentsController.getPaymentsByVoucherID)); - - router.get('/:voucherID', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(paymentsController.getPaymentActors)); - - router.post('/create-payment', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateGCLOUDService), - ErrorHandlers.globalErrorHandler(paymentsController.createPayments)); - - - return router; - } -} - -module.exports = UserVoucherController; diff --git a/src/api/routes/user-vouchers-route.js b/src/api/routes/user-vouchers-route.js deleted file mode 100644 index 5865cbbb..00000000 --- a/src/api/routes/user-vouchers-route.js +++ /dev/null @@ -1,40 +0,0 @@ -const userVoucherController = require('../controllers/user-vouchers-controller'); -const ErrorHandlers = require('../middlewares/error-handler'); -const userValidator = require('../middlewares/user-validator') -const authenticationMiddleware = require('../middlewares/authentication'); - -class UserVoucherController { - - static route(expressApp) { - let router = expressApp.Router(); - - router.get('/', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(userVoucherController.getMyVouchers)); - - router.get('/:voucherID/voucher-details', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(userVoucherController.getVoucherDetails)); - - router.get('/buyers/:voucherID', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(userVoucherController.getBuyersByVoucherID)); - - router.get('/all', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateGCLOUDService), - ErrorHandlers.globalErrorHandler(userVoucherController.getAllVouchers)); - - router.patch('/update', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(userValidator.ValidateVoucherHolder), - ErrorHandlers.globalErrorHandler(userVoucherController.updateMyVoucher)); - - router.patch('/finalize', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateGCLOUDService), - ErrorHandlers.globalErrorHandler(userVoucherController.finalizeVoucher)); - - return router; - } -} - -module.exports = UserVoucherController; diff --git a/src/api/routes/users-route.js b/src/api/routes/users-route.js deleted file mode 100644 index 749991a1..00000000 --- a/src/api/routes/users-route.js +++ /dev/null @@ -1,30 +0,0 @@ -const usersController = require('../controllers/users-controller'); -const ErrorHandlers = require('../middlewares/error-handler'); -const UserValidator = require('../middlewares/user-validator') -const authenticationMiddleware = require('../middlewares/authentication'); - -class UsersRouter { - - static route(expressApp) { - let router = expressApp.Router(); - - router.get('/:address/is-registered', - ErrorHandlers.globalErrorHandler(usersController.isUserRegistered)); - - router.post('/:address', - ErrorHandlers.globalErrorHandler(usersController.generateNonce)); - - router.post('/:address/verify-signature', - ErrorHandlers.globalErrorHandler(usersController.verifySignature)) - - router.post('/:voucherID/buy', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(UserValidator.ValidateMetadata), - ErrorHandlers.globalErrorHandler(usersController.commitToBuy)) - - - return router; - } -} - -module.exports = UsersRouter; diff --git a/src/api/routes/vouchers-route.js b/src/api/routes/vouchers-route.js deleted file mode 100644 index bf9d0b2f..00000000 --- a/src/api/routes/vouchers-route.js +++ /dev/null @@ -1,67 +0,0 @@ -const vouchersController = require('../controllers/vouchers-controller'); -const ErrorHandlers = require('../middlewares/error-handler'); -const authenticationMiddleware = require('../middlewares/authentication'); -const voucherValidator = require('../middlewares/voucher-validator') - -const os = require('os'); -const multer = require('multer'); -const storage = multer.diskStorage({}); -const FILE_LIMIT = 10; -const upload = multer({ storage }); - -class VouchersRouter { - - static route(expressApp) { - let router = expressApp.Router(); - - router.post('/', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(upload.array('fileToUpload', FILE_LIMIT)), - ErrorHandlers.globalErrorHandler(vouchersController.createVoucher)); - - router.get('/:id', - ErrorHandlers.globalErrorHandler(vouchersController.getVoucher)); - - router.get('/seller-vouchers/status', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(vouchersController.getVouchersStatus)); - - router.get('/seller-vouchers/active', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(vouchersController.getAllActiveVouchers)); - - router.get('/seller-vouchers/inactive', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(vouchersController.getAllInactiveVouchers)); - - router.get('/sell/:address', - ErrorHandlers.globalErrorHandler(vouchersController.getSellVouchers)); - - router.get('/buy/:address', - ErrorHandlers.globalErrorHandler(vouchersController.getBuyVouchers)); - - router.patch('/:id', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(upload.array('fileToUpload', FILE_LIMIT)), - ErrorHandlers.globalErrorHandler(voucherValidator.ValidateVoucherExists), - ErrorHandlers.globalErrorHandler(voucherValidator.ValidateCanUpdateVoucher), - ErrorHandlers.globalErrorHandler(vouchersController.updateVoucher)); - - router.delete('/:id', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(voucherValidator.ValidateVoucherExists), - ErrorHandlers.globalErrorHandler(voucherValidator.ValidateCanDelete), - ErrorHandlers.globalErrorHandler(vouchersController.deleteVoucher)); - - router.delete( - '/:id/image', - ErrorHandlers.globalErrorHandler(authenticationMiddleware.authenticateToken), - ErrorHandlers.globalErrorHandler(voucherValidator.ValidateVoucherExists), - ErrorHandlers.globalErrorHandler(voucherValidator.ValidateCanDelete), - ErrorHandlers.globalErrorHandler(vouchersController.deleteImage)); - - return router; - } -} - -module.exports = VouchersRouter; diff --git a/src/api/services/auth-service.js b/src/api/services/auth-service.js deleted file mode 100644 index 2c212aaa..00000000 --- a/src/api/services/auth-service.js +++ /dev/null @@ -1,54 +0,0 @@ -const APIError = require('../api-error'); -const jwt = require('jsonwebtoken'); -const utils = require('ethers').utils - -class AuthService { - - static async authenticateToken(req, res, next) { - - const authHeader = req.headers['authorization'] - const token = authHeader && authHeader.split(' ')[1] - - if (token == null) { - return next(new APIError(401, 'Unauthorized.')) - } - - try { - const user = await jwt.verify(token, process.env.TOKEN_SECRET) - res.locals.address = user - - } catch (error) { - return next(new APIError(403, 'Forbidden.')) - } - - next(); - } - - static async isSignatureVerified(address, nonce, signature) { - const msg = '\x19Ethereum Signed Message:\n' + nonce - const msgHash = utils.hashMessage(msg); - const msgHashBytes = utils.arrayify(msgHash); - const recoveredAddress = utils.recoverAddress(msgHashBytes, signature); - - if (address !== recoveredAddress) { - return false - } - - return true - } - - static generateAccessToken(address) { - const payload = { - user: address - } - - return jwt.sign(payload, process.env.TOKEN_SECRET, { expiresIn: '180d' }); - } - - static async verifyToken(token) { - return await jwt.verify(token, process.env.TOKEN_SECRET) - } - -} - -module.exports = AuthService; \ No newline at end of file diff --git a/src/clients/MongooseClient.js b/src/clients/MongooseClient.js new file mode 100644 index 00000000..53015579 --- /dev/null +++ b/src/clients/MongooseClient.js @@ -0,0 +1,33 @@ +const mongoose = require("mongoose"); + +const options = { + useUnifiedTopology: true, + useNewUrlParser: true, + useCreateIndex: true, + useFindAndModify: false, +}; + +class MongooseClient { + constructor( + databaseConnectionString, + databaseName, + databaseUsername, + databasePassword + ) { + this.databaseConnectionString = databaseConnectionString; + this.databaseName = databaseName; + this.databaseUsername = databaseUsername; + this.databasePassword = databasePassword; + } + + connect() { + return mongoose.connect(this.databaseConnectionString, { + ...options, + dbName: this.databaseName, + user: this.databaseUsername, + pass: this.databasePassword, + }); + } +} + +module.exports = MongooseClient; diff --git a/src/clients/mongoose-client.js b/src/clients/mongoose-client.js deleted file mode 100644 index d39856f4..00000000 --- a/src/clients/mongoose-client.js +++ /dev/null @@ -1,25 +0,0 @@ -const mongoose = require('mongoose') - -const url = process.env.DB_CONNECTION_STRING -const options = { - useUnifiedTopology: true, - useNewUrlParser: true, - useCreateIndex: true -} - -let instance; - -module.exports = class MongooseClient { - static getInstance() { - if (!instance) { - instance = MongooseClient.connect(); - } - - return instance; - } - - static connect() { - return mongoose.connect(url, options) - } - -} \ No newline at end of file diff --git a/src/database/Event/EventsRepository.js b/src/database/Event/EventsRepository.js new file mode 100644 index 00000000..d028205e --- /dev/null +++ b/src/database/Event/EventsRepository.js @@ -0,0 +1,61 @@ +// @ts-nocheck +const Event = require("../models/Event"); + +class EventsRepository { + async create({ name, address: address, _correlationId, _tokenId }) { + const event = new Event({ + name, + address: address, + _correlationId, + _tokenId, + }); + + return await event.save(); + } + + async update(event) { + event.eventDetected = true; + return await event.save(); + } + + async findByCorrelationId(metadata) { + const event = await Event.findOne({ + name: metadata.name, + _correlationId: metadata._correlationId, + address: metadata.address, + }); + + if (!event) { + throw new Error( + `Event ${metadata.name} with Correlation Id: ${metadata._correlationId} for User: ${metadata.address} does not exist!` + ); + } + + return event; + } + + async findByTokenId(metadata) { + const event = await Event.findOne({ + name: metadata.name, + _tokenId: metadata._tokenId, + }); + + if (!event) { + throw new Error( + `Event ${metadata.name} with Token Id: ${metadata._tokenId} does not exist!` + ); + } + + return event; + } + + async getAllDetected() { + return await Event.find({ eventDetected: true }); + } + + async getAllFailed() { + return await Event.find({ eventDetected: false }); + } +} + +module.exports = EventsRepository; diff --git a/src/database/Payment/PaymentsRepository.js b/src/database/Payment/PaymentsRepository.js new file mode 100644 index 00000000..31854580 --- /dev/null +++ b/src/database/Payment/PaymentsRepository.js @@ -0,0 +1,22 @@ +// @ts-nocheck +const Payment = require("../models/Payment"); + +class PaymentsRepository { + async createPayment(metadata) { + const payment = new Payment({ + _tokenIdVoucher: metadata._tokenIdVoucher, + _to: metadata._to, + _payment: metadata._payment, + _type: metadata._type, + txHash: metadata.txHash, + }); + + await payment.save(); + } + + async getPaymentsByVoucherTokenId(voucherTokenId) { + return Payment.where("_tokenIdVoucher").equals(voucherTokenId); + } +} + +module.exports = PaymentsRepository; diff --git a/src/database/Payment/payment.js b/src/database/Payment/payment.js deleted file mode 100644 index c41e384c..00000000 --- a/src/database/Payment/payment.js +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-nocheck -const Payment = require('../models/Payment') - -class PaymentService { - - static async createPayment(metadata) { - - const payment = new Payment({ - _tokenIdVoucher: metadata._tokenIdVoucher, - _to: metadata._to, - _payment: metadata._payment, - _type: metadata._type, - txHash: metadata.txHash - }) - - await payment.save(); - } - - static async getPaymentsByVoucherID(_tokenIdVoucher) { - return await Payment - .where('_tokenIdVoucher').equals(_tokenIdVoucher) - } - -} - -module.exports = PaymentService diff --git a/src/database/User/UsersRepository.js b/src/database/User/UsersRepository.js new file mode 100644 index 00000000..d7e5d26d --- /dev/null +++ b/src/database/User/UsersRepository.js @@ -0,0 +1,51 @@ +// @ts-nocheck +const User = require("../models/User"); +const userRoles = require("./userRoles"); + +class UsersRepository { + async getNonce(address) { + const user = await User.findOne({ address }); + return user.nonce; + } + + async getUser(address) { + return User.findOne({ address }); + } + + async createUser(address, nonce) { + const user = new User({ + address, + nonce, + role: userRoles.USER, + }); + + await user.save(); + } + + async setUserToAdmin(address) { + return User.findOneAndUpdate( + { address: address }, + { role: userRoles.ADMIN }, + { new: true, upsert: true } + ); + } + + async preserveNonce(address, nonce) { + const user = await User.findOne({ address: address }); + + if (!user) { + return this.createUser(address, nonce); + } + + await User.findOneAndUpdate( + { address: address }, + { + address, + nonce, + }, + { new: true, upsert: true } + ); + } +} + +module.exports = UsersRepository; diff --git a/src/database/User/user-roles.js b/src/database/User/user-roles.js deleted file mode 100644 index b9b11525..00000000 --- a/src/database/User/user-roles.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - ADMIN: 'admin', - USER: 'user' -} \ No newline at end of file diff --git a/src/database/User/user.js b/src/database/User/user.js deleted file mode 100644 index f539afef..00000000 --- a/src/database/User/user.js +++ /dev/null @@ -1,59 +0,0 @@ -// @ts-nocheck -const User = require('../models/User') -const userRoles = require('./user-roles'); - -class UserService { - - static async isUserRegistered(address) { - let user = await User.findOne({ address }) - return user ? true : false; - } - - static async getNonce(address) { - let user = await User.findOne({ address }) - return user.nonce; - } - - static async getUser(address) { - return await User.findOne({ address }) - } - - static async createUser(address, nonce) { - const user = new User({ - address, - nonce, - role: userRoles.USER - }) - - await user.save(); - } - - static async setUserToAdmin(address) { - return await User.findOneAndUpdate( - { address: address }, - { role: userRoles.ADMIN}, - { new: true, upsert: true } - ) - } - - static async preserveNonce(address, nonce) { - - const user = await User.findOne({ address: address }) - - if (!user) { - return await UserService.createUser(address, nonce); - } - - await User.findOneAndUpdate( - { address: address}, - { - address, - nonce, - }, - { new: true, upsert: true } - ) - } - -} - -module.exports = UserService \ No newline at end of file diff --git a/src/database/User/userRoles.js b/src/database/User/userRoles.js new file mode 100644 index 00000000..607f84d6 --- /dev/null +++ b/src/database/User/userRoles.js @@ -0,0 +1,4 @@ +module.exports = { + ADMIN: "admin", + USER: "user", +}; diff --git a/src/database/UserVoucher/userVoucher.js b/src/database/UserVoucher/userVoucher.js deleted file mode 100644 index 1145d6a5..00000000 --- a/src/database/UserVoucher/userVoucher.js +++ /dev/null @@ -1,71 +0,0 @@ -const UserVoucher = require('../models/UserVoucher') -const status = require('../../utils/userVoucherStatus') - -class UserVoucherService { - static async createUserVoucher(metadata, voucherID) { - return await UserVoucher.findOneAndUpdate( - { _tokenIdVoucher: metadata._tokenIdVoucher }, - { - voucherID: voucherID, - txHash: metadata.txHash, - _holder: metadata._holder.toLowerCase(), - _promiseId: metadata._promiseId, - _tokenIdSupply: metadata._tokenIdSupply, - _tokenIdVoucher: metadata._tokenIdVoucher, - [status.COMMITTED]: new Date().getTime(), - [status.CANCELLED]: '', - [status.COMPLAINED]: '', - [status.REDEEMED]: '', - [status.REFUNDED]: '', - [status.FINALIZED]: '', - voucherOwner: metadata._issuer.toLowerCase(), - actionDate: new Date().getTime() - }, - { new: true, upsert: true } - ) - } - - static async getMyVouchers(userAddress) { - return await UserVoucher.find({ _holder: userAddress }).sort({ actionDate: 'desc' }) - } - - static async getMyVoucherByID(voucherID) { - return await UserVoucher.findById(voucherID) - } - - static async findUserVoucherById(myVoucherId) { - return await UserVoucher.findById(myVoucherId) - } - - static async findAllUsersByVoucherID(voucherID, owner) { - return await UserVoucher - .where('voucherID').equals(voucherID) - .where('voucherOwner').equals(owner) - // removed for POC to be able to show table with statuses when cancel or fault is executed - // .where(status.CANCELLED).equals('') - } - - static async updateMyVoucherStatus(voucherID, status) { - return await UserVoucher.findByIdAndUpdate(voucherID, - { - [status]: new Date().getTime() - }, - { useFindAndModify: false, new: true, upsert: true, } - ) - } - - static async finalizeVoucher(tokenID, status) { - return await UserVoucher.findOneAndUpdate({ _tokenIdVoucher: tokenID }, - { - [status]: new Date().getTime() - }, - { useFindAndModify: false, new: true, upsert: true, } - ) - } - - static async getAllVouchers() { - return UserVoucher.find({}); - } -} - -module.exports = UserVoucherService; diff --git a/src/database/Voucher/VouchersRepository.js b/src/database/Voucher/VouchersRepository.js new file mode 100644 index 00000000..ec7439c3 --- /dev/null +++ b/src/database/Voucher/VouchersRepository.js @@ -0,0 +1,111 @@ +const Voucher = require("../models/Voucher"); +const voucherStatuses = require("../../utils/voucherStatuses"); + +// TODO: Rename supplyID to supplyId to match other IDs. +// TODO: Discuss lowercase owner address consistency +// TODO: Discuss lowercase holder address consistency +class VouchersRepository { + async createVoucher(metadata, voucherSupplyId) { + const voucher = new Voucher({ + supplyID: voucherSupplyId, + _holder: metadata._holder.toLowerCase(), + _tokenIdSupply: metadata._tokenIdSupply, + _tokenIdVoucher: metadata._tokenIdVoucher, + [voucherStatuses.COMMITTED]: new Date().getTime(), + [voucherStatuses.CANCELLED]: null, + [voucherStatuses.COMPLAINED]: null, + [voucherStatuses.REDEEMED]: null, + [voucherStatuses.REFUNDED]: null, + [voucherStatuses.EXPIRED]: null, + [voucherStatuses.FINALIZED]: null, + voucherOwner: metadata._issuer.toLowerCase(), + actionDate: new Date().getTime(), + _correlationId: metadata._correlationId, + blockchainAnchored: false, + }); + + return voucher.save(); + } + + async updateVoucherDelivered(metadata) { + const voucher = await Voucher.findOne({ + _correlationId: metadata._correlationId, + _holder: metadata._holder.toLowerCase(), + _tokenIdSupply: metadata._tokenIdSupply, + }); + + if (!voucher) { + throw new Error( + `No Voucher found for supplyID: ${ + metadata._tokenIdSupply + } holder: ${metadata._holder.toLowerCase()} correlationId: ${ + metadata._correlationId + }` + ); + } + + voucher._tokenIdVoucher = metadata._tokenIdVoucher; + voucher._promiseId = metadata._promiseId; + voucher.voucherOwner = metadata._issuer; + voucher.blockchainAnchored = true; + + return await voucher.save(); + } + + async updateVoucherOnCommonEvent(voucherID, metadata) { + const voucher = await Voucher.findById(voucherID); + for (const prop in metadata) { + voucher[prop] = metadata[prop]; + } + + return await voucher.save(); + } + + async updateStatusFromKeepers(voucherTokenId, status) { + const voucher = await this.getVoucherByVoucherTokenId(voucherTokenId); + if (!voucher) { + throw new Error("Voucher not found"); + } + + voucher[status] = Date.now(); + return await voucher.save(); + } + + async getAllVouchers() { + return Voucher.find({ blockchainAnchored: true }); + } + + async getAllVouchersByVoucherSupplyIdAndOwner(voucherSupplyId, owner) { + return Voucher.where("supplyID") + .equals(voucherSupplyId) + .where("voucherOwner") + .equals(owner) + .where("blockchainAnchored") + .equals(true); + // removed for POC to be able to show table with statuses when cancel or fault is executed + // .where(status.CANCELLED).equals('') + } + + async getAllVouchersByHolder(holder) { + return Voucher.find({ _holder: holder, blockchainAnchored: true }).sort({ + actionDate: "desc", + }); + } + + async getVoucherById(voucherID) { + return Voucher.findById(voucherID); + } + + async getVoucherByVoucherTokenId(voucherTokenId) { + return Voucher.findOne({ _tokenIdVoucher: voucherTokenId }); + } + + async getVoucherByOwnerAndCorrelationId(metadata) { + return Voucher.findOne({ + _holder: metadata._holder, + _correlationId: metadata._correlationId, + }); + } +} + +module.exports = VouchersRepository; diff --git a/src/database/Voucher/voucher.js b/src/database/Voucher/voucher.js deleted file mode 100644 index e779a46d..00000000 --- a/src/database/Voucher/voucher.js +++ /dev/null @@ -1,158 +0,0 @@ -//@ts-nocheck -const Voucher = require('../models/Voucher') - -class VoucherService { - - static async getVouchersByOwner(voucherOwner) { - return await Voucher.where('voucherOwner').equals(voucherOwner).select(['title', 'price', 'description', 'imagefiles', 'expiryDate', 'startDate', 'qty', 'visible']).sort({ offeredDate: 'desc' }).lean() - } - - static async getVouchersByBuyer(voucherOwner) { - const today = new Date(Date.now()) - - return await Voucher.where('voucherOwner') - .ne(voucherOwner) - .where('startDate').lte(today) - .where('expiryDate').gte(today) - .where('qty').gt(0) - .select(['title', 'price', 'description', 'imagefiles', 'expiryDate', 'visible']) - .sort({ offeredDate: 'desc' }).lean() - } - - static async getActiveVouchers(address) { - const today = new Date(Date.now()) - - return await Voucher - .where('voucherOwner').equals(address.toLowerCase()) - .where('startDate').lte(today) - .where('expiryDate').gte(today) - .where('qty').gt(0) - .select(['title', 'price', 'voucherOwner','qty', 'description', 'imagefiles', 'startDate', 'expiryDate', 'visible']).sort({ offeredDate: 'desc' }).lean() - } - - static async getInactiveVouchers(address) { - const today = new Date(Date.now()) - - return await Voucher - .where('voucherOwner').equals(address.toLowerCase()) - .or([ - { startDate: { $gte: today } }, - { expiryDate: { $lte: today }}, - { qty: { $lte: 0 } } - ]) - .select(['title', 'price', 'voucherOwner', 'description', 'imagefiles', 'startDate', 'expiryDate', 'visible']).sort({ offeredDate: 'desc' }).lean() - } - - static async createVoucher(metadata, fileRefs, voucherOwner) { - - const voucher = new Voucher({ - title: metadata.title, - qty: metadata.qty, - category: metadata.category, - startDate: metadata.startDate, - expiryDate: metadata.expiryDate, - offeredDate: metadata.offeredDate, - price: metadata.price, - buyerDeposit: metadata.buyerDeposit, - sellerDeposit: metadata.sellerDeposit, - description: metadata.description, - location: metadata.location, - contact: metadata.contact, - conditions: metadata.conditions, - voucherOwner: voucherOwner, - visible: true, - txHash: metadata.txHash, - _tokenIdSupply: metadata._tokenIdSupply, - _promiseId: metadata._promiseId, - imagefiles: fileRefs, - }); - - await voucher.save(); - } - - static async updateVoucher(voucher, metadata, fileRefs) { - const currentImages = voucher.imagefiles; - const updatedImages = [...currentImages, ...fileRefs] - - await Voucher.findByIdAndUpdate(voucher.id, { - title: metadata.title, - qty: metadata.qty, - category: metadata.category, - startDate: metadata.startDate, - expiryDate: metadata.expiryDate, - offeredDate: metadata.offeredDate, - price: metadata.price, - buyerDeposit: metadata.buyerDeposit, - sellerDeposit: metadata.sellerDeposit, - description: metadata.description, - location: metadata.location, - contact: metadata.contact, - conditions: metadata.conditions, - imagefiles: updatedImages - }, - { useFindAndModify: false, new: true, upsert: true, } - ) - } - - static async updateVoucherQty(voucherID) { - const voucher = await this.getVoucher(voucherID); - - return await Voucher.findByIdAndUpdate(voucherID, { - qty: --voucher.qty, - }, - { useFindAndModify: false, new: true, upsert: true, } - ) - } - - static async updateVoucherVisibilityStatus(voucherID) { - const voucher = await this.getVoucher(voucherID); - - return await Voucher.findByIdAndUpdate(voucherID, { - visible: voucher.visible ? false : true - }, - { useFindAndModify: false, new: true, upsert: true, } - ) - } - - static async deleteVoucher(id) { - await Voucher.findByIdAndDelete(id) - } - - static async deleteImage(id, imageUrl) { - const voucher = await this.getVoucher(id); - const currentImages = voucher.imagefiles; - const updatedImages = currentImages.filter(image => image.url != imageUrl); - - await Voucher.findByIdAndUpdate(id, { - imagefiles: updatedImages - }, - { useFindAndModify: false, new: true, upsert: true, } - ); - } - - static async getVoucher(id) { - return await Voucher.findById(id) - } - - static async getVouchersDetails(myVoucherDocument, voucherData) { - const voucherDetailsDocument = await VoucherService.getVoucher(myVoucherDocument.voucherID) - - const voucher = { - _id: myVoucherDocument.id, - title: voucherDetailsDocument._doc.title, - qty: voucherDetailsDocument._doc.qty, - description: voucherDetailsDocument._doc.description, - imagefiles: voucherDetailsDocument._doc.imagefiles, - category: voucherDetailsDocument._doc.category, - price: voucherDetailsDocument._doc.price, - expiryDate: voucherDetailsDocument._doc.expiryDate, - visible: voucherDetailsDocument._doc.visible - } - - voucherData.push( - voucher - ) - } -} - -module.exports = VoucherService; \ No newline at end of file diff --git a/src/database/VoucherSupply/VoucherSuppliesRepository.js b/src/database/VoucherSupply/VoucherSuppliesRepository.js new file mode 100644 index 00000000..c2052936 --- /dev/null +++ b/src/database/VoucherSupply/VoucherSuppliesRepository.js @@ -0,0 +1,314 @@ +// @ts-nocheck +const VoucherSupply = require("../models/VoucherSupply"); + +const standardFields = [ + "voucherOwner", + "title", + "price", + "description", + "imagefiles", + "expiryDate", + "startDate", + "qty", + "visible", + "_paymentType", +]; + +// TODO: Rename to VoucherSet/VoucherSets throughout +// TODO: Rename qty to quantity, no need for abbreviation +// TODO: Rename _tokenIdSupply to _supplyTokenId? +// TODO: Discuss lowercase owner address consistency +class VoucherSuppliesRepository { + async createVoucherSupply(metadata, fileRefs, voucherOwner) { + const voucherSupply = new VoucherSupply({ + title: metadata.title, + qty: metadata.qty, + category: metadata.category, + startDate: metadata.startDate, + expiryDate: metadata.expiryDate, + offeredDate: metadata.offeredDate, + price: metadata.price, + buyerDeposit: metadata.buyerDeposit, + sellerDeposit: metadata.sellerDeposit, + description: metadata.description, + location: { + country: metadata.location.country, + city: metadata.location.city, + addressLineOne: metadata.location.addressLineOne, + addressLineTwo: metadata.location.addressLineTwo, + postcode: metadata.location.postcode, + }, + contact: metadata.contact, + conditions: metadata.conditions, + voucherOwner: voucherOwner, + visible: true, + blockchainAnchored: false, + _correlationId: metadata._correlationId, + _tokenIdSupply: metadata._tokenIdSupply, + imagefiles: fileRefs, + _paymentType: metadata._paymentType, + }); + + return voucherSupply.save(); + } + + async updateVoucherSupply(voucherSupply, metadata, fileRefs) { + const currentOwner = voucherSupply.voucherOwner; + const currentVisibility = voucherSupply.visible; + const currentSupplyTokenId = voucherSupply._tokenIdSupply; + const currentImages = voucherSupply.imagefiles; + const updatedImages = [...currentImages, ...fileRefs]; + + await VoucherSupply.findByIdAndUpdate( + voucherSupply.id, + { + title: metadata.title ? metadata.title : voucherSupply.title, + qty: metadata.qty ? metadata.qty : voucherSupply.qty, + category: metadata.category + ? metadata.category + : voucherSupply.category, + startDate: metadata.startDate + ? metadata.startDate + : voucherSupply.startDate, + expiryDate: metadata.expiryDate + ? metadata.expiryDate + : voucherSupply.expiryDate, + offeredDate: metadata.offeredDate + ? metadata.offeredDate + : voucherSupply.offeredDate, + price: metadata.price ? metadata.price : voucherSupply.price, + buyerDeposit: metadata.buyerDeposit + ? metadata.buyerDeposit + : voucherSupply.buyerDeposit, + sellerDeposit: metadata.sellerDeposit + ? metadata.sellerDeposit + : voucherSupply.sellerDeposit, + description: metadata.description + ? metadata.description + : voucherSupply.description, + location: { + country: metadata.location.country + ? metadata.location.country + : voucherSupply.location.country, + city: metadata.location.city + ? metadata.location.city + : voucherSupply.location.city, + addressLineOne: metadata.location.addressLineOne + ? metadata.location.addressLineOne + : voucherSupply.location.addressLineOne, + addressLineTwo: metadata.location.addressLineTwo + ? metadata.location.addressLineTwo + : voucherSupply.location.addressLineTwo, + postcode: metadata.location.postcode + ? metadata.location.postcode + : voucherSupply.location.postcode, + }, + contact: metadata.contact ? metadata.contact : voucherSupply.contact, + conditions: metadata.conditions + ? metadata.conditions + : voucherSupply.conditions, + imagefiles: updatedImages, + voucherOwner: currentOwner, + visible: currentVisibility, + _tokenIdSupply: currentSupplyTokenId, + }, + { useFindAndModify: false, new: true, upsert: true } + ); + } + + async decrementVoucherSupplyQty(supplyId) { + const voucherSupply = await this.getVoucherSupplyBySupplyTokenId(supplyId); + if (!voucherSupply) { + throw new Error("Voucher supply not found"); + } + + voucherSupply.qty = --voucherSupply.qty; + + return await voucherSupply.save(); + } + + async setVoucherSupplyMeta(metadata) { + let voucherSupply = await VoucherSupply.findOne({ + voucherOwner: metadata.voucherOwner, + _correlationId: metadata._correlationId, + }); + + if (!voucherSupply) { + throw new Error( + `Voucher Supply with ID ${metadata._tokenIdSupply} does not exist!` + ); + } + + voucherSupply._tokenIdSupply = metadata._tokenIdSupply; + voucherSupply._paymentType = metadata._paymentType; + voucherSupply._promiseId = metadata._promiseId; + voucherSupply.qty = metadata.qty; + voucherSupply.startDate = metadata.validFrom; + voucherSupply.expiryDate = metadata.validTo; + voucherSupply.price = metadata.price; + voucherSupply.buyerDeposit = metadata.buyerDeposit; + voucherSupply.sellerDeposit = metadata.sellerDeposit; + voucherSupply.blockchainAnchored = true; + + return await voucherSupply.save(); + } + + async updateSupplyMeta(metadata) { + const voucherSupply = await VoucherSupply.findOne( + { + _tokenIdSupply: metadata._tokenIdSupply, + }, + { new: true, upsert: true } + ); + + if (!voucherSupply) { + throw new Error( + `Voucher Supply for update with id: ${metadata._tokenIdSupply} not found!` + ); + } + + return VoucherSupply.findByIdAndUpdate(voucherSupply.id, { + ...metadata, + }); + } + + async toggleVoucherSupplyVisibility(id) { + const voucherSupply = await this.getVoucherSupplyById(id); + if (!voucherSupply) { + throw new Error("Voucher supply not found"); + } + + return VoucherSupply.findByIdAndUpdate( + id, + { + visible: !voucherSupply.visible, + }, + { useFindAndModify: false, new: true } + ); + } + + async deleteVoucherSupply(id) { + const voucherSupply = await this.getVoucherSupplyById(id); + if (!voucherSupply) { + throw new Error("Voucher supply not found"); + } + + await VoucherSupply.findByIdAndDelete(id); + } + + async deleteVoucherSupplyImage(id, imageUrl) { + const voucherSupply = await this.getVoucherSupplyById(id); + if (!voucherSupply) { + throw new Error("Voucher supply not found"); + } + + const currentImages = voucherSupply.imagefiles; + const updatedImages = currentImages.filter( + (image) => image.url !== imageUrl + ); + + await VoucherSupply.findByIdAndUpdate( + id, + { + imagefiles: updatedImages, + }, + { useFindAndModify: false, new: true } + ); + } + + async getVoucherSupplyById(id) { + return VoucherSupply.findById(id); + } + + async getVoucherSupplyByOwnerAndCorrelationId(metadata) { + return VoucherSupply.findOne({ + voucherOwner: metadata.voucherOwner, + _correlationId: metadata._correlationId, + }); + } + + async getVoucherSupplyBySupplyTokenId(supplyTokenId) { + return VoucherSupply.findOne({ _tokenIdSupply: supplyTokenId }); + } + + async getAllVoucherSupplies() { + return VoucherSupply.find({ blockchainAnchored: true }); + } + + async getAllVoucherSuppliesByOwner(owner) { + return VoucherSupply.where("voucherOwner") + .equals(owner) + .where("blockchainAnchored") + .equals(true) + .select(standardFields) + .sort({ offeredDate: "desc" }) + .lean(); + } + + async getActiveVoucherSuppliesByOwner(owner) { + const today = new Date(Date.now()); + + return VoucherSupply.where("voucherOwner") + .equals(owner.toLowerCase()) + .where("startDate") + .lte(today) + .where("expiryDate") + .gte(today) + .where("qty") + .gt(0) + .where("blockchainAnchored") + .equals(true) + .select(standardFields) + .sort({ offeredDate: "desc" }) + .lean(); + } + + async getInactiveVoucherSuppliesByOwner(owner) { + const today = new Date(Date.now()); + + return VoucherSupply.where("voucherOwner") + .equals(owner.toLowerCase()) + .where("blockchainAnchored") + .equals(true) + .or([ + { startDate: { $gte: today } }, + { expiryDate: { $lte: today } }, + { qty: { $lte: 0 } }, + ]) + .select(standardFields) + .sort({ offeredDate: "desc" }) + .lean(); + } + + async getVoucherSupplyDetails(voucher, voucherSupplyDetailsList) { + const voucherSupply = await this.getVoucherSupplyById(voucher.supplyID); + if (!voucherSupply) { + // if we are to support vouchers, committed outside of the reference-app - they would not get a supplyID, hence the whole collection with VoucherSupplyDetails would not be returned, if we throw an error. + return; + } + + const voucherSupplyDetails = { + _id: voucher.id, + title: voucherSupply.title, + qty: voucherSupply.qty, + description: voucherSupply.description, + imagefiles: voucherSupply.imagefiles, + category: voucherSupply.category, + price: voucherSupply.price, + expiryDate: voucherSupply.expiryDate, + visible: voucherSupply.visible, + paymentType: voucherSupply._paymentType, + CANCELLED: voucher.CANCELLED, + COMMITTED: voucher.COMMITTED, + COMPLAINED: voucher.COMPLAINED, + EXPIRED: voucher.EXPIRED, + FINALIZED: voucher.FINALIZED, + REDEEMED: voucher.REDEEMED, + REFUNDED: voucher.REFUNDED, + }; + + voucherSupplyDetailsList.push(voucherSupplyDetails); + } +} + +module.exports = VoucherSuppliesRepository; diff --git a/src/database/collections.json b/src/database/collections.json index 14e4531d..d15f191d 100644 --- a/src/database/collections.json +++ b/src/database/collections.json @@ -1,6 +1,7 @@ { "USER": "User", + "VOUCHER_SUPPLY": "VoucherSupply", "VOUCHER": "Voucher", - "USER_VOUCHER": "UserVoucher", - "PAYMENT": "Payment" + "PAYMENT": "Payment", + "EVENT": "Event" } \ No newline at end of file diff --git a/src/database/index.js b/src/database/index.js deleted file mode 100644 index 450c4aa7..00000000 --- a/src/database/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const Voucher = require('./Voucher/voucher') -const User = require('./User/user') -const UserVoucher = require('./UserVoucher/userVoucher') -const Payment = require('./Payment/payment') - -const MongooseService = { - getNonce: User.getNonce, - preserveNonce: User.preserveNonce, - isUserRegistered: User.isUserRegistered, - getUser: User.getUser, - makeAdmin: User.setUserToAdmin, - getVoucher: Voucher.getVoucher, - getVouchersByOwner: Voucher.getVouchersByOwner, - getVouchersByBuyer: Voucher.getVouchersByBuyer, - createVoucher: Voucher.createVoucher, - updateVoucher: Voucher.updateVoucher, - updateVoucherQty: Voucher.updateVoucherQty, - updateVoucherVisibilityStatus: Voucher.updateVoucherVisibilityStatus, - deleteVoucher: Voucher.deleteVoucher, - deleteImage: Voucher.deleteImage, - getVouchersDetails: Voucher.getVouchersDetails, - getActiveVouchers: Voucher.getActiveVouchers, - getInactiveVouchers: Voucher.getInactiveVouchers, - findUserVoucherById: UserVoucher.findUserVoucherById, - createUserVoucher: UserVoucher.createUserVoucher, - getMyVouchers: UserVoucher.getMyVouchers, - getMyVoucherByID: UserVoucher.getMyVoucherByID, - updateMyVoucherStatus: UserVoucher.updateMyVoucherStatus, - findAllUsersByVoucherID: UserVoucher.findAllUsersByVoucherID, - finalizeVoucher: UserVoucher.finalizeVoucher, - createPayment: Payment.createPayment, - getPaymentsByVoucherID: Payment.getPaymentsByVoucherID, - getAllVouchers: UserVoucher.getAllVouchers -} - -module.exports = MongooseService; diff --git a/src/database/models/Event.js b/src/database/models/Event.js new file mode 100644 index 00000000..9e721aa9 --- /dev/null +++ b/src/database/models/Event.js @@ -0,0 +1,34 @@ +// @ts-nocheck +const mongoose = require("mongoose"); +const { Schema } = mongoose; +const collections = require("../collections.json"); + +const EVENT = collections.EVENT; + +const voucherSchema = new Schema({ + name: { + type: String, + required: true, + trim: true, + }, + address: { + type: String, + required: true, + }, + eventDetected: { + type: Boolean, + required: true, + default: false, + }, + _correlationId: { + type: String, + required: false, + }, + //_tokenIdSupply || _tokenIdVoucher + _tokenId: { + type: String, + required: false, + }, +}); + +module.exports = mongoose.model(EVENT, voucherSchema); diff --git a/src/database/models/Payment.js b/src/database/models/Payment.js index bcc3d5a8..57f981a9 100644 --- a/src/database/models/Payment.js +++ b/src/database/models/Payment.js @@ -1,35 +1,32 @@ // @ts-nocheck - -const mongoose = require('mongoose'); +const mongoose = require("mongoose"); const Schema = mongoose.Schema; -const collections = require('../collections.json'); +const collections = require("../collections.json"); const PAYMENT = collections.PAYMENT; const paymentSchema = new Schema({ - _tokenIdVoucher: { - type: String, - required: true, - trim: true - }, - _payment: { - type: Schema.Types.Decimal128, - required: true - - }, - _to: { - type: String, - required: true - }, - txHash: { - type: String, - required: true - }, - // _type: 0 - Payment, 1 - Seller Deposit, 2 - Buyer Deposit - _type: { - type: Number, - required: true, - trim: true - } -}) + _tokenIdVoucher: { + type: String, + required: true, + trim: true, + }, + _payment: { + type: Schema.Types.Decimal128, + required: true, + }, + _to: { + type: String, + required: true, + }, + txHash: { + type: String, + required: true, + }, + _type: { + type: Number, + required: true, + trim: true, + }, +}); -module.exports = mongoose.model(PAYMENT, paymentSchema) \ No newline at end of file +module.exports = mongoose.model(PAYMENT, paymentSchema); diff --git a/src/database/models/User.js b/src/database/models/User.js index 48ac4e63..ef7dd118 100644 --- a/src/database/models/User.js +++ b/src/database/models/User.js @@ -1,31 +1,29 @@ // @ts-nocheck - -const mongoose = require('mongoose'); +const mongoose = require("mongoose"); const Schema = mongoose.Schema; -const collections = require('../collections.json'); +const collections = require("../collections.json"); const USER = collections.USER; -const VOUCHER = collections.VOUCHER; const userSchema = new Schema({ - address: { - type: String, - required: true, - trim: true - }, - nonce: { - type: Number, - default: 0, - validate(value) { - if (value < 0) { - throw new Error('Nonce must be a postive number') - } - } + address: { + type: String, + required: true, + trim: true, + }, + nonce: { + type: Number, + default: 0, + validate(value) { + if (value < 0) { + throw new Error("Nonce must be a positive number"); + } }, - role: { - type: String, - required: true, - trim: true - } -}) + }, + role: { + type: String, + required: true, + trim: true, + }, +}); -module.exports = mongoose.model(USER, userSchema) \ No newline at end of file +module.exports = mongoose.model(USER, userSchema); diff --git a/src/database/models/UserVoucher.js b/src/database/models/UserVoucher.js deleted file mode 100644 index 349900f8..00000000 --- a/src/database/models/UserVoucher.js +++ /dev/null @@ -1,65 +0,0 @@ -// @ts-nocheck - -const mongoose = require('mongoose'); -const Schema = mongoose.Schema; -const collections = require('../collections.json'); -const USER = collections.USER; -const USER_VOUCHER = collections.USER_VOUCHER; - -const userSchema = new Schema({ - voucherID: { - type: String, - required: true, - trim: true - }, - txHash: { - type: String, - required: true, - }, - _holder: { - type: String, - }, - _tokenIdSupply: { - type: String - }, - _tokenIdVoucher: { - type: String - }, - voucherOwner: { - type: String - }, - status: { - type: String, - required: true - }, - COMMITTED: { - type: Date, - required: false - }, - REDEEMED: { - type: Date, - required: false - }, - REFUNDED: { - type: Date, - required: false - }, - COMPLAINED: { - type: Date, - required: false - }, - CANCELLED: { - type: Date, - required: false - }, - FINALIZED: { - type: Date, - required: false - }, - actionDate: { - type: Date, - required: false - }, -}) - -module.exports = mongoose.model(USER_VOUCHER, userSchema) \ No newline at end of file diff --git a/src/database/models/Voucher.js b/src/database/models/Voucher.js index 474399b6..3b07e474 100644 --- a/src/database/models/Voucher.js +++ b/src/database/models/Voucher.js @@ -1,100 +1,73 @@ // @ts-nocheck - -const mongoose = require('mongoose'); -const { Schema } = mongoose; -const collections = require('../collections.json'); -const USER = collections.USER; +const mongoose = require("mongoose"); +const Schema = mongoose.Schema; +const collections = require("../collections.json"); const VOUCHER = collections.VOUCHER; +const { updateIfCurrentPlugin } = require("mongoose-update-if-current"); +// TODO: discuss whether action date is needed const voucherSchema = new Schema({ - title: { - type: String, - required: true, - trim: true - }, - qty: { - type: Number, - required: true, - validate(value) { - if (value < 0) { - throw new Error('Qty must be a postive number') - } - } - }, - price: { - type: Schema.Types.Decimal128, - required: true - }, - buyerDeposit: { - type: Schema.Types.Decimal128, - required: true - }, - sellerDeposit: { - type: Schema.Types.Decimal128, - required: true - }, - category: { - type: String, - required: false - }, - startDate: { - type: Date, - required: false - }, - expiryDate: { - type: Date, - required: false - }, - offeredDate: { - type: Date, - required: false - }, - description: { - type: String, - required: false - }, - location: { - type: String, - required: true, - trim: true - }, - contact: { - type: String, - required: true, - trim: true - }, - conditions: { - type: String, - required: true, - trim: true - }, - imagefiles: { - type: Array, - required: true - }, - voucherOwner: { - type: String, - required: true - }, - voucherStatus: { - type: String - }, - visible: { - type: Boolean, - required: true - }, - txHash: { - type: String, - required: true, - }, - _tokenIdSupply: { - type: String, - required: true, - }, - _promiseId: { - type: String, - required: true, - }, -}) + supplyID: { + type: String, + required: true, + trim: true, + }, + _holder: { + type: String, + }, + _tokenIdSupply: { + type: String, + }, + _tokenIdVoucher: { + type: String, + }, + voucherOwner: { + type: String, + }, + COMMITTED: { + type: Date, + required: false, + }, + REDEEMED: { + type: Date, + required: false, + }, + REFUNDED: { + type: Date, + required: false, + }, + COMPLAINED: { + type: Date, + required: false, + }, + CANCELLED: { + type: Date, + required: false, + }, + FINALIZED: { + type: Date, + required: false, + }, + EXPIRED: { + type: Date, + required: false, + }, + actionDate: { + type: Date, + required: false, + }, + _correlationId: { + type: Number, + required: false, + }, + _promiseId: { + type: String, + }, + blockchainAnchored: { + type: Boolean, + }, +}); + +voucherSchema.plugin(updateIfCurrentPlugin); -module.exports = mongoose.model(VOUCHER, voucherSchema) \ No newline at end of file +module.exports = mongoose.model(VOUCHER, voucherSchema); diff --git a/src/database/models/VoucherSupply.js b/src/database/models/VoucherSupply.js new file mode 100644 index 00000000..dd4cd586 --- /dev/null +++ b/src/database/models/VoucherSupply.js @@ -0,0 +1,131 @@ +// @ts-nocheck +const mongoose = require("mongoose"); +const { Schema } = mongoose; +const collections = require("../collections.json"); +const { updateIfCurrentPlugin } = require("mongoose-update-if-current"); + +const VOUCHER_SUPPLY = collections.VOUCHER_SUPPLY; + +const voucherSchema = new Schema({ + title: { + type: String, + required: false, + trim: true, + }, + qty: { + type: Number, + required: true, + validate(value) { + if (value < 0) { + throw new Error("Qty must be a positive number"); + } + }, + }, + price: { + type: Schema.Types.Decimal128, + required: true, + }, + buyerDeposit: { + type: Schema.Types.Decimal128, + required: true, + }, + sellerDeposit: { + type: Schema.Types.Decimal128, + required: true, + }, + category: { + type: String, + required: false, + }, + startDate: { + type: Date, + required: false, + }, + expiryDate: { + type: Date, + required: false, + }, + offeredDate: { + type: Date, + required: false, + }, + description: { + type: String, + required: false, + }, + location: { + type: Object, + country: { + type: String, + required: false, + trim: true, + }, + city: { + type: String, + required: false, + trim: true, + }, + addressLineOne: { + type: String, + required: false, + trim: true, + }, + addressLineTwo: { + type: String, + required: false, + trim: true, + }, + postcode: { + type: String, + required: false, + trim: true, + }, + }, + contact: { + type: String, + required: false, + trim: true, + }, + conditions: { + type: String, + required: false, + trim: true, + }, + imagefiles: { + type: Array, + required: false, + }, + voucherOwner: { + type: String, + required: false, + }, + voucherStatus: { + type: String, + }, + visible: { + type: Boolean, + required: false, + }, + _tokenIdSupply: { + type: String, + required: false, + }, + _correlationId: { + type: String, + required: false, + }, + _paymentType: { + type: Number, + required: false, + }, + _promiseId: { + type: String, + }, + blockchainAnchored: { + type: Boolean, + }, +}); + +voucherSchema.plugin(updateIfCurrentPlugin); + +module.exports = mongoose.model(VOUCHER_SUPPLY, voucherSchema); diff --git a/src/modules/AdministrationModule.js b/src/modules/AdministrationModule.js new file mode 100644 index 00000000..596d8e1d --- /dev/null +++ b/src/modules/AdministrationModule.js @@ -0,0 +1,86 @@ +const basicAuthenticationMiddleware = require("express-basic-auth"); + +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const AdministratorAuthenticationMiddleware = require("../api/middlewares/AdministratorAuthenticationMiddleware"); +const AdministrationController = require("../api/controllers/AdministrationController"); + +class AdministrationModule { + constructor({ + configurationService, + authenticationService, + usersRepository, + voucherSuppliesRepository, + administratorAuthenticationMiddleware, + administrationController, + }) { + this.configurationService = configurationService; + this.administratorAuthenticationMiddleware = + administratorAuthenticationMiddleware || + new AdministratorAuthenticationMiddleware( + authenticationService, + usersRepository + ); + this.administrationController = + administrationController || + new AdministrationController( + authenticationService, + usersRepository, + voucherSuppliesRepository + ); + } + + mountPoint() { + return "/admin"; + } + + addRoutesTo(router) { + router.post( + "/super/login", + basicAuthenticationMiddleware({ + users: { + [this.configurationService.superadminUsername]: this + .configurationService.superadminPassword, + }, + }), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.administrationController.logInSuperadmin(req, res, next) + ) + ); + + router.patch( + "/:address", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.administratorAuthenticationMiddleware.validateAdminAccess( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.administrationController.makeAdmin(req, res, next) + ) + ); + + router.patch( + "/updateVisibleStatus/:supplyID", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.administratorAuthenticationMiddleware.validateAdminAccess( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.administrationController.changeVoucherSupplyVisibility( + req, + res, + next + ) + ) + ); + + return router; + } +} + +module.exports = AdministrationModule; diff --git a/src/modules/EventsModule.js b/src/modules/EventsModule.js new file mode 100644 index 00000000..3233de14 --- /dev/null +++ b/src/modules/EventsModule.js @@ -0,0 +1,106 @@ +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const EventsController = require("../api/controllers/EventsController"); +const EventValidationMiddleware = require("../api/middlewares/EventValidationMiddleware"); + +class EventsModule { + constructor({ + userAuthenticationMiddleware, + eventValidationMiddleware, + eventsRepository, + eventsController, + }) { + this.userAuthenticationMiddleware = userAuthenticationMiddleware; + this.eventValidationMiddleware = + eventValidationMiddleware || + new EventValidationMiddleware(eventsRepository); + this.eventsController = + eventsController || new EventsController(eventsRepository); + } + + mountPoint() { + return "/events"; + } + + //TODO Should getters be accessed by admins only? + addRoutesTo(router) { + router.post( + "/create", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateEventMetadata(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventsController.create(req, res, next) + ) + ); + + router.patch( + "/update-by-correlation-id", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateEventExistsByCorrelationId( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventsController.updateByCorrelationId(req, res, next) + ) + ); + + router.patch( + "/update-by-token-id", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateEventExistsByTokenId( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventsController.updateByTokenId(req, res, next) + ) + ); + + router.get( + "/all", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventsController.getAll(req, res, next) + ) + ); + + router.get( + "/detected", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventsController.getDetected(req, res, next) + ) + ); + + router.get( + "/failed", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventsController.getFailed(req, res, next) + ) + ); + + return router; + } +} + +module.exports = EventsModule; diff --git a/src/modules/HealthModule.js b/src/modules/HealthModule.js new file mode 100644 index 00000000..7d1c51a7 --- /dev/null +++ b/src/modules/HealthModule.js @@ -0,0 +1,25 @@ +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const HealthController = require("../api/controllers/HealthController"); + +class HealthModule { + constructor({ healthController } = {}) { + this.healthController = healthController || new HealthController(); + } + + mountPoint() { + return "/health"; + } + + addRoutesTo(router) { + router.get( + "/", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.healthController.getHealth(req, res, next) + ) + ); + + return router; + } +} + +module.exports = HealthModule; diff --git a/src/modules/PaymentsModule.js b/src/modules/PaymentsModule.js new file mode 100644 index 00000000..2e118043 --- /dev/null +++ b/src/modules/PaymentsModule.js @@ -0,0 +1,64 @@ +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const PaymentsController = require("../api/controllers/PaymentsController"); +const PaymentValidationMiddleware = require("../api/middlewares/PaymentValidationMiddleware"); + +class PaymentsModule { + constructor({ + vouchersRepository, + paymentsRepository, + userAuthenticationMiddleware, + paymentValidationMiddleware, + paymentsController, + }) { + this.userAuthenticationMiddleware = userAuthenticationMiddleware; + this.paymentValidationMiddleware = + paymentValidationMiddleware || new PaymentValidationMiddleware(); + this.paymentsController = + paymentsController || + new PaymentsController(vouchersRepository, paymentsRepository); + } + + mountPoint() { + return "/payments"; + } + + addRoutesTo(router) { + router.get( + "/get-payment/:tokenIdVoucher", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.paymentsController.getPaymentsByVoucherID(req, res, next) + ) + ); + + router.get( + "/:voucherID", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.paymentValidationMiddleware.validateID(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.paymentsController.getPaymentActors(req, res, next) + ) + ); + + router.post( + "/create-payment", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.paymentValidationMiddleware.validatePaymentData(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.paymentsController.createPayments(req, res, next) + ) + ); + + return router; + } +} + +module.exports = PaymentsModule; diff --git a/src/modules/UsersModule.js b/src/modules/UsersModule.js new file mode 100644 index 00000000..2ed2f85f --- /dev/null +++ b/src/modules/UsersModule.js @@ -0,0 +1,34 @@ +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const UsersController = require("../api/controllers/UsersController"); + +class UsersModule { + constructor({ authenticationService, usersRepository, usersController }) { + this.usersController = + usersController || + new UsersController(authenticationService, usersRepository); + } + + mountPoint() { + return "/users"; + } + + addRoutesTo(router) { + router.post( + "/:address", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.usersController.generateNonce(req, res, next) + ) + ); + + router.post( + "/:address/verify-signature", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.usersController.verifySignature(req, res, next) + ) + ); + + return router; + } +} + +module.exports = UsersModule; diff --git a/src/modules/VoucherSuppliesModule.js b/src/modules/VoucherSuppliesModule.js new file mode 100644 index 00000000..32dbd933 --- /dev/null +++ b/src/modules/VoucherSuppliesModule.js @@ -0,0 +1,297 @@ +const GCPStorage = require("../utils/GCPStorage"); +const AWSS3Storage = require("../utils/AWSS3Storage"); + +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const EventValidationMiddleware = require("../api/middlewares/EventValidationMiddleware"); +const FileValidator = require("../services/FileValidator"); +const FileStorageMiddleware = require("../api/middlewares/FileStorageMiddleware"); +const VoucherSupplyValidationMiddleware = require("../api/middlewares/VoucherSupplyValidationMiddleware"); +const VoucherSuppliesController = require("../api/controllers/VoucherSuppliesController"); + +const storageEngines = { + GCP: GCPStorage, + AWS: AWSS3Storage, +}; + +class VoucherSuppliesModule { + constructor({ + configurationService, + userAuthenticationMiddleware, + imageUploadStorageMiddleware, + voucherSupplyValidationMiddleware, + eventValidationMiddleware, + voucherSuppliesRepository, + voucherSuppliesController, + }) { + const imageUploadStorageEngine = + configurationService.imageUploadStorageEngine; + + this.userAuthenticationMiddleware = userAuthenticationMiddleware; + this.eventValidationMiddleware = + eventValidationMiddleware || new EventValidationMiddleware(); + this.imageUploadStorageMiddleware = + imageUploadStorageMiddleware || + new FileStorageMiddleware( + configurationService.imageUploadFileFieldName, + configurationService.imageUploadMaximumFiles, + new FileValidator( + configurationService.imageUploadSupportedMimeTypes, + configurationService.imageUploadMinimumFileSizeInKB, + configurationService.imageUploadMaximumFileSizeInKB + ), + new storageEngines[imageUploadStorageEngine]( + configurationService.imageUploadStorageBucketName + ) + ); + this.voucherSupplyValidationMiddleware = + voucherSupplyValidationMiddleware || + new VoucherSupplyValidationMiddleware(voucherSuppliesRepository); + this.voucherSuppliesController = + voucherSuppliesController || + new VoucherSuppliesController(voucherSuppliesRepository); + } + + mountPoint() { + return "/voucher-sets"; + } + + addRoutesTo(router) { + router.post( + "/", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.imageUploadStorageMiddleware.storeFiles(req, res, next) + ), + // TODO Do we need all location fields to be required? Do we need to + // revert if specified location is not in a valid format. + // Normally there should not be anything to worry since we muse ensure all + // correct data is sent from the client but just as further think about it + // (This is not a blockchain mandatory field, hence a successful tx could + // be executed and then we revert here) + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateLocation(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateDates(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateVoucherSupplyByCorrelationIdDoesNotExist( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.createVoucherSupply(req, res, next) + ) + ); + + router.get( + "/:id", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateVoucherSupplyExists( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getVoucherSupply(req, res, next) + ) + ); + + router.get( + "/", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getAllVoucherSupplies(req, res, next) + ) + ); + + router.get( + "/status/all", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getSupplyStatuses(req, res, next) + ) + ); + + router.get( + "/status/active", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getActiveSupplies(req, res, next) + ) + ); + + router.get( + "/status/inactive", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getInactiveSupplies(req, res, next) + ) + ); + + router.get( + "/sell/:address", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getSellerSupplies(req, res, next) + ) + ); + + router.get( + "/buy/:address", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.getBuyerSupplies(req, res, next) + ) + ); + + router.patch( + "/set-supply-meta", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + //TODO if we are to support updates outside reference app, we should not have this validator, since it will always reverts in such scenario + // ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + // this.voucherSupplyValidationMiddleware.validateVoucherSupplyExistsByOwnerAndCorrelationId( + // req, + // res, + // next + // ) + // ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateVoucherMetadata(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.setSupplyMetaOnOrderCreated( + req, + res, + next + ) + ) + ); + + router.patch( + "/update-supply-ontransfer", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateVoucherMetadataOnTransfer( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.updateSupplyOnTransfer(req, res, next) + ) + ); + + router.patch( + "/update-supply-oncancel", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateVoucherMetadata(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.updateSupplyOnCancel(req, res, next) + ) + ); + + router.patch( + "/:id", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.imageUploadStorageMiddleware.storeFiles(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateLocation(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateVoucherSupplyExists( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateCanUpdateVoucherSupply( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.updateVoucherSupply(req, res, next) + ) + ); + + router.delete( + "/:id", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateVoucherSupplyExists( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateCanDelete(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.deleteVoucherSupply(req, res, next) + ) + ); + + router.delete( + "/:id/image", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateVoucherSupplyExists( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSupplyValidationMiddleware.validateCanDelete(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherSuppliesController.deleteImage(req, res, next) + ) + ); + + return router; + } +} + +module.exports = VoucherSuppliesModule; diff --git a/src/modules/VouchersModule.js b/src/modules/VouchersModule.js new file mode 100644 index 00000000..7419c608 --- /dev/null +++ b/src/modules/VouchersModule.js @@ -0,0 +1,170 @@ +const ErrorHandlingMiddleware = require("../api/middlewares/ErrorHandlingMiddleware"); +const VouchersController = require("../api/controllers/VouchersController"); +const UserValidationMiddleware = require("../api/middlewares/UserValidationMiddleware"); +const VoucherValidationMiddleware = require("../api/middlewares/VoucherValidationMiddleware"); +const EventValidationMiddleware = require("../api/middlewares/EventValidationMiddleware"); + +class VouchersModule { + constructor({ + userAuthenticationMiddleware, + userValidationMiddleware, + eventValidationMiddleware, + voucherValidationMiddleware, + voucherSuppliesRepository, + vouchersRepository, + vouchersController, + }) { + this.userAuthenticationMiddleware = userAuthenticationMiddleware; + this.userValidationMiddleware = + userValidationMiddleware || + new UserValidationMiddleware(vouchersRepository); + this.eventValidationMiddleware = + eventValidationMiddleware || new EventValidationMiddleware(); + this.vouchersController = + vouchersController || + new VouchersController(voucherSuppliesRepository, vouchersRepository); + this.voucherValidationMiddleware = + voucherValidationMiddleware || + new VoucherValidationMiddleware(vouchersRepository); + } + + mountPoint() { + return "/vouchers"; + } + + addRoutesTo(router) { + router.get( + "/", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.getVouchers(req, res, next) + ) + ); + + router.post( + "/commit-to-buy/:supplyID", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userValidationMiddleware.validateMetadata(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherValidationMiddleware.validateVoucherByCorrelationIdDoesNotExist( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.commitToBuy(req, res, next) + ) + ); + + router.get( + "/:voucherID/voucher-details", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.getVoucherDetails(req, res, next) + ) + ); + + router.get( + "/buyers/:supplyID", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateToken(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.getBoughtVouchersForSupply(req, res, next) + ) + ); + + router.get( + "/all", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.getAllVouchers(req, res, next) + ) + ); + + router.get( + "/public", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.getAllVouchers(req, res, next) + ) + ); + + router.patch( + "/update-voucher-delivered", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateUserVoucherMetadata( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.updateVoucherDelivered(req, res, next) + ) + ); + + router.patch( + "/update-from-common-event", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.eventValidationMiddleware.validateUserVoucherMetadata( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.updateVoucherOnCommonEvent(req, res, next) + ) + ); + + router.patch( + "/update-status-from-keepers", + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.userAuthenticationMiddleware.authenticateGCLOUDService( + req, + res, + next + ) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.voucherValidationMiddleware.validateVoucherStatus(req, res, next) + ), + ErrorHandlingMiddleware.globalErrorHandler((req, res, next) => + this.vouchersController.updateStatusFromKeepers(req, res, next) + ) + ); + + return router; + } +} + +module.exports = VouchersModule; diff --git a/src/services/AuthenticationService.js b/src/services/AuthenticationService.js new file mode 100644 index 00000000..61633c4c --- /dev/null +++ b/src/services/AuthenticationService.js @@ -0,0 +1,35 @@ +const jwt = require("jsonwebtoken"); +const { utils } = require("ethers"); + +class AuthenticationService { + constructor(tokenSecret) { + this.tokenSecret = tokenSecret; + } + + isSignatureVerified(address, domain, types, message, signature) { + const verifiedWalletAddress = utils.verifyTypedData( + domain, + types, + message, + signature + ); + + return address === verifiedWalletAddress; + } + + generateToken(user, expiresIn = "7d") { + const tokenSecret = this.tokenSecret; + const payload = { user: user.address.toLowerCase(), role: user.role }; + const options = { expiresIn }; + + return jwt.sign(payload, tokenSecret, options); + } + + verifyToken(token) { + const tokenSecret = this.tokenSecret; + + return jwt.verify(token, tokenSecret); + } +} + +module.exports = AuthenticationService; diff --git a/src/services/ConfigurationService.js b/src/services/ConfigurationService.js new file mode 100644 index 00000000..75fa372b --- /dev/null +++ b/src/services/ConfigurationService.js @@ -0,0 +1,138 @@ +const coerceArray = (value) => value && value.split(","); + +const coerceNumber = (value) => value && Number(value); + +const coerceUndefined = (environmentVariableValue) => + environmentVariableValue !== "undefined" + ? environmentVariableValue + : undefined; + +const TEN_KILOBYTES_IN_KILOBYTES = 10; +const FIVE_MEGABYTES_IN_KILOBYTES = 5 * 1024; + +class ConfigurationService { + constructor(overrides = {}) { + this.overrides = overrides; + } + + get databaseConnectionString() { + return ( + this.overrides.databaseConnectionString || + coerceUndefined(process.env.DB_CONNECTION_STRING) || + "mongodb://localhost:27017" + ); + } + + get databaseName() { + return ( + this.overrides.databaseName || + coerceUndefined(process.env.DB_NAME) || + "api" + ); + } + + get databaseUsername() { + return ( + this.overrides.databaseUsername || + coerceUndefined(process.env.DB_USERNAME) || + "admin" + ); + } + + get databasePassword() { + return ( + this.overrides.databasePassword || + coerceUndefined(process.env.DB_PASSWORD) || + "secret" + ); + } + + get tokenSecret() { + return ( + this.overrides.tokenSecret || coerceUndefined(process.env.TOKEN_SECRET) + ); + } + + get gcloudSecret() { + return ( + this.overrides.gcloudSecret || coerceUndefined(process.env.GCLOUD_SECRET) + ); + } + + get imageUploadFileFieldName() { + return ( + this.overrides.imageUploadFileFieldName || + coerceUndefined(process.env.IMAGE_UPLOAD_FILE_FIELD_NAME) || + "fileToUpload" + ); + } + + get imageUploadStorageEngine() { + return ( + this.overrides.imageUploadStorageEngine || + coerceUndefined(process.env.IMAGE_UPLOAD_STORAGE_ENGINE) || + "AWS" + ); + } + + get imageUploadStorageBucketName() { + return ( + this.overrides.imageUploadStorageBucketName || + coerceUndefined(process.env.IMAGE_UPLOAD_STORAGE_BUCKET_NAME) || + coerceUndefined(process.env.VOUCHERS_BUCKET) + ); + } + + get imageUploadSupportedMimeTypes() { + return ( + this.overrides.imageUploadSupportedMimeTypes || + coerceArray( + coerceUndefined(process.env.IMAGE_UPLOAD_SUPPORTED_MIME_TYPES) + ) || ["image/jpeg", "image/png"] + ); + } + + get imageUploadMinimumFileSizeInKB() { + return ( + this.overrides.imageUploadMinimumFileSizeInKB || + coerceNumber( + coerceUndefined(process.env.IMAGE_UPLOAD_MINIMUM_FILE_SIZE_IN_KB) + ) || + TEN_KILOBYTES_IN_KILOBYTES + ); + } + + get imageUploadMaximumFileSizeInKB() { + return ( + this.overrides.imageUploadMaximumFileSizeInKB || + coerceNumber( + coerceUndefined(process.env.IMAGE_UPLOAD_MAXIMUM_FILE_SIZE_IN_KB) + ) || + FIVE_MEGABYTES_IN_KILOBYTES + ); + } + + get imageUploadMaximumFiles() { + return ( + this.overrides.imageUploadMaximumFiles || + coerceNumber(coerceUndefined(process.env.IMAGE_UPLOAD_MAXIMUM_FILES)) || + 10 + ); + } + + get superadminUsername() { + return ( + this.overrides.superadminUsername || + coerceUndefined(process.env.SUPERADMIN_USERNAME) + ); + } + + get superadminPassword() { + return ( + this.overrides.superadminPassword || + coerceUndefined(process.env.SUPERADMIN_PASSWORD) + ); + } +} + +module.exports = ConfigurationService; diff --git a/src/services/FileValidator.js b/src/services/FileValidator.js new file mode 100644 index 00000000..2ed6130e --- /dev/null +++ b/src/services/FileValidator.js @@ -0,0 +1,33 @@ +class FileValidator { + constructor(allowedMimeTypes, minimumFileSizeInKB, maximumFileSizeInKB) { + this.allowedMimeTypes = allowedMimeTypes; + this.minimumFileSizeInKB = minimumFileSizeInKB; + this.maximumFileSizeInKB = maximumFileSizeInKB; + } + + isValid(file) { + return ( + this.allowedMimeType(file) && + this.notTooSmall(file) && + this.notTooBig(file) + ); + } + + fileSizeInKB(file) { + return file.size / 1024; + } + + allowedMimeType(file) { + return this.allowedMimeTypes.includes(file.mimetype); + } + + notTooSmall(file) { + return this.fileSizeInKB(file) > this.minimumFileSizeInKB; + } + + notTooBig(file) { + return this.fileSizeInKB(file) < this.maximumFileSizeInKB; + } +} + +module.exports = FileValidator; diff --git a/src/utils/AWSS3Storage.js b/src/utils/AWSS3Storage.js new file mode 100644 index 00000000..22347dc2 --- /dev/null +++ b/src/utils/AWSS3Storage.js @@ -0,0 +1,36 @@ +const multerS3 = require("multer-s3"); +const { S3 } = require("aws-sdk"); +const { v4: uuidv4 } = require("uuid"); + +class AWSS3Storage { + constructor(bucketName) { + this.storage = multerS3({ + s3: new S3(), + bucket: bucketName, + acl: "public-read", + serverSideEncryption: "AES256", + contentType: multerS3.AUTO_CONTENT_TYPE, + key: (_1, _2, cb) => cb(null, uuidv4()), + }); + } + + _handleFile(req, file, cb) { + return this.storage._handleFile(req, file, cb); + } + + _removeFile(req, file, cb) { + return this.storage._removeFile(req, file, cb); + } + + _removeFiles(req, files, cb) { + if (files.length > 0) { + this._removeFile(req, files[0], () => { + this._removeFiles(req, files.slice(1), cb); + }); + } else { + cb(); + } + } +} + +module.exports = AWSS3Storage; diff --git a/src/utils/GCPStorage.js b/src/utils/GCPStorage.js new file mode 100644 index 00000000..11d93682 --- /dev/null +++ b/src/utils/GCPStorage.js @@ -0,0 +1,47 @@ +const { Storage } = require("@google-cloud/storage"); +const { v4: uuidv4 } = require("uuid"); + +class GCPStorage { + constructor(bucketName) { + this.bucket = new Storage().bucket(bucketName); + } + + _handleFile(req, file, cb) { + const key = uuidv4(); + const blob = this.bucket.file(key); + const stream = blob.createWriteStream({ + predefinedAcl: "publicread", + metadata: { + contentType: file.mimetype, + }, + }); + file.stream + .pipe(stream) + .on("error", (err) => cb(err)) + .on("finish", () => { + cb(null, { + size: blob.metadata.size, + bucket: blob.metadata.bucket, + key: key, + contentType: blob.metadata.contentType, + location: `https://${blob.metadata.bucket}.storage.googleapis.com/${key}`, + }); + }); + } + + _removeFile(_, file, cb) { + this.bucket.file(file.key).delete(cb); + } + + _removeFiles(req, files, cb) { + if (files.length > 0) { + this._removeFile(req, files[0], () => { + this._removeFiles(req, files.slice(1), cb); + }); + } else { + cb(); + } + } +} + +module.exports = GCPStorage; diff --git a/src/utils/Superadmin.js b/src/utils/Superadmin.js new file mode 100644 index 00000000..d850bb0a --- /dev/null +++ b/src/utils/Superadmin.js @@ -0,0 +1,18 @@ +const userRoles = require("../database/User/userRoles"); +const { zeroAddress } = require("./addresses"); + +class Superadmin { + static instance() { + return new Superadmin(); + } + + get address() { + return zeroAddress; + } + + get role() { + return userRoles.ADMIN; + } +} + +module.exports = Superadmin; diff --git a/src/utils/addresses.js b/src/utils/addresses.js new file mode 100644 index 00000000..6c019a63 --- /dev/null +++ b/src/utils/addresses.js @@ -0,0 +1,5 @@ +const zeroAddress = "0x0000000000000000000000000000000000000000"; + +module.exports = { + zeroAddress, +}; diff --git a/src/utils/nonceUtils.js b/src/utils/nonceUtils.js index bf2c2a58..b9b9fb2b 100644 --- a/src/utils/nonceUtils.js +++ b/src/utils/nonceUtils.js @@ -1,11 +1,9 @@ -const ethers = require('ethers'); +const MAX_NONCE = 1000000; -const MAX_NONCE = 1000000 - - class NonceUtils { - static generateRandomNumber() { - return Math.floor(Math.random() * Math.floor(MAX_NONCE)) - } +class NonceUtils { + static generateRandomNumber() { + return Math.floor(Math.random() * Math.floor(MAX_NONCE)); + } } -module.exports = NonceUtils; \ No newline at end of file +module.exports = NonceUtils; diff --git a/src/utils/paymentTypes.js b/src/utils/paymentTypes.js new file mode 100644 index 00000000..490d729b --- /dev/null +++ b/src/utils/paymentTypes.js @@ -0,0 +1,5 @@ +module.exports = { + PAYMENT: 0, + SELLER_DEPOSIT: 1, + BUYER_DEPOSIT: 2, +}; diff --git a/src/utils/userVoucherStatus.js b/src/utils/userVoucherStatus.js deleted file mode 100644 index 4afc5a96..00000000 --- a/src/utils/userVoucherStatus.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - COMMITTED: "COMMITTED", - REDEEMED: "REDEEMED", - REFUNDED: "REFUNDED", - COMPLAINED: "COMPLAINED", - CANCELLED: "CANCELLED", - FINALIZED: "FINALIZED" -} \ No newline at end of file diff --git a/src/utils/voucherStatus.js b/src/utils/voucherStatus.js deleted file mode 100644 index d5db25f9..00000000 --- a/src/utils/voucherStatus.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - ACTIVE: "ACTIVE", - INACTIVE: "INACTIVE" - -} \ No newline at end of file diff --git a/src/utils/voucherStatuses.js b/src/utils/voucherStatuses.js new file mode 100644 index 00000000..5616dbea --- /dev/null +++ b/src/utils/voucherStatuses.js @@ -0,0 +1,9 @@ +module.exports = { + COMMITTED: "COMMITTED", + REDEEMED: "REDEEMED", + REFUNDED: "REFUNDED", + COMPLAINED: "COMPLAINED", + CANCELLED: "CANCELLED", + FINALIZED: "FINALIZED", + EXPIRED: "EXPIRED", +}; diff --git a/src/utils/voucherSupplyStatuses.js b/src/utils/voucherSupplyStatuses.js new file mode 100644 index 00000000..ea639c3f --- /dev/null +++ b/src/utils/voucherSupplyStatuses.js @@ -0,0 +1,4 @@ +module.exports = { + ACTIVE: "ACTIVE", + INACTIVE: "INACTIVE", +}; diff --git a/src/utils/voucherUtils.js b/src/utils/voucherUtils.js index acdeb66f..1c29fe5d 100644 --- a/src/utils/voucherUtils.js +++ b/src/utils/voucherUtils.js @@ -1,50 +1,20 @@ -const VOUCHER_STATUS = require('./voucherStatus') -const BUCKET_NAME = process.env.VOUCHERS_BUCKET; +const voucherSupplyStatus = require("./voucherSupplyStatuses"); class VoucherUtils { - static async uploadFiles(req) { - const { Storage } = require('@google-cloud/storage'); - - const PDF_CONTENT_TYPE = 'application/pdf'; - const gcs = new Storage(); - const bucket = gcs.bucket(BUCKET_NAME); - const subFolderName = req.body.title; - const filesRefs = []; - - for (let i = 0; i < req.files.length; i++) { - const fileName = req.files[i].originalname; - const storageDestination = `${subFolderName}/${fileName}`; - - await bucket.upload(req.files[i].path, { - destination: storageDestination, - contentType: req.files[i].mimetype, - resumable: false - }); - - // Public link format - https://storage.googleapis.com/[BUCKET_NAME]/[OBJECT_NAME] - await bucket.file(storageDestination).makePublic(); - - filesRefs.push({ - url: `https://storage.googleapis.com/${BUCKET_NAME}/${storageDestination}`, - type: req.files[i].mimetype === PDF_CONTENT_TYPE ? 'document' : 'image' - }); - } - - return filesRefs; + static calcVoucherSupplyStatus(startDate, expiryDate, qty) { + const todayToMillis = new Date(Date.now()).getTime(); + const expiryToMillis = new Date(expiryDate).getTime(); + + if ( + todayToMillis < startDate || + todayToMillis > expiryToMillis || + qty <= 0 + ) { + return voucherSupplyStatus.INACTIVE; } - static calcVoucherStatus(startDate, expiryDate, qty) { - const isActive = true; - const todayToMillis = new Date(Date.now()).getTime(); - const startToMillis = new Date(startDate).getTime(); - const expiryTomillis = new Date(expiryDate).getTime(); - - if (todayToMillis < startDate || todayToMillis > expiryTomillis || qty <= 0) { - return VOUCHER_STATUS.INACTIVE - } - - return VOUCHER_STATUS.ACTIVE - } + return voucherSupplyStatus.ACTIVE; + } } -module.exports = VoucherUtils; \ No newline at end of file +module.exports = VoucherUtils; diff --git a/state/bootstrap/bsn-demo-mendelevium.tfstate b/state/bootstrap/bsn-demo-mendelevium.tfstate new file mode 100644 index 00000000..c7b9b374 --- /dev/null +++ b/state/bootstrap/bsn-demo-mendelevium.tfstate @@ -0,0 +1,225 @@ +{ + "version": 4, + "terraform_version": "0.15.4", + "serial": 3, + "lineage": "71d2f718-2aae-99a5-8641-9eff0d019205", + "outputs": { + "storage_bucket_name": { + "value": "bsn-reference-backend-bsn-demo-mendelevium", + "type": "string" + } + }, + "resources": [ + { + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "384010198059", + "arn": "arn:aws:sts::384010198059:assumed-role/cross-account-admin-role/1623963485930141000", + "id": "384010198059", + "user_id": "AROAVS2GKTQV324VKJXHT:1623963485930141000" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "template_file", + "name": "bucket_policy_template", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "108b0de813847ff9ece227a115c380b8bc04f68c90cc1ca9a313eea04fe51647", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n $${deny_unencrypted_object_upload_fragment},\n $${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": ${allowed_account_ids}\n },\n \"Resource\": [\n \"arn:aws:s3:::$${bucket_name}\",\n \"arn:aws:s3:::$${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "allowed_account_ids": "[\"384010198059\"]" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "aws_iam_policy_document", + "name": "encrypted_bucket_policy_document", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "589805729", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:PutObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": [\n \"AES256\"\n ]\n }\n }\n },\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:*\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": [\n \"false\"\n ]\n }\n }\n },\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ],\n \"Principal\": {\n \"AWS\": [\n \"384010198059\"\n ]\n }\n }\n ]\n}", + "override_json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ]\n }\n ]\n}", + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": null, + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_inflight_operations_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "325e4d711bf55ce8ba435ac8b7c4502bad8c1f3d7d4d4b88da1138e9fc9912f6", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-demo-mendelevium" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_object_uploads_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "b5645c4979a618ef68cf22030eafa93bd5469eea88c590f0232c68f348530d1d", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-demo-mendelevium" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "encrypted_bucket_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "697d2a6ce17cbfb9c24186cebf53e57ec62026cf317cdeda47a76f410d53d1cf", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-demo-mendelevium", + "deny_unencrypted_inflight_operations_fragment": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "deny_unencrypted_object_upload_fragment": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium", + "bucket": "bsn-reference-backend-bsn-demo-mendelevium", + "bucket_domain_name": "bsn-reference-backend-bsn-demo-mendelevium.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "bsn-reference-backend-bsn-demo-mendelevium.s3.eu-west-2.amazonaws.com", + "cors_rule": [], + "force_destroy": false, + "grant": [], + "hosted_zone_id": "Z3GKZC51ZF0DB4", + "id": "bsn-reference-backend-bsn-demo-mendelevium", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "eu-west-2", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "DeploymentIdentifier": "bsn-demo-mendelevium", + "DeploymentLabel": "mendelevium", + "DeploymentType": "bsn-demo", + "Name": "bsn-reference-backend-bsn-demo-mendelevium" + }, + "tags_all": { + "DeploymentIdentifier": "bsn-demo-mendelevium", + "DeploymentLabel": "mendelevium", + "DeploymentType": "bsn-demo", + "Name": "bsn-reference-backend-bsn-demo-mendelevium" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket_policy", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "bucket": "bsn-reference-backend-bsn-demo-mendelevium", + "id": "bsn-reference-backend-bsn-demo-mendelevium", + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:PutObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": [\n \"AES256\"\n ]\n }\n }\n },\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:*\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": [\n \"false\"\n ]\n }\n }\n },\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-demo-mendelevium/*\"\n ],\n \"Principal\": {\n \"AWS\": [\n \"384010198059\"\n ]\n }\n }\n ]\n}" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.storage_bucket.aws_s3_bucket.encrypted_bucket", + "module.storage_bucket.data.aws_iam_policy_document.encrypted_bucket_policy_document" + ] + } + ] + } + ] +} diff --git a/state/bootstrap/bsn-development-plutonium.tfstate b/state/bootstrap/bsn-development-plutonium.tfstate new file mode 100644 index 00000000..3bdc7207 --- /dev/null +++ b/state/bootstrap/bsn-development-plutonium.tfstate @@ -0,0 +1,201 @@ +{ + "version": 4, + "terraform_version": "0.14.11", + "serial": 3, + "lineage": "3249ecf7-dd9f-920f-3dad-76cf395aff6b", + "outputs": { + "storage_bucket_name": { + "value": "bsn-reference-backend-bsn-development-plutonium", + "type": "string" + } + }, + "resources": [ + { + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "384010198059", + "arn": "arn:aws:sts::384010198059:assumed-role/cross-account-admin-role/1620303543574032000", + "id": "384010198059", + "user_id": "AROAVS2GKTQV324VKJXHT:1620303543574032000" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "template_file", + "name": "bucket_policy_template", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "108b0de813847ff9ece227a115c380b8bc04f68c90cc1ca9a313eea04fe51647", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n $${deny_unencrypted_object_upload_fragment},\n $${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": ${allowed_account_ids}\n },\n \"Resource\": [\n \"arn:aws:s3:::$${bucket_name}\",\n \"arn:aws:s3:::$${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "allowed_account_ids": "[\"384010198059\"]" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_inflight_operations_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "8cb9e9fa0d3584552ab1b25b8ef81ee01f0a665f8321c1a92757a54f5500a80d", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-development-plutonium" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_object_uploads_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "c7b2f9fc56462a4778d0391e67bbeed96326f542bc78c08defd206a69591cc4c", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-development-plutonium" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "encrypted_bucket_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "524d2f95c4af6949803de8b52ad6bdc18ad07ecc0d96f3807feb3cc0805aa94a", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-development-plutonium", + "deny_unencrypted_inflight_operations_fragment": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "deny_unencrypted_object_upload_fragment": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium", + "bucket": "bsn-reference-backend-bsn-development-plutonium", + "bucket_domain_name": "bsn-reference-backend-bsn-development-plutonium.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "bsn-reference-backend-bsn-development-plutonium.s3.eu-west-2.amazonaws.com", + "cors_rule": [], + "force_destroy": false, + "grant": [], + "hosted_zone_id": "Z3GKZC51ZF0DB4", + "id": "bsn-reference-backend-bsn-development-plutonium", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "eu-west-2", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "DeploymentIdentifier": "bsn-development-plutonium", + "DeploymentLabel": "plutonium", + "DeploymentType": "bsn-development", + "Name": "bsn-reference-backend-bsn-development-plutonium" + }, + "tags_all": { + "DeploymentIdentifier": "bsn-development-plutonium", + "DeploymentLabel": "plutonium", + "DeploymentType": "bsn-development", + "Name": "bsn-reference-backend-bsn-development-plutonium" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket_policy", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "bucket": "bsn-reference-backend-bsn-development-plutonium", + "id": "bsn-reference-backend-bsn-development-plutonium", + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"384010198059\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-development-plutonium/*\"\n ]\n }\n ]\n}" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.storage_bucket.aws_s3_bucket.encrypted_bucket", + "module.storage_bucket.data.template_file.encrypted_bucket_policy" + ] + } + ] + } + ] +} diff --git a/state/bootstrap/bsn-production-oganesson.tfstate b/state/bootstrap/bsn-production-oganesson.tfstate new file mode 100644 index 00000000..88f23da2 --- /dev/null +++ b/state/bootstrap/bsn-production-oganesson.tfstate @@ -0,0 +1,225 @@ +{ + "version": 4, + "terraform_version": "0.15.4", + "serial": 20, + "lineage": "39ebb09a-624a-613f-e210-afa6a2d7b055", + "outputs": { + "storage_bucket_name": { + "value": "bsn-reference-backend-bsn-production-oganesson", + "type": "string" + } + }, + "resources": [ + { + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "371854298993", + "arn": "arn:aws:sts::371854298993:assumed-role/cross-account-admin-role/1626182315391485000", + "id": "371854298993", + "user_id": "AROAVNFB6J5YYTJHEDVMW:1626182315391485000" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "template_file", + "name": "bucket_policy_template", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "8dbf8c224a07e1e86314a9d4ff9da447c0475cbb5d4541c5da5da854d13fcc90", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n $${deny_unencrypted_object_upload_fragment},\n $${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": ${allowed_account_ids}\n },\n \"Resource\": [\n \"arn:aws:s3:::$${bucket_name}\",\n \"arn:aws:s3:::$${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "allowed_account_ids": "[\"371854298993\"]" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "aws_iam_policy_document", + "name": "encrypted_bucket_policy_document", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "id": "660376941", + "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:PutObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": [\n \"AES256\"\n ]\n }\n }\n },\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:*\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": [\n \"false\"\n ]\n }\n }\n },\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ],\n \"Principal\": {\n \"AWS\": [\n \"371854298993\"\n ]\n }\n }\n ]\n}", + "override_json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ]\n }\n ]\n}", + "override_policy_documents": null, + "policy_id": null, + "source_json": null, + "source_policy_documents": null, + "statement": null, + "version": "2012-10-17" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_inflight_operations_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "d54313351417b65af622cd30548bcf485c6c998dbcc7a4e27cb38eda722d0b99", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-production-oganesson" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_object_uploads_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "64b5682ec316d73f6bb9101337ea88e510bf74a9683abfa0d3f5fefa1280957f", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-production-oganesson" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "encrypted_bucket_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "30977d174b013d8ca1f155126b4bae742b0e29a0290da7846517759f2bb8a38c", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "bucket_name": "bsn-reference-backend-bsn-production-oganesson", + "deny_unencrypted_inflight_operations_fragment": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "deny_unencrypted_object_upload_fragment": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson", + "bucket": "bsn-reference-backend-bsn-production-oganesson", + "bucket_domain_name": "bsn-reference-backend-bsn-production-oganesson.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "bsn-reference-backend-bsn-production-oganesson.s3.eu-west-2.amazonaws.com", + "cors_rule": [], + "force_destroy": false, + "grant": [], + "hosted_zone_id": "Z3GKZC51ZF0DB4", + "id": "bsn-reference-backend-bsn-production-oganesson", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "eu-west-2", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "DeploymentIdentifier": "bsn-production-oganesson", + "DeploymentLabel": "oganesson", + "DeploymentType": "bsn-production", + "Name": "bsn-reference-backend-bsn-production-oganesson" + }, + "tags_all": { + "DeploymentIdentifier": "bsn-production-oganesson", + "DeploymentLabel": "oganesson", + "DeploymentType": "bsn-production", + "Name": "bsn-reference-backend-bsn-production-oganesson" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket_policy", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "bucket": "bsn-reference-backend-bsn-production-oganesson", + "id": "bsn-reference-backend-bsn-production-oganesson", + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:PutObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": [\n \"AES256\"\n ]\n }\n }\n },\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\n \"s3:*\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ],\n \"Principal\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": [\n \"false\"\n ]\n }\n }\n },\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson\",\n \"arn:aws:s3:::bsn-reference-backend-bsn-production-oganesson/*\"\n ],\n \"Principal\": {\n \"AWS\": [\n \"371854298993\"\n ]\n }\n }\n ]\n}" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.storage_bucket.aws_s3_bucket.encrypted_bucket", + "module.storage_bucket.data.aws_iam_policy_document.encrypted_bucket_policy_document" + ] + } + ] + } + ] +} diff --git a/state/bootstrap/rdm-management-default.tfstate b/state/bootstrap/rdm-management-default.tfstate new file mode 100644 index 00000000..840a06de --- /dev/null +++ b/state/bootstrap/rdm-management-default.tfstate @@ -0,0 +1,195 @@ +{ + "version": 4, + "terraform_version": "0.14.7", + "serial": 5, + "lineage": "7671df3c-17aa-8490-a234-ad856612da8c", + "outputs": { + "storage_bucket_name": { + "value": "bsn-reference-backend-rdm-management-default", + "type": "string" + } + }, + "resources": [ + { + "mode": "data", + "type": "aws_caller_identity", + "name": "current", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "account_id": "031036423983", + "arn": "arn:aws:sts::031036423983:assumed-role/cross-account-admin-role/1619028282270591000", + "id": "031036423983", + "user_id": "AROAQOOPKH4XR52AY76HB:1619028282270591000" + }, + "sensitive_attributes": [] + } + ] + }, + { + "mode": "data", + "type": "template_file", + "name": "bucket_policy_template", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "0cf2a8e56151f1b60471b1e015ebe47bfa2c3c7db2de6914db77220528529cd9", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"031036423983\",\"384010198059\",\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n $${deny_unencrypted_object_upload_fragment},\n $${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": ${allowed_account_ids}\n },\n \"Resource\": [\n \"arn:aws:s3:::$${bucket_name}\",\n \"arn:aws:s3:::$${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "allowed_account_ids": "[\"031036423983\",\"384010198059\",\"371854298993\"]" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_inflight_operations_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "8f2229740b3b878a3f86e19ee16c7626f034789cef39c0f395ea015fcc721b6d", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-rdm-management-default" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_object_uploads_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "085690f69d273dd404916d305b4012f4c407909ceecee63b9fba08a7233fa594", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-rdm-management-default" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "encrypted_bucket_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "3142c89cf1a1d0bbdf3dd04dc9a10667b21611e36bceb1a38ba7e5ecf412e679", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"031036423983\",\"384010198059\",\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-rdm-management-default\",\n \"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"\n ]\n }\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"031036423983\",\"384010198059\",\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::${bucket_name}\",\n \"arn:aws:s3:::${bucket_name}/*\"\n ]\n }\n ]\n}", + "vars": { + "bucket_name": "bsn-reference-backend-rdm-management-default", + "deny_unencrypted_inflight_operations_fragment": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "deny_unencrypted_object_upload_fragment": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::bsn-reference-backend-rdm-management-default", + "bucket": "bsn-reference-backend-rdm-management-default", + "bucket_domain_name": "bsn-reference-backend-rdm-management-default.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "bsn-reference-backend-rdm-management-default.s3.eu-west-2.amazonaws.com", + "cors_rule": [], + "force_destroy": false, + "grant": [], + "hosted_zone_id": "Z3GKZC51ZF0DB4", + "id": "bsn-reference-backend-rdm-management-default", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "eu-west-2", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "DeploymentIdentifier": "rdm-management-default", + "DeploymentLabel": "default", + "DeploymentType": "rdm-management", + "Name": "bsn-reference-backend-rdm-management-default" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket_policy", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "bucket": "bsn-reference-backend-rdm-management-default", + "id": "bsn-reference-backend-rdm-management-default", + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"AllowCrossAccountAccess\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"s3:ListBucket\",\n \"s3:GetObject\"\n ],\n \"Principal\": {\n \"AWS\": [\"031036423983\",\"384010198059\",\"371854298993\"]\n },\n \"Resource\": [\n \"arn:aws:s3:::bsn-reference-backend-rdm-management-default\",\n \"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"\n ]\n }\n ]\n}" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.storage_bucket.aws_s3_bucket.encrypted_bucket", + "module.storage_bucket.data.template_file.encrypted_bucket_policy" + ] + } + ] + } + ] +} diff --git a/state/bootstrap/rdm-management-default.tfstate.backup b/state/bootstrap/rdm-management-default.tfstate.backup new file mode 100644 index 00000000..ce8e042a --- /dev/null +++ b/state/bootstrap/rdm-management-default.tfstate.backup @@ -0,0 +1,156 @@ +{ + "version": 4, + "terraform_version": "0.14.7", + "serial": 3, + "lineage": "7671df3c-17aa-8490-a234-ad856612da8c", + "outputs": { + "storage_bucket_name": { + "value": "bsn-reference-backend-rdm-management-default", + "type": "string" + } + }, + "resources": [ + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_inflight_operations_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "8f2229740b3b878a3f86e19ee16c7626f034789cef39c0f395ea015fcc721b6d", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-rdm-management-default" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "deny_unencrypted_object_uploads_fragment", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "085690f69d273dd404916d305b4012f4c407909ceecee63b9fba08a7233fa594", + "rendered": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "template": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::${bucket_name}/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "vars": { + "bucket_name": "bsn-reference-backend-rdm-management-default" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "data", + "type": "template_file", + "name": "encrypted_bucket_policy", + "provider": "provider[\"registry.terraform.io/hashicorp/template\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "filename": null, + "id": "b4957ff366d63181aee465dc916bc11afc77113830421a77121edf0b10c4c5e8", + "rendered": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}\n ]\n}", + "template": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n ${deny_unencrypted_object_upload_fragment},\n ${deny_unencrypted_inflight_operations_fragment}\n ]\n}", + "vars": { + "bucket_name": "bsn-reference-backend-rdm-management-default", + "deny_unencrypted_inflight_operations_fragment": "{\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}", + "deny_unencrypted_object_upload_fragment": "{\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n}" + } + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "acceleration_status": "", + "acl": "private", + "arn": "arn:aws:s3:::bsn-reference-backend-rdm-management-default", + "bucket": "bsn-reference-backend-rdm-management-default", + "bucket_domain_name": "bsn-reference-backend-rdm-management-default.s3.amazonaws.com", + "bucket_prefix": null, + "bucket_regional_domain_name": "bsn-reference-backend-rdm-management-default.s3.eu-west-2.amazonaws.com", + "cors_rule": [], + "force_destroy": false, + "grant": [], + "hosted_zone_id": "Z3GKZC51ZF0DB4", + "id": "bsn-reference-backend-rdm-management-default", + "lifecycle_rule": [], + "logging": [], + "object_lock_configuration": [], + "policy": null, + "region": "eu-west-2", + "replication_configuration": [], + "request_payer": "BucketOwner", + "server_side_encryption_configuration": [], + "tags": { + "DeploymentIdentifier": "rdm-management-default", + "DeploymentLabel": "default", + "DeploymentType": "rdm-management", + "Name": "bsn-reference-backend-rdm-management-default" + }, + "versioning": [ + { + "enabled": true, + "mfa_delete": false + } + ], + "website": [], + "website_domain": null, + "website_endpoint": null + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.storage_bucket", + "mode": "managed", + "type": "aws_s3_bucket_policy", + "name": "encrypted_bucket", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "bucket": "bsn-reference-backend-rdm-management-default", + "id": "bsn-reference-backend-rdm-management-default", + "policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"DenyUnEncryptedObjectUploads\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:PutObject\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"StringNotEquals\": {\n \"s3:x-amz-server-side-encryption\": \"AES256\"\n }\n },\n\n \"Principal\": \"*\"\n},\n {\n \"Sid\": \"DenyUnEncryptedInflightOperations\",\n \"Effect\": \"Deny\",\n \"Action\": [\"s3:*\"],\n \"Resource\": [\"arn:aws:s3:::bsn-reference-backend-rdm-management-default/*\"],\n\n \"Condition\": {\n \"Bool\": {\n \"aws:SecureTransport\": \"false\"\n }\n },\n\n \"Principal\": \"*\"\n}\n ]\n}" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.storage_bucket.aws_s3_bucket.encrypted_bucket", + "module.storage_bucket.data.template_file.encrypted_bucket_policy" + ] + } + ] + } + ] +} diff --git a/test/component/administrationResource.test.js b/test/component/administrationResource.test.js new file mode 100644 index 00000000..8ae67785 --- /dev/null +++ b/test/component/administrationResource.test.js @@ -0,0 +1,293 @@ +const { expect } = require("chai"); + +const userRoles = require("../../src/database/User/userRoles"); +const { zeroAddress } = require("../../src/utils/addresses"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); +const Tokens = require("../shared/helpers/Tokens"); + +const TestServer = require("./helpers/TestServer"); +const Prerequisites = require("./helpers/Prerequisites"); +const API = require("./helpers/API"); + +describe("Administration Resource", () => { + let server; + let database; + let prerequisites; + let api; + + const tokenSecret = Random.tokenSecret(); + const superadminUsername = "superadmin"; + const superadminPassword = "supersecret"; + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ + tokenSecret, + superadminUsername, + superadminPassword, + }) + .start(); + api = new API(server.address); + prerequisites = new Prerequisites(api); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on POST to super admin login", () => { + it("createSuperAdminToken - returns 201 and a valid token when superadmin credentials are correct", async () => { + const fiveMinutesInSeconds = 300; + + const response = await api + .administration() + .logInAsSuperadmin(superadminUsername, superadminPassword); + + const token = response.text; + const payload = Tokens.verify(token, tokenSecret); + const validityInSeconds = Tokens.validityInSeconds(payload); + + expect(response.status).to.eql(201); + expect(validityInSeconds).to.eql(fiveMinutesInSeconds); + expect(payload.user).to.eql(zeroAddress); + expect(payload.role).to.eql(userRoles.ADMIN); + }); + + it("createSuperAdminToken - returns 401 when superadmin credentials are incorrect", async () => { + const response = await api + .administration() + .logInAsSuperadmin("junk-username", "junk-password"); + + expect(response.status).to.eql(401); + }); + }); + + context("on PATCH", () => { + it("createAdminUserFromSuperAdmin - return 200 and allow superadmin to make another user into an admin", async () => { + const superadminToken = await prerequisites.getSuperadminToken( + superadminUsername, + superadminPassword + ); + + const userAccount = Random.account(); + await prerequisites.getUserNonce(userAccount); + const userAddress = userAccount.address; + + const userTokenBefore = await prerequisites.getUserToken(userAccount); + const userTokenBeforePayload = Tokens.verify( + userTokenBefore, + tokenSecret + ); + + expect(userTokenBeforePayload.user).to.eql(userAddress.toLowerCase()); + expect(userTokenBeforePayload.role).to.eql(userRoles.USER); + + const response = await api + .withToken(superadminToken) + .administration() + .makeAdmin(userAddress); + + expect(response.status).to.eql(200); + + const userTokenAfter = await prerequisites.getUserToken(userAccount); + const userTokenAfterPayload = Tokens.verify(userTokenAfter, tokenSecret); + + expect(userTokenAfterPayload.user).to.eql(userAddress.toLowerCase()); + expect(userTokenAfterPayload.role).to.eql(userRoles.ADMIN); + }); + + it("createAdminUserFromSuperAdmin - return 403 when user is not admin", async () => { + const userAccount = Random.account(); + await prerequisites.getUserNonce(userAccount); + const userAddress = userAccount.address; + + const userTokenBefore = await prerequisites.getUserToken(userAccount); + const userTokenBeforePayload = Tokens.verify( + userTokenBefore, + tokenSecret + ); + + expect(userTokenBeforePayload.user).to.eql(userAddress.toLowerCase()); + expect(userTokenBeforePayload.role).to.eql(userRoles.USER); + + const response = await api + .withToken(userTokenBefore) // force failure + .administration() + .makeAdmin(userAddress); + + expect(response.status).to.eql(403); + }); + + it("createAdminUserFromAdmin - return 200 and allow an existing admin to make another user an admin", async () => { + const adminToken = await prerequisites.getAdminToken( + superadminUsername, + superadminPassword + ); + + const userAccount = Random.account(); + await prerequisites.getUserNonce(userAccount); + const userAddress = userAccount.address; + + const userTokenBefore = await prerequisites.getUserToken(userAccount); + const userTokenBeforePayload = Tokens.verify( + userTokenBefore, + tokenSecret + ); + + expect(userTokenBeforePayload.user).to.eql(userAddress.toLowerCase()); + expect(userTokenBeforePayload.role).to.eql(userRoles.USER); + + const response = await api + .withToken(adminToken) + .administration() + .makeAdmin(userAddress); + + expect(response.status).to.eql(200); + + const userTokenAfter = await prerequisites.getUserToken(userAccount); + const userTokenAfterPayload = Tokens.verify(userTokenAfter, tokenSecret); + + expect(userTokenAfterPayload.user).to.eql(userAddress.toLowerCase()); + expect(userTokenAfterPayload.role).to.eql(userRoles.ADMIN); + }); + + it("createAdminUserFromAdmin - return 403 when user is not admin", async () => { + const firstUserAccount = Random.account(); + + const firstUserToken = await prerequisites.getUserToken(firstUserAccount); + + const secondUserAccount = Random.account(); + await prerequisites.getUserNonce(secondUserAccount); + const secondUserAddress = secondUserAccount.address; + + const secondUserTokenBefore = await prerequisites.getUserToken( + secondUserAccount + ); + const secondUserTokenBeforePayload = Tokens.verify( + secondUserTokenBefore, + tokenSecret + ); + + expect(secondUserTokenBeforePayload.user).to.eql( + secondUserAddress.toLowerCase() + ); + expect(secondUserTokenBeforePayload.role).to.eql(userRoles.USER); + + const response = await api + .withToken(firstUserToken) + .administration() + .makeAdmin(secondUserAddress); + + expect(response.status).to.eql(403); + + const secondUserTokenAfter = await prerequisites.getUserToken( + secondUserAccount + ); + const secondUserTokenAfterPayload = Tokens.verify( + secondUserTokenAfter, + tokenSecret + ); + + expect(secondUserTokenAfterPayload.user).to.eql( + secondUserAddress.toLowerCase() + ); + expect(secondUserTokenAfterPayload.role).to.eql(userRoles.USER); + }); + + it("changeVoucherSupplyVisibility - return 200 and allow an admin to change voucher supply's visibility", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const responseCreateSupply = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + const voucherSupplyId = responseCreateSupply.body.voucherSupply._id; + // END CREATE VOUCHER SUPPLY + + // CHANGE VOUCHER SUPPLY VISIBILITY USING ADMIN + const superadminToken = await prerequisites.getSuperadminToken( + superadminUsername, + superadminPassword + ); + + const response = await api + .withToken(superadminToken) + .administration() + .changeSupplyVisibleStatus(voucherSupplyId); + // CHANGE VOUCHER SUPPLY VISIBILITY USING ADMIN + + const expectedPropertyName = "visible"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(false); // visible changed from true to false + }); + + it("changeVoucherSupplyVisibility - return 403 when change requested by non-admin user", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const responseCreateSupply = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + const voucherSupplyId = responseCreateSupply.body.voucherSupply._id; + // END CREATE VOUCHER SUPPLY + + // CHANGE VOUCHER SUPPLY VISIBILITY USING NON-ADMIN USER + const response = await api + .withToken(token) + .administration() + .changeSupplyVisibleStatus(voucherSupplyId); + // CHANGE VOUCHER SUPPLY VISIBILITY USING NON-ADMIN USER + + expect(response.status).to.eql(403); + }); + + it("changeVoucherSupplyVisibility - return 400 when admin tries to change non-existent voucher supply's visibility", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + const voucherSupplyId = Random.voucherSupplyId(); + // END CREATE VOUCHER SUPPLY + + // CHANGE VOUCHER SUPPLY VISIBILITY USING ADMIN + const superadminToken = await prerequisites.getSuperadminToken( + superadminUsername, + superadminPassword + ); + + const response = await api + .withToken(superadminToken) + .administration() + .changeSupplyVisibleStatus(voucherSupplyId); + // CHANGE VOUCHER SUPPLY VISIBILITY USING ADMIN + + expect(response.status).to.eql(400); + }); + }); +}); diff --git a/test/component/eventsResource.test.js b/test/component/eventsResource.test.js new file mode 100644 index 00000000..3dc073e7 --- /dev/null +++ b/test/component/eventsResource.test.js @@ -0,0 +1,289 @@ +const { expect } = require("chai"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +const TestServer = require("./helpers/TestServer"); +const Prerequisites = require("./helpers/Prerequisites"); +const API = require("./helpers/API"); + +describe("Events Resource", () => { + let server; + let database; + let prerequisites; + let api; + + const tokenSecret = Random.tokenSecret(); + const gcloudSecret = Random.gcloudSecret(); + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ tokenSecret, gcloudSecret }) + .start(); + api = new API(server.address); + prerequisites = new Prerequisites(api); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on GET", () => { + it("getAllEvents - returns 200 and all vouchers", async () => { + const response = await api.events().getAll(); + + const expectedProperty1 = "succeeded"; + const expectedProperty2 = "failed"; + const expectedProperty3 = "events"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const eventsProperty = response.body[expectedProperty3]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedProperty1); + expect(propertyNames).to.include(expectedProperty2); + expect(propertyNames).to.include(expectedProperty3); + expect(Array.isArray(eventsProperty)).to.eql(true); + }); + + it("getDetected - returns 200 and all vouchers", async () => { + const response = await api.events().getDetected(); + + const expectedProperty1 = "succeeded"; + const expectedProperty2 = "events"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const eventsProperty = response.body[expectedProperty2]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedProperty1); + expect(propertyNames).to.include(expectedProperty2); + expect(Array.isArray(eventsProperty)).to.eql(true); + }); + + it("getFailed - returns 200 and all vouchers", async () => { + const response = await api.events().getFailed(); + + const expectedProperty1 = "failed"; + const expectedProperty2 = "events"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const eventsProperty = response.body[expectedProperty2]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedProperty1); + expect(propertyNames).to.include(expectedProperty2); + expect(Array.isArray(eventsProperty)).to.eql(true); + }); + }); + + context("on PATCH", () => { + it("updateEventByCorrelationId - returns 200 and voucher updated success status", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + const metadata = Random.eventMetadata({ + _tokenId: "", + address: account.address, + }); + + await api.withToken(token).events().createEvent(metadata); + + const updatedData = { + name: metadata.name, + address: metadata.address, + _correlationId: metadata._correlationId, + }; + + const response = await api + .withToken(gcloudToken) + .events() + .updateByCorrelationId(updatedData); + + const expectedPropertyName = "updated"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateEventByCorrelationId - returns 400 if voucher is not found", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + const metadata = Random.eventMetadata({ + _tokenId: "", + address: account.address, + }); + + await api.withToken(token).events().createEvent(metadata); + + const updatedData = { + name: "INVALID_EVENT_NAME", + address: metadata.address, + _correlationId: metadata._correlationId, + }; + + const response = await api + .withToken(gcloudToken) + .events() + .updateByCorrelationId(updatedData); + + expect(response.status).to.eql(400); + }); + + it("updateEventByTokenId - returns 200 and voucher updated success status", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + const metadata = Random.eventMetadata({ + address: account.address, + _correlationId: "", + }); + + await api.withToken(token).events().createEvent(metadata); + + const updatedData = { + name: metadata.name, + _tokenId: metadata._tokenId, + }; + + const response = await api + .withToken(gcloudToken) + .events() + .updateByTokenId(updatedData); + + const expectedPropertyName = "updated"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateEventByTokenId - returns 400 if voucher is not found", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + const metadata = Random.eventMetadata({ + address: account.address, + _correlationId: "", + }); + + await api.withToken(token).events().createEvent(metadata); + + const updatedData = { + name: metadata.name, + _tokenId: "INVALID_TOKEN_ID", + }; + + const response = await api + .withToken(gcloudToken) + .events() + .updateByTokenId(updatedData); + + expect(response.status).to.eql(400); + }); + }); + + context("on POST", () => { + it("createEvent - returns 200 with eventId", async () => { + const address = Random.account(); + const token = await prerequisites.getUserToken(address); + + const metadata = Random.eventMetadata({ + _tokenId: "", + }); + + const response = await api + .withToken(token) + .events() + .createEvent(metadata); + + const expectedPropertyName = "eventId"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(201); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("createEvent - returns 200 with eventId", async () => { + const address = Random.account(); + const token = await prerequisites.getUserToken(address); + + const metadata = Random.eventMetadata({ + address: "", + _correlationId: "", + }); + + const response = await api + .withToken(token) + .events() + .createEvent(metadata); + + const expectedPropertyName = "eventId"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(201); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("createEvent - returns 400 if event name is missing", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const metadata = Random.eventMetadata({ name: "" }); + + const response = await api + .withToken(token) + .events() + .createEvent(metadata); + expect(response.status).to.eql(400); + }); + + it("createEvent - returns 400 if _correlationId and _tokenId are missing", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const metadata = Random.eventMetadata({ + _correlationId: "", + _tokenId: "", + }); + + const response = await api + .withToken(token) + .events() + .createEvent(metadata); + + expect(response.status).to.eql(400); + }); + }); +}); diff --git a/test/component/healthResource.test.js b/test/component/healthResource.test.js new file mode 100644 index 00000000..589c8452 --- /dev/null +++ b/test/component/healthResource.test.js @@ -0,0 +1,31 @@ +const { expect } = require("chai"); + +const API = require("./helpers/API"); +const TestServer = require("./helpers/TestServer"); +const Database = require("../shared/helpers/Database"); + +describe("Health Resource", () => { + let server; + let database; + let api; + + before(async () => { + database = await Database.connect(); + server = await new TestServer().onAnyPort().start(); + api = new API(server.address); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on GET", () => { + it("getHealth - returns 200 and healthy body", async () => { + const response = await api.health().get(); + + expect(response.statusCode).to.eql(200); + expect(response.body).to.eql({ healthy: true }); + }); + }); +}); diff --git a/test/component/helpers/API.js b/test/component/helpers/API.js new file mode 100644 index 00000000..5217b4e3 --- /dev/null +++ b/test/component/helpers/API.js @@ -0,0 +1,401 @@ +const superagent = require("superagent-auth-bearer")(require("superagent")); + +const { Types } = require("../../shared/helpers/Signing"); + +class HealthResource { + constructor(serverAddress) { + this.serverAddress = serverAddress; + } + + async get() { + return superagent.get(`${this.serverAddress}/health`).ok(() => true); + } +} + +class UsersResource { + constructor(serverAddress, token) { + this.serverAddress = serverAddress; + this.token = token; + } + + // TODO: The method here should be PUT and we should move this to UserResource + // as we are "upserting" a user rather than creating a resource under + // the user. + async post(address) { + return superagent + .post(`${this.serverAddress}/users/${address}`) + .ok(() => true); + } +} + +class UserSignatureVerificationResource { + constructor(serverAddress, userAddress) { + this.serverAddress = serverAddress; + this.userAddress = userAddress; + } + + async post(domain, signature) { + const types = { AuthSignature: Types.AuthSignature }; + + return superagent + .post(`${this.serverAddress}/users/${this.userAddress}/verify-signature`) + .ok(() => true) + .send({ address: this.userAddress, domain, types, signature }); + } +} + +class UserResource { + constructor(serverAddress, userAddress) { + this.serverAddress = serverAddress; + this.userAddress = userAddress; + } + + signatureVerification() { + return new UserSignatureVerificationResource( + this.serverAddress, + this.userAddress + ); + } +} + +class VoucherSuppliesResource { + constructor(serverAddress, token) { + this.serverAddress = serverAddress; + this.absoluteServerRoute = `${serverAddress}/voucher-sets`; + this.token = token; + } + + async post(voucherSupplyData, imageFilePath) { + return superagent + .post(`${this.absoluteServerRoute}`) + .field(voucherSupplyData) + .attach("fileToUpload", imageFilePath) + .authBearer(this.token) + .ok(() => true); + } + + async getAll() { + return superagent.get(`${this.absoluteServerRoute}/`).ok(() => true); + } + + async getById(id) { + return superagent.get(`${this.absoluteServerRoute}/${id}`).ok(() => true); + } + + async getStatuses() { + return superagent + .get(`${this.absoluteServerRoute}/status/all`) + .authBearer(this.token) + .ok(() => true); + } + + async getActive() { + return superagent + .get(`${this.absoluteServerRoute}/status/active`) + .authBearer(this.token) + .ok(() => true); + } + + async getInactive() { + return superagent + .get(`${this.absoluteServerRoute}/status/inactive`) + .authBearer(this.token) + .ok(() => true); + } + + async getBySeller(address) { + return superagent + .get(`${this.absoluteServerRoute}/sell/${address}`) + .ok(() => true); + } + + async getByBuyer(address) { + return superagent + .get(`${this.absoluteServerRoute}/buy/${address}`) + .ok(() => true); + } + + async update(voucherSupplyId, data, imageFilePath) { + return superagent + .patch(`${this.absoluteServerRoute}/${voucherSupplyId}`) + .field(data) + .attach("fileToUpload", imageFilePath) + .authBearer(this.token) + .ok(() => true); + } + + async setMetadata(voucherSupplyData) { + return superagent + .patch(`${this.absoluteServerRoute}/set-supply-meta`) + .authBearer(this.token) + .ok(() => true) + .send(voucherSupplyData); + } + + async updateOnTransfer(data) { + return superagent + .patch(`${this.absoluteServerRoute}/update-supply-ontransfer`) + .authBearer(this.token) + .ok(() => true) + .send(data); + } + + async updateOnCancel(data) { + return superagent + .patch(`${this.absoluteServerRoute}/update-supply-oncancel`) + .authBearer(this.token) + .ok(() => true) + .send(data); + } + + async delete(voucherSupplyId) { + return superagent + .delete(`${this.absoluteServerRoute}/${voucherSupplyId}`) + .authBearer(this.token) + .ok(() => true); + } + + async deleteImage(voucherSupplyId, imageFileUrl) { + return superagent + .delete(`${this.absoluteServerRoute}/${voucherSupplyId}/image`) + .authBearer(this.token) + .ok(() => true) + .send({ imageUrl: imageFileUrl }); + } +} + +class VouchersResource { + constructor(serverAddress, token) { + this.serverAddress = serverAddress; + this.absoluteServerRoute = `${serverAddress}/vouchers`; + this.token = token; + } + + async getVouchers() { + return superagent + .get(`${this.absoluteServerRoute}/`) + .authBearer(this.token) + .ok(() => true); + } + + async getVoucherDetails(voucherId) { + return superagent + .get(`${this.absoluteServerRoute}/${voucherId}/voucher-details`) + .authBearer(this.token) + .ok(() => true); + } + + async getBoughtVouchers(supplyId) { + return superagent + .get(`${this.absoluteServerRoute}/buyers/${supplyId}`) + .authBearer(this.token) + .ok(() => true); + } + + async getAll() { + return superagent + .get(`${this.absoluteServerRoute}/all`) + .authBearer(this.token) + .ok(() => true); + } + + async getAllPublic() { + return superagent.get(`${this.absoluteServerRoute}/public`).ok(() => true); + } + + async updateStatus(voucherId, newStatus) { + return superagent + .patch(`${this.absoluteServerRoute}/update`) + .authBearer(this.token) + .ok(() => true) + .send({ _id: voucherId, status: newStatus }); + } + + async updateDelivered(data) { + return superagent + .patch(`${this.absoluteServerRoute}/update-voucher-delivered`) + .authBearer(this.token) + .ok(() => true) + .send(data); + } + + async updateFromCommonEvent(voucherTokenId) { + return superagent + .patch(`${this.absoluteServerRoute}/update-from-common-event`) + .authBearer(this.token) + .ok(() => true) + .send({ + _tokenIdVoucher: voucherTokenId, + }); + } + + async updateStatusFromKeepers(voucherTokenId, status) { + return superagent + .patch(`${this.absoluteServerRoute}/update-status-from-keepers`) + .authBearer(this.token) + .ok(() => true) + .send([ + { + _tokenIdVoucher: voucherTokenId, + status: status, + }, + ]); + } + + async commitToBuy(voucherSupplyId, voucherMetaData) { + return superagent + .post(`${this.absoluteServerRoute}/commit-to-buy/${voucherSupplyId}`) + .authBearer(this.token) + .ok(() => true) + .send(voucherMetaData); + } +} + +class AdministrationResource { + constructor(serverAddress, token) { + this.serverAddress = serverAddress; + this.absoluteServerRoute = `${serverAddress}/admin`; + this.token = token; + } + + async logInAsSuperadmin(username, password) { + return superagent + .post(`${this.absoluteServerRoute}/super/login`) + .auth(username, password) + .ok(() => true); + } + + async makeAdmin(address) { + return superagent + .patch(`${this.absoluteServerRoute}/${address}`) + .authBearer(this.token) + .ok(() => true); + } + + async changeSupplyVisibleStatus(supplyId) { + return superagent + .patch(`${this.absoluteServerRoute}/updateVisibleStatus/${supplyId}`) + .authBearer(this.token) + .ok(() => true); + } +} + +class PaymentsResource { + constructor(serverAddress, token) { + this.serverAddress = serverAddress; + this.absoluteServerRoute = `${serverAddress}/payments`; + this.token = token; + } + + async getByVoucherId(voucherTokenId) { + return superagent + .get(`${this.absoluteServerRoute}/get-payment/${voucherTokenId}`) + .ok(() => true); + } + + async getActors(voucherTokenId) { + return superagent + .get(`${this.absoluteServerRoute}/${voucherTokenId}`) + .ok(() => true); + } + + async post(paymentMetadata) { + return superagent + .post(`${this.absoluteServerRoute}/create-payment`) + .authBearer(this.token) + .ok(() => true) + .send(paymentMetadata); + } +} + +class EventsResource { + constructor(serverAddress, token) { + this.serverAddress = serverAddress; + this.absoluteServerRoute = `${serverAddress}/events`; + this.token = token; + } + + getAll() { + return superagent.get(`${this.absoluteServerRoute}/all`).ok(() => true); + } + + getDetected() { + return superagent + .get(`${this.absoluteServerRoute}/detected`) + .ok(() => true); + } + + getFailed() { + return superagent.get(`${this.absoluteServerRoute}/failed`).ok(() => true); + } + + createEvent(data) { + return superagent + .post(`${this.absoluteServerRoute}/create`) + .authBearer(this.token) + .ok(() => true) + .send(data); + } + + updateByCorrelationId(data) { + return superagent + .patch(`${this.absoluteServerRoute}/update-by-correlation-id`) + .authBearer(this.token) + .ok(() => true) + .send(data); + } + + updateByTokenId(data) { + return superagent + .patch(`${this.absoluteServerRoute}/update-by-token-id`) + .authBearer(this.token) + .ok(() => true) + .send(data); + } +} + +class API { + constructor(serverAddress) { + this.serverAddress = serverAddress; + this.token = null; + } + + withToken(token) { + this.token = token; + return this; + } + + health() { + return new HealthResource(this.serverAddress); + } + + users() { + return new UsersResource(this.serverAddress, this.token); + } + + user(address) { + return new UserResource(this.serverAddress, address); + } + + voucherSupplies() { + return new VoucherSuppliesResource(this.serverAddress, this.token); + } + + vouchers() { + return new VouchersResource(this.serverAddress, this.token); + } + + administration() { + return new AdministrationResource(this.serverAddress, this.token); + } + + events() { + return new EventsResource(this.serverAddress, this.token); + } + + payments() { + return new PaymentsResource(this.serverAddress, this.token); + } +} + +module.exports = API; diff --git a/test/component/helpers/Prerequisites.js b/test/component/helpers/Prerequisites.js new file mode 100644 index 00000000..0ff69fdc --- /dev/null +++ b/test/component/helpers/Prerequisites.js @@ -0,0 +1,171 @@ +const Random = require("../../shared/helpers/Random"); +const Tokens = require("../../shared/helpers/Tokens"); +const { Signing } = require("../../shared/helpers/Signing"); + +class Prerequisites { + constructor(api) { + this.api = api; + } + + async getUserNonce(account) { + const address = account.address; + const userResponse = await this.api.users().post(address); + + return userResponse.body; + } + + async getUserToken(account) { + const address = account.address; + const nonce = await this.getUserNonce(account); + const domain = Random.signingDomain(); + const signature = await Signing.signAuthenticationMessage( + account, + nonce, + domain + ); + + const tokenResponse = await this.api + .user(address) + .signatureVerification() + .post(domain, signature); + + return tokenResponse.text; + } + + async getSuperadminToken(superadminUsername, superadminPassword) { + const response = await this.api + .administration() + .logInAsSuperadmin(superadminUsername, superadminPassword); + + return response.text; + } + + async getAdminToken(superadminUsername, superadminPassword) { + const superadminToken = await this.getSuperadminToken( + superadminUsername, + superadminPassword + ); + + const adminAccount = Random.account(); + await this.getUserNonce(adminAccount); + const adminAddress = adminAccount.address; + + await this.api + .withToken(superadminToken) + .administration() + .makeAdmin(adminAddress); + + return await this.getUserToken(adminAccount); + } + + getGCloudToken(gcloudSecret, tokenSecret) { + return Tokens.sign( + { + token: gcloudSecret, + }, + tokenSecret + ); + } + + /* + Extracted as required many times in component tests for VoucherSuppliesModule + */ + async createVoucherSupplyData() { + const account = Random.account(); + const token = await this.getUserToken(account); + const voucherSupplyOwner = account.address; + const voucherSupplyMetadata = Random.voucherSupplyMetadata(); + const voucherSupplyData = { + ...voucherSupplyMetadata, + voucherOwner: voucherSupplyOwner, + }; + const imageFilePath = "test/fixtures/valid-image-1.png"; + + return [token, voucherSupplyData, imageFilePath]; + } + + async createVoucherSupply(token, voucherSupplyData, imageFilePath) { + const response = await this.api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + + const voucherSupplyId = response.body.voucherSupply._id; + const voucherSupplyOwner = response.body.voucherSupply.voucherOwner; + const qty = response.body.voucherSupply.qty; + const supplyTokenId = response.body.voucherSupply._tokenIdSupply; + + return [voucherSupplyId, voucherSupplyOwner, qty, supplyTokenId]; + } + + /* + Creates the voucher metadata. + @param overrideHolder - replaces the voucher's holder property + */ + createVoucherMetadata(overrideHolder) { + const voucherMetadata = Random.voucherMetadata(); + + if (overrideHolder) { + voucherMetadata._holder = overrideHolder; // replace voucherHolder with override (if provided) + } + + return voucherMetadata; + } + + async createVoucher(token, voucherSupplyId, voucherMetadata) { + const response = await this.api + .withToken(token) + .vouchers() + .commitToBuy(voucherSupplyId, voucherMetadata); + + return [response.status, response.body]; + } + + async createPayment(token, paymentsMetadata) { + const response = await this.api + .withToken(token) + .payments() + .post(paymentsMetadata); + + return [response.status, response.body]; + } + + createVoucherUpdateDeliveredData( + voucherTokenId, + voucherIssuer, + promiseId, + supplyTokenId, + voucherHolder, + correlationId + ) { + return { + _tokenIdVoucher: voucherTokenId, + _issuer: voucherIssuer, + _promiseId: promiseId, + _tokenIdSupply: supplyTokenId, + _holder: voucherHolder, + _correlationId: correlationId, + }; + } + + createSupplyUpdateTransferData( + voucherMetadata, + voucherSupplies, + quantities, + voucherOwner + ) { + return { + _tokenIdVoucher: voucherMetadata._tokenIdVoucher, + _issuer: voucherMetadata._issuer, + _tokenIdSupply: voucherMetadata._tokenIdSupply, + _holder: voucherMetadata._holder, + _correlationId: voucherMetadata._correlationId, + _promiseId: voucherMetadata._promiseId, + voucherSupplies: voucherSupplies, + quantities: quantities, + voucherOwner: voucherOwner, + }; + } +} + +module.exports = Prerequisites; diff --git a/test/component/helpers/TestServer.js b/test/component/helpers/TestServer.js new file mode 100644 index 00000000..866e46c3 --- /dev/null +++ b/test/component/helpers/TestServer.js @@ -0,0 +1,132 @@ +const Server = require("../../../src/Server"); + +const ConfigurationService = require("../../../src/services/ConfigurationService"); +const AuthenticationService = require("../../../src/services/AuthenticationService"); + +const MongooseClient = require("../../../src/clients/MongooseClient"); + +const UsersRepository = require("../../../src/database/User/UsersRepository"); +const VouchersRepository = require("../../../src/database/Voucher/VouchersRepository"); +const VoucherSuppliesRepository = require("../../../src/database/VoucherSupply/VoucherSuppliesRepository"); +const PaymentsRepository = require("../../../src/database/Payment/PaymentsRepository"); +const EventsRepository = require("../../../src/database/Event/EventsRepository"); + +const AdministratorAuthenticationMiddleware = require("../../../src/api/middlewares/AdministratorAuthenticationMiddleware"); +const UserAuthenticationMiddleware = require("../../../src/api/middlewares/UserAuthenticationMiddleware"); + +const UsersModule = require("../../../src/modules/UsersModule"); +const VoucherSuppliesModule = require("../../../src/modules/VoucherSuppliesModule"); +const VouchersModule = require("../../../src/modules/VouchersModule"); +const PaymentsModule = require("../../../src/modules/PaymentsModule"); +const EventsModule = require("../../../src/modules/EventsModule"); +const AdministrationModule = require("../../../src/modules/AdministrationModule"); +const HealthModule = require("../../../src/modules/HealthModule"); + +const Ports = require("../../shared/helpers/Ports"); +const FakeStorage = require("../../shared/fakes/utils/FakeStorage"); +const FileValidator = require("../../../src/services/FileValidator"); +const FileStorageMiddleware = require("../../../src/api/middlewares/FileStorageMiddleware"); + +class TestServer { + constructor() { + this.portPromise = null; + this.configurationOverrides = {}; + } + + onAnyPort() { + this.portPromise = Ports.getAvailablePort(); + return this; + } + + addConfigurationOverrides(overrides) { + this.configurationOverrides = { + ...this.configurationOverrides, + ...overrides, + }; + return this; + } + + async start(port = null) { + const resolvedPort = port || (this.portPromise && (await this.portPromise)); + if (!resolvedPort) { + throw new Error("No port provided."); + } + + const configurationService = new ConfigurationService( + this.configurationOverrides + ); + const authenticationService = new AuthenticationService( + configurationService.tokenSecret + ); + + const mongooseClient = new MongooseClient( + configurationService.databaseConnectionString, + configurationService.databaseName, + configurationService.databaseUsername, + configurationService.databasePassword + ); + + const usersRepository = new UsersRepository(); + const vouchersRepository = new VouchersRepository(); + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const paymentsRepository = new PaymentsRepository(); + const eventsRepository = new EventsRepository(); + + const administratorAuthenticationMiddleware = new AdministratorAuthenticationMiddleware( + authenticationService, + usersRepository + ); + const userAuthenticationMiddleware = new UserAuthenticationMiddleware( + configurationService.gcloudSecret, + authenticationService + ); + const fakeStorage = new FakeStorage(); + const fileValidator = new FileValidator( + configurationService.imageUploadSupportedMimeTypes, + configurationService.imageUploadMinimumFileSizeInKB, + configurationService.imageUploadMaximumFileSizeInKB + ); + const imageUploadStorageMiddleware = new FileStorageMiddleware( + configurationService.imageUploadFileFieldName, + configurationService.imageUploadMaximumFiles, + fileValidator, + fakeStorage + ); + + const dependencies = { + configurationService, + authenticationService, + + usersRepository, + vouchersRepository, + voucherSuppliesRepository, + paymentsRepository, + eventsRepository, + + administratorAuthenticationMiddleware, + userAuthenticationMiddleware, + imageUploadStorageMiddleware, + }; + + const healthModule = new HealthModule(dependencies); + const usersModule = new UsersModule(dependencies); + const voucherSuppliesModule = new VoucherSuppliesModule(dependencies); + const vouchersModule = new VouchersModule(dependencies); + const paymentsModule = new PaymentsModule(dependencies); + const eventsModule = new EventsModule(dependencies); + const administrationModule = new AdministrationModule(dependencies); + + return new Server() + .withMongooseClient(mongooseClient) + .withModule(healthModule) + .withModule(usersModule) + .withModule(voucherSuppliesModule) + .withModule(vouchersModule) + .withModule(paymentsModule) + .withModule(eventsModule) + .withModule(administrationModule) + .start(resolvedPort); + } +} + +module.exports = TestServer; diff --git a/test/component/paymentsResource.test.js b/test/component/paymentsResource.test.js new file mode 100644 index 00000000..e5e4eb82 --- /dev/null +++ b/test/component/paymentsResource.test.js @@ -0,0 +1,461 @@ +const { expect } = require("chai"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +const TestServer = require("./helpers/TestServer"); +const Prerequisites = require("./helpers/Prerequisites"); +const API = require("./helpers/API"); + +describe("Payments Resource", () => { + let server; + let database; + let prerequisites; + let api; + + const tokenSecret = Random.tokenSecret(); + const gcloudSecret = Random.gcloudSecret(); + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ tokenSecret, gcloudSecret }) + .start(); + api = new API(server.address); + prerequisites = new Prerequisites(api); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on GET", () => { + it("getPaymentsByVoucherTokenId - returns 200 and all payments for the given voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + const voucherTokenId = voucherMetadata._tokenIdVoucher; + + // CREATE PAYMENT + const paymentsMetadata = [ + Random.paymentMetadata({ _tokenIdVoucher: voucherTokenId }), + ]; // override with correct id + await prerequisites.createPayment(gcloudToken, paymentsMetadata); + // END CREATE PAYMENT + + const response = await api.payments().getByVoucherId(voucherTokenId); + + const paymentsVoucherTokenId = response.body.payments[0]._tokenIdVoucher; + + expect(response.status).to.eql(200); + expect(paymentsVoucherTokenId).to.eql(voucherTokenId); // match on token id to verify associated payment + }); + + it("getPaymentActors - returns 200 and all payment actors for the given voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + const [, createVoucherResponseBody] = await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + const voucherTokenId = voucherMetadata._tokenIdVoucher; + const voucherId = createVoucherResponseBody.voucherID; + + // CREATE PAYMENT + const paymentsMetadata = [ + Random.paymentMetadata({ _tokenIdVoucher: voucherTokenId }), + ]; // override with correct id + await prerequisites.createPayment(gcloudToken, paymentsMetadata); + // END CREATE PAYMENT + + const response = await api.payments().getActors(voucherId); + + const expectedPropertyName = "distributedAmounts"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("getPaymentActors - returns 400 when voucherId is invalid", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + const voucherTokenId = voucherMetadata._tokenIdVoucher; + const voucherId = "FAKE_INVALID_VOUCHER_ID"; + + // CREATE PAYMENT + const paymentsMetadata = [ + Random.paymentMetadata({ _tokenIdVoucher: voucherTokenId }), + ]; // override with correct id + await prerequisites.createPayment(gcloudToken, paymentsMetadata); + // END CREATE PAYMENT + + const response = await api.payments().getActors(voucherId); + + expect(response.status).to.eql(400); + }); + }); + + context("on POST", () => { + it("createPayment - returns 200 and all payments for the given voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + // CREATE PAYMENT + const paymentsMetadata = [Random.paymentMetadata()]; // must be array + const [ + paymentResponseCode, + paymentResponseBody, + ] = await prerequisites.createPayment(gcloudToken, paymentsMetadata); + // END CREATE PAYMENT + + const expectedPropertyName = "updated"; + const propertyNames = Object.getOwnPropertyNames(paymentResponseBody); + + expect(paymentResponseCode).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(paymentResponseBody[expectedPropertyName]).to.eql(true); + }); + + it("createPayment - returns 403 when invalid token", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + // CREATE PAYMENT + const paymentsMetadata = [Random.paymentMetadata()]; // must be array + const [paymentResponseCode] = await prerequisites.createPayment( + token, + paymentsMetadata + ); // force fail with wrong token + // END CREATE PAYMENT + + expect(paymentResponseCode).to.eql(403); + }); + + it("createPayment - returns 400 when paymentMetadata is not an array", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + // CREATE PAYMENT + const paymentsMetadata = Random.paymentMetadata(); // force failure + const [paymentResponseCode] = await prerequisites.createPayment( + gcloudToken, + paymentsMetadata + ); + // END CREATE PAYMENT + + expect(paymentResponseCode).to.eql(400); + }); + + it("createPayment - returns 400 when paymentsMetadata elements are not objects", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + // CREATE PAYMENT + const paymentsMetadata = ["FAKE_PAYMENTS_METADATA_NOT_AN_OBJECT"]; // force failure + const [paymentResponseCode] = await prerequisites.createPayment( + gcloudToken, + paymentsMetadata + ); + // END CREATE PAYMENT + + expect(paymentResponseCode).to.eql(400); + }); + + it("createPayment - returns 400 when paymentsMetadata elements don't contain voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + const paymentMetadata = Random.paymentMetadata(); + delete paymentMetadata._tokenIdVoucher; // force failure by removing _tokenIdVoucher property + + // CREATE PAYMENT + const paymentsMetadata = [paymentMetadata]; + const [paymentResponseCode] = await prerequisites.createPayment( + gcloudToken, + paymentsMetadata + ); + // END CREATE PAYMENT + + expect(paymentResponseCode).to.eql(400); + }); + + it("createPayment - returns 400 when paymentsMetadata contains invalid voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // CREATE VOUCHER + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END CREATE VOUCHER + + const paymentMetadata = Random.paymentMetadata(); + paymentMetadata._tokenIdVoucher = null; // force failure + + // CREATE PAYMENT + const paymentsMetadata = [paymentMetadata]; + const [paymentResponseCode] = await prerequisites.createPayment( + gcloudToken, + paymentsMetadata + ); + // END CREATE PAYMENT + + expect(paymentResponseCode).to.eql(400); + }); + }); +}); diff --git a/test/component/userResource.test.js b/test/component/userResource.test.js new file mode 100644 index 00000000..61988c60 --- /dev/null +++ b/test/component/userResource.test.js @@ -0,0 +1,43 @@ +const { expect } = require("chai"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); +const TestServer = require("./helpers/TestServer"); +const API = require("./helpers/API"); + +describe("User Resource", () => { + let server; + let database; + let api; + + const tokenSecret = Random.tokenSecret(); + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ tokenSecret }) + .start(); + api = new API(server.address); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on POST", () => { + it("registerUser - returns 200 with a random nonce on success", async () => { + const address = Random.address(); + + const response = await api.users().post(address); + + expect(response.statusCode).to.eql(200); + expect(response.body).to.match(/\d{1,6}/); + }); + }); +}); diff --git a/test/component/userSignatureVerificationResource.test.js b/test/component/userSignatureVerificationResource.test.js new file mode 100644 index 00000000..6c9a0d69 --- /dev/null +++ b/test/component/userSignatureVerificationResource.test.js @@ -0,0 +1,107 @@ +const { expect } = require("chai"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); +const Tokens = require("../shared/helpers/Tokens"); +const { Signing } = require("../shared/helpers/Signing"); + +const API = require("./helpers/API"); +const TestServer = require("./helpers/TestServer"); +const Prerequisites = require("./helpers/Prerequisites"); + +describe("User Signature Verification Resource", () => { + let server; + let database; + let api; + let prerequisites; + + const tokenSecret = Random.tokenSecret(); + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ tokenSecret }) + .start(); + api = new API(server.address); + prerequisites = new Prerequisites(api); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on POST", () => { + it("verifySignature - returns 200 with a JWT valid for 7 days when the signature is valid", async () => { + const account = Random.account(); + const domain = Random.signingDomain(); + const address = account.address; + + const nonce = await prerequisites.getUserNonce(account); + const signature = await Signing.signAuthenticationMessage( + account, + nonce, + domain + ); + + const response = await api + .user(address) + .signatureVerification() + .post(domain, signature); + + const token = response.text; + const tokenPayload = Tokens.verify(token, tokenSecret); + const tokenValidityInDays = Tokens.validityInDays(tokenPayload); + + expect(response.statusCode).to.eql(200); + expect(tokenPayload.user).to.eql(address.toLowerCase()); + expect(tokenValidityInDays).to.eql(7); + }); + + it("verifySignature - returns 401 when the signature is incorrect", async () => { + const account = Random.account(); + const domain = Random.signingDomain(); + const address = account.address; + + await api.users().post(address); + + const nonce = Random.nonce(); + const signature = await Signing.signAuthenticationMessage( + account, + nonce, + domain + ); + + const response = await api + .user(address) + .signatureVerification() + .post(domain, signature); + + expect(response.statusCode).to.eql(401); + expect(response.body).to.eql("Unauthorized."); + }); + + it("verifySignature - returns 400 when the signature is invalid", async () => { + const account = Random.account(); + const domain = Random.signingDomain(); + const address = account.address; + + await api.users().post(address); + + const signature = "not-a-signature"; + + const response = await api + .user(address) + .signatureVerification() + .post(domain, signature); + + expect(response.statusCode).to.eql(400); + expect(response.body).to.eql("Signature was not verified!"); + }); + }); +}); diff --git a/test/component/voucherSuppliesResource.test.js b/test/component/voucherSuppliesResource.test.js new file mode 100644 index 00000000..99cbdbc8 --- /dev/null +++ b/test/component/voucherSuppliesResource.test.js @@ -0,0 +1,1276 @@ +const { expect } = require("chai"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +const TestServer = require("./helpers/TestServer"); +const Prerequisites = require("./helpers/Prerequisites"); +const API = require("./helpers/API"); + +describe("Voucher Supplies Resource", () => { + let server; + let database; + let prerequisites; + let api; + + const tokenSecret = Random.tokenSecret(); + const gcloudSecret = Random.gcloudSecret(); + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ tokenSecret, gcloudSecret }) + .start(); + api = new API(server.address); + prerequisites = new Prerequisites(api); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on POST", () => { + it("createVoucherSupply - returns 201 and the created voucher supply", async () => { + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const response = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + + expect(response.status).to.eql(201); + }); + + it("createVoucherSupply - returns 400 if record with same user and correlationId already exits", async () => { + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + //CREATE VOUCHER SUPPLY + await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + + //TRY TO CREATE VOUCHER SUPPLY WITH SAME METADATA TO ENFORCE FAILURE + const response = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when invalid mime-type", async () => { + let [ + token, + voucherSupplyData, + ] = await prerequisites.createVoucherSupplyData(); + const filePath = "test/fixtures/malicious-fake-image.html"; + + const response = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, filePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when image size too small (<10KB)", async () => { + let [ + token, + voucherSupplyData, + ] = await prerequisites.createVoucherSupplyData(); + const filePath = "test/fixtures/less-than-10KB.png"; + + const response = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, filePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when image size too large (>5MB)", async () => { + let [ + token, + voucherSupplyData, + ] = await prerequisites.createVoucherSupplyData(); + const filePath = "test/fixtures/greater-than-5MB.jpg"; + + const response = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, filePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when invalid dates (start and/or end)", async () => { + let [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + voucherSupplyData.startDate = "FAKE_INVALID_START_DATE"; // force failure + voucherSupplyData.endDate = "FAKE_INVALID_END_DATE"; // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(voucherSupplyData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when invalid voucher supply data", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const fakeVoucherSupplyData = {}; // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(fakeVoucherSupplyData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when empty string for location provided", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const invalidLocationData = Random.voucherSupplyMetadata({ + location: "", + }); // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(invalidLocationData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when empty object for location provided", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const invalidLocationData = Random.voucherSupplyMetadata({ + location: JSON.stringify({}), + }); // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(invalidLocationData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when empty array for location provided", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const invalidLocationData = Random.voucherSupplyMetadata({ + location: JSON.stringify([]), + }); // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(invalidLocationData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when null for location provided", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const invalidLocationData = Random.voucherSupplyMetadata({ + location: JSON.stringify(null), + }); // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(invalidLocationData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when invalid properties for location provided", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const invalidLocationData = Random.voucherSupplyMetadata({ + location: JSON.stringify({ + country: "country", + city: "city", + addressLineOne: "addressLineOne", + addressLineTwo: "addressLineTwo", + fail: "FAIL", + }), + }); // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(invalidLocationData, imageFilePath); + + expect(response.status).to.eql(400); + }); + + it("createVoucherSupply - returns 400 when more properties for location provided", async () => { + const [ + token, + , + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const invalidLocationData = Random.voucherSupplyMetadata({ + location: JSON.stringify({ + country: "country", + city: "city", + address_line_one: "address_line_one", + address_line_two: "address_line_two", + postcode: "metadata.location.postcode", + additionalProp: "cause failure", + }), + }); // force failure + + const response = await api + .withToken(token) + .voucherSupplies() + .post(invalidLocationData, imageFilePath); + + expect(response.status).to.eql(400); + }); + }); + + context("on GET", () => { + it("getAllVoucherSupplies - returns 200 and all voucher supplies", async () => { + const response = await api.voucherSupplies().getAll(); + const expectedPropertyName = "voucherSupplies"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const voucherSuppliesProperty = response.body[expectedPropertyName]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(Array.isArray(voucherSuppliesProperty)).to.eql(true); + }); + + it("getVoucherSupplyById - returns 200 and the requested voucher supply (by ID)", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // QUERY FOR VOUCHER + const response = await api.voucherSupplies().getById(voucherSupplyId); + + expect(response.status).to.eql(200); + expect(response.body.voucherSupply._id).to.eql(voucherSupplyId); // check if queried id matches created id + }); + + it("getVoucherSupplyById - returns 400 and voucher doesn't exist", async () => { + const randomVoucherSupplyId = Random.voucherSupplyId(); // create random instead of extracting + + // QUERY FOR VOUCHER + const response = await api + .voucherSupplies() + .getById(randomVoucherSupplyId); + + expect(response.status).to.eql(400); + }); + + it("getVoucherSupplyStatusesByOwner - returns 200 and the statuses of all voucher supplies for the given address", async () => { + const expectedPropertyNames = ["active", "inactive"]; + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const response = await api + .withToken(token) + .voucherSupplies() + .getStatuses(); + + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include.members(expectedPropertyNames); + }); + + it("getActiveVoucherSuppliesByOwner - returns 200 and the active voucher supplies for the given address", async () => { + const expectedPropertyName = "voucherSupplies"; + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const response = await api.withToken(token).voucherSupplies().getActive(); + + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("getInactiveVoucherSuppliesByOwner - returns 200 and the inactive voucher supplies for the given address", async () => { + const expectedPropertyName = "voucherSupplies"; + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const response = await api + .withToken(token) + .voucherSupplies() + .getInactive(); + + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("getVoucherSuppliesForSeller - returns 200 and the voucher supplies for the given seller", async () => { + const expectedPropertyName = "voucherSupplies"; + const account = Random.account(); + const voucherSupplyOwner = account.address; + + const response = await api + .voucherSupplies() + .getBySeller(voucherSupplyOwner); + + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("getVoucherSuppliesForBuyer - returns 200 and the voucher supplies for the given buyer", async () => { + const expectedPropertyName = "voucherSupplies"; + const account = Random.account(); + const voucherSupplyOwner = account.address; + + const response = await api + .voucherSupplies() + .getByBuyer(voucherSupplyOwner); + + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + }); + + context("on Patch", () => { + it("updateVoucherSupply - returns 200 and the voucher supply update status", async () => { + const expectedPropertyName = "success"; + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // UPDATE VOUCHER WITH NEW IMAGE + const newImageFilePath = "test/fixtures/update-image.png"; + + const response = await api + .withToken(token) + .voucherSupplies() + .update(voucherSupplyId, voucherSupplyData, newImageFilePath); + + const propertyNames = Object.getOwnPropertyNames(response.body); + // END OF UPDATE + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); // expect success = true + }); + + it("updateVoucherSupply - returns 400 when invalid mime-type", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // UPDATE VOUCHER WITH NEW IMAGE + const newImageFilePath = "test/fixtures/malicious-fake-image.html"; + + const response = await api + .withToken(token) + .voucherSupplies() + .update(voucherSupplyId, voucherSupplyData, newImageFilePath); + // END OF UPDATE + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupply - returns 400 when image size too small (<10KB)", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // UPDATE VOUCHER WITH NEW IMAGE + const newImageFilePath = "test/fixtures/less-than-10KB.png"; + + const response = await api + .withToken(token) + .voucherSupplies() + .update(voucherSupplyId, voucherSupplyData, newImageFilePath); + // END OF UPDATE + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupply - returns 400 when image size too large (>5MB)", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // UPDATE VOUCHER WITH NEW IMAGE + const newImageFilePath = "test/fixtures/greater-than-5MB.jpg"; + + const response = await api + .withToken(token) + .voucherSupplies() + .update(voucherSupplyId, voucherSupplyData, newImageFilePath); + // END OF UPDATE + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupply - returns 400 with voucher supply does not exist (i.e. invalid ID)", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + const randomVoucherSupplyId = Random.voucherSupplyId(); // create random instead of extracting + const newImageFilePath = "test/fixtures/update-image.png"; + + const response = await api + .withToken(token) + .voucherSupplies() + .update(randomVoucherSupplyId, {}, newImageFilePath); + + expect(response.status).to.eql(400); + }); + + it("setVoucherSupplyMetaData - returns 200 and the success status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // GET VOUCHER SUPPLY + const responseVoucherSupply = await api + .voucherSupplies() + .getById(voucherSupplyId); + const voucherSupply = responseVoucherSupply.body.voucherSupply; + // END GET VOUCHER SUPPLY + + // SET VOUCHER SUPPLY METADATA + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .setMetadata(voucherSupply); + + const expectedPropertyName = "success"; + const propertyNames = Object.getOwnPropertyNames(response.body); + // SET VOUCHER SUPPLY METADATA + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + //TODO if we are to support updates outside reference app, we should not have this test + xit("setVoucherSupplyMetaData - returns 400 and voucher supply doesn't exist", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // GET VOUCHER SUPPLY + const responseVoucherSupply = await api + .voucherSupplies() + .getById(voucherSupplyId); + const voucherSupply = responseVoucherSupply.body.voucherSupply; + // END GET VOUCHER SUPPLY + + voucherSupply.voucherOwner = null; // force failure + voucherSupply._correlationId = null; // force failure + + // SET VOUCHER SUPPLY METADATA + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .setMetadata(voucherSupply); + // SET VOUCHER SUPPLY METADATA + + expect(response.status).to.eql(400); + }); + + it("setVoucherSupplyMetaData - returns 400 when supply token id is missing", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // GET VOUCHER SUPPLY + const responseVoucherSupply = await api + .voucherSupplies() + .getById(voucherSupplyId); + const voucherSupply = responseVoucherSupply.body.voucherSupply; + // END GET VOUCHER SUPPLY + + delete voucherSupply._tokenIdSupply; /// force failure + + // SET VOUCHER SUPPLY METADATA + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .setMetadata(voucherSupply); + // SET VOUCHER SUPPLY METADATA + + expect(response.status).to.eql(400); + }); + + it("setVoucherSupplyMetaData - returns 400 when voucher supply data is null", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + const voucherSupply = null; // force failure + + // SET VOUCHER SUPPLY METADATA + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .setMetadata(voucherSupply); + // SET VOUCHER SUPPLY METADATA + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnTransfer - singular - returns 200 and the success status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + qty, + supplyTokenId, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + voucherMetadata._promiseId = Random.promiseId(); + // END COMMIT TO BUY + + const voucherSupplies = [supplyTokenId]; + const quantities = [qty]; + const voucherOwner = voucherMetadata._holder; + + const data = prerequisites.createSupplyUpdateTransferData( + voucherMetadata, + voucherSupplies, + quantities, + voucherOwner + ); + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnTransfer(data); + + const expectedPropertyName = "success"; + const propertyNames = Object.getOwnPropertyNames(response.body); + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateVoucherSupplyOnTransfer - batch - returns 200 and the success status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLIES + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + + const [ + token1, + voucherSupplyData1, + imageFilePath1, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId1, + voucherSupplyOwner1, + qty1, + supplyTokenId1, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + const [ + , + , + qty2, + supplyTokenId2, + ] = await prerequisites.createVoucherSupply( + token1, + voucherSupplyData1, + imageFilePath1 + ); + // END CREATE VOUCHER SUPPLIES + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner1 + ); + await prerequisites.createVoucher( + token, + voucherSupplyId1, + voucherMetadata + ); + voucherMetadata._promiseId = Random.promiseId(); + // END COMMIT TO BUY + + const voucherSupplies = [supplyTokenId1, supplyTokenId2]; + const quantities = [qty1, qty2]; + const voucherOwner = voucherMetadata._holder; + + const data = prerequisites.createSupplyUpdateTransferData( + voucherMetadata, + voucherSupplies, + quantities, + voucherOwner + ); + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnTransfer(data); + + const expectedPropertyName = "success"; + const propertyNames = Object.getOwnPropertyNames(response.body); + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateVoucherSupplyOnTransfer - singular - returns 400 when metadata is null", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + voucherMetadata._promiseId = Random.promiseId(); + // END COMMIT TO BUY + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnTransfer(null); // force failure + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnTransfer - singular - returns 400 when voucherOwner is null", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + qty, + supplyTokenId, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + voucherMetadata._promiseId = Random.promiseId(); + // END COMMIT TO BUY + + const voucherSupplies = [supplyTokenId]; + const quantities = [qty]; + const voucherOwner = null; // force failure + + const data = prerequisites.createSupplyUpdateTransferData( + voucherMetadata, + voucherSupplies, + quantities, + voucherOwner + ); + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnTransfer(data); // force failure + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnTransfer - singular - returns 400 when voucherSupplies is null", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + qty, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + voucherMetadata._promiseId = Random.promiseId(); + // END COMMIT TO BUY + + const voucherSupplies = null; // force failure + const quantities = [qty]; + const voucherOwner = voucherMetadata._holder; + + const data = prerequisites.createSupplyUpdateTransferData( + voucherMetadata, + voucherSupplies, + quantities, + voucherOwner + ); + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnTransfer(data); // force failure + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnTransfer - singular - returns 400 when voucherSupplies is empty", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + qty, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + voucherMetadata._promiseId = Random.promiseId(); + // END COMMIT TO BUY + + const voucherSupplies = []; // force failure + const quantities = [qty]; + const voucherOwner = voucherMetadata._holder; + + const data = prerequisites.createSupplyUpdateTransferData( + voucherMetadata, + voucherSupplies, + quantities, + voucherOwner + ); + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnTransfer(data); // force failure + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnCancel - returns 200 and the success status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + const data = { + _tokenIdSupply: voucherSupplyData._tokenIdSupply, + voucherOwner: voucherSupplyData.voucherOwner, + qty: voucherSupplyData.qty, + }; + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnCancel(data); + + const expectedPropertyName = "success"; + const propertyNames = Object.getOwnPropertyNames(response.body); + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateVoucherSupplyOnCancel - returns 400 when request body is null", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + const data = null; // force failure + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnCancel(data); + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnCancel - returns 400 when token supply id is null", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + const data = { + _tokenIdSupply: null, // force failure + voucherOwner: voucherSupplyData.voucherOwner, + qty: voucherSupplyData.qty, + }; + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnCancel(data); + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(400); + }); + + it("updateVoucherSupplyOnCancel - returns 404 and voucher not found", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + const data = { + _tokenIdSupply: Random.uint256(), // force failure + voucherOwner: voucherSupplyData.voucherOwner, + qty: voucherSupplyData.qty, + }; + + // UPDATE VOUCHER SUPPLY ON CANCEL + const response = await api + .withToken(gcloudToken) + .voucherSupplies() + .updateOnCancel(data); + // END UPDATE VOUCHER SUPPLY ON CANCEL + + expect(response.status).to.eql(404); + }); + }); + + context("on DELETE", () => { + it("deleteVoucherSupply - returns 200 and deletes the voucher supply", async () => { + const expectedPropertyName = "success"; + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // DELETE VOUCHER SUPPLY + const response = await api + .withToken(token) + .voucherSupplies() + .delete(voucherSupplyId); + const propertyNames = Object.getOwnPropertyNames(response.body); + // END OF DELETE + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); // expect success = true + }); + + it("deleteVoucherSupply - returns 400 and voucher supply can't be deleted as it doesn't exist", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + const randomVoucherSupplyId = Random.voucherSupplyId(); // create random instead of extracting + + // DELETE VOUCHER SUPPLY + const response = await api + .withToken(token) + .voucherSupplies() + .delete(randomVoucherSupplyId); + // END OF DELETE + + expect(response.status).to.eql(400); + }); + + it("deleteVoucherSupplyImage - returns 200 and deletes the voucher supply image", async () => { + const expectedPropertyName = "success"; + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + const imageFilePathTokens = imageFilePath.split("/"); + const imageName = imageFilePathTokens[imageFilePathTokens.length - 1]; + const imageUrl = `https://boson.example.com/${imageName}`; + + // DELETE VOUCHER SUPPLY IMAGE + const response = await api + .withToken(token) + .voucherSupplies() + .deleteImage(voucherSupplyId, imageUrl); + const propertyNames = Object.getOwnPropertyNames(response.body); + // END OF DELETE + + // QUERY FOR VOUCHER - After Delete + const responseVoucherQuery2 = await api + .voucherSupplies() + .getById(voucherSupplyId); + const vsImagesAfter = responseVoucherQuery2.body.voucherSupply.imagefiles; + const vsImageUrlsAfterDelete = vsImagesAfter.map((image) => image.url); // extract Url for expect comparison with image Url + // END QUERY - After Delete + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); // expect success = true + expect(vsImageUrlsAfterDelete).not.include(imageUrl); // expect image Urls to not include the image Url after deletion + }); + + it("deleteVoucherSupplyImage - returns 400 and image can't be deleted because voucher supply doesn't exist", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + const randomVoucherSupplyId = Random.voucherSupplyId(); // create random instead of extracting + + // DELETE VOUCHER SUPPLY + const response = await api + .withToken(token) + .voucherSupplies() + .deleteImage(randomVoucherSupplyId); + // END OF DELETE + + expect(response.status).to.eql(400); + }); + }); +}); diff --git a/test/component/vouchersResource.test.js b/test/component/vouchersResource.test.js new file mode 100644 index 00000000..43ff7599 --- /dev/null +++ b/test/component/vouchersResource.test.js @@ -0,0 +1,645 @@ +const { expect } = require("chai"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +const TestServer = require("./helpers/TestServer"); +const Prerequisites = require("./helpers/Prerequisites"); +const API = require("./helpers/API"); + +const validVoucherStatuses = Object.values( + require("../../src/utils/voucherStatuses") +); + +describe("Vouchers Resource", () => { + let server; + let database; + let prerequisites; + let api; + + const tokenSecret = Random.tokenSecret(); + const gcloudSecret = Random.gcloudSecret(); + + before(async () => { + database = await Database.connect(); + server = await new TestServer() + .onAnyPort() + .addConfigurationOverrides({ tokenSecret, gcloudSecret }) + .start(); + api = new API(server.address); + prerequisites = new Prerequisites(api); + }); + + afterEach(async () => { + await Database.truncate(); + }); + + after(async () => { + server.stop(); + database.disconnect(); + }); + + context("on GET", () => { + it("getAllVouchersForAddress - returns 200 and all vouchers for the given address", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + + const response = await api.withToken(token).vouchers().getVouchers(); + + const expectedPropertyName = "voucherData"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const vouchersProperty = response.body[expectedPropertyName]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(Array.isArray(vouchersProperty)).to.eql(true); + }); + + it("getVoucherDetails - returns 200 and the requested voucher's details", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); // override voucher holder to given address + const [, createVoucherResponseBody] = await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const voucherId = createVoucherResponseBody.voucherID; // extract voucher ID + + const response = await api + .withToken(token) + .vouchers() + .getVoucherDetails(voucherId); + + expect(response.status).to.eql(200); + expect(response.body.voucher._id).to.eql(voucherId); // check that IDs match + }); + + it("getBoughtVouchers - returns 200 and all bought vouchers for the given supply ID", async () => { + const account = Random.account(); + const token = await prerequisites.getUserToken(account); + const supplyId = Random.voucherSupplyId(); + + const response = await api + .withToken(token) + .vouchers() + .getBoughtVouchers(supplyId); + + const expectedPropertyName = "vouchers"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const vouchersProperty = response.body[expectedPropertyName]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(Array.isArray(vouchersProperty)).to.eql(true); + }); + + it("getAllVouchers - returns 200 and all vouchers", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + const response = await api.withToken(gcloudToken).vouchers().getAll(); + + const expectedPropertyName = "vouchers"; + const propertyNames = Object.getOwnPropertyNames(response.body); + const vouchersProperty = response.body[expectedPropertyName]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(Array.isArray(vouchersProperty)).to.eql(true); + }); + + it("getAllPublicVouchers - returns 200 and all public vouchers", async () => { + const response = await api.vouchers().getAllPublic(); + const expectedPropertyName = "vouchers"; + + const propertyNames = Object.getOwnPropertyNames(response.body); + const vouchersProperty = response.body[expectedPropertyName]; + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(Array.isArray(vouchersProperty)).to.eql(true); + }); + }); + + context("on PATCH", () => { + //TODO Voucher MUST include _correlationId, _holder && _tokenIdSupply while being created + xit("updateVoucherDelivered - returns 200 and updated voucher id", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const voucherTokenId = voucherMetadata._tokenIdVoucher; + const voucherIssuer = voucherSupplyOwner; + const promiseId = Random.promiseId(); + const supplyTokenId = voucherSupplyData._tokenIdSupply; + const voucherHolder = voucherMetadata._holder; + const correlationId = voucherMetadata._correlationId; + + const data = prerequisites.createVoucherUpdateDeliveredData( + voucherTokenId, + voucherIssuer, + promiseId, + supplyTokenId, + voucherHolder, + correlationId + ); + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateDelivered(data); + + const expectedPropertyName = "voucher"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("updateVoucherDelivered - returns 400 and bad request - missing voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const voucherTokenId = null; // force metadata validation failure + const voucherIssuer = voucherSupplyOwner; + const promiseId = Random.promiseId(); + const supplyTokenId = voucherMetadata._tokenIdSupply; + const voucherHolder = voucherMetadata._holder; + const correlationId = voucherMetadata._correlationId; + + const data = prerequisites.createVoucherUpdateDeliveredData( + voucherTokenId, + voucherIssuer, + promiseId, + supplyTokenId, + voucherHolder, + correlationId + ); + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateDelivered(data); + + expect(response.status).to.eql(400); + }); + + it("updateVoucherFromCommonEvent - returns 200 and update success status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const voucherTokenId = voucherMetadata._tokenIdVoucher; + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateFromCommonEvent(voucherTokenId); + + const expectedPropertyName = "updated"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateVoucherFromCommonEvent - returns 400 and bad request - missing voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const voucherTokenId = null; // force metadata validation failure + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateFromCommonEvent(voucherTokenId); + + expect(response.status).to.eql(400); + }); + + it("updateVoucherFromCommonEvent - returns 404 when invalid voucherTokenId", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const voucherTokenId = "FAKE_INVALID_VOUCHER_TOKEN_ID"; // force metadata validation failure + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateFromCommonEvent(voucherTokenId); + + expect(response.status).to.eql(404); + }); + + it("updateVoucherStatusFromKeepers - returns 200 and voucher updated success status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const newStatus = validVoucherStatuses[0]; // change to guaranteed valid status + const voucherTokenId = voucherMetadata._tokenIdVoucher; + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateStatusFromKeepers(voucherTokenId, newStatus); + + const expectedPropertyName = "updated"; + const propertyNames = Object.getOwnPropertyNames(response.body); + + expect(response.status).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + expect(response.body[expectedPropertyName]).to.eql(true); + }); + + it("updateVoucherStatusFromKeepers - returns 400 on voucher update to invalid status", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const newStatus = "FAKE_INVALID_STATUS_TEST"; // change to invalid status to force failure + const voucherTokenId = voucherMetadata._tokenIdVoucher; + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateStatusFromKeepers(voucherTokenId, newStatus); + + expect(response.status).to.eql(400); + }); + + it("updateVoucherStatusFromKeepers - returns 400 when invalid voucher token id", async () => { + const gcloudToken = await prerequisites.getGCloudToken( + gcloudSecret, + tokenSecret + ); + + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const newStatus = validVoucherStatuses[0]; // change to guaranteed valid status + const voucherTokenId = "FAKE_INVALID_VOUCHER_TOKEN_ID"; // force failure + + const response = await api + .withToken(gcloudToken) + .vouchers() + .updateStatusFromKeepers(voucherTokenId, newStatus); + + expect(response.status).to.eql(400); + }); + }); + + context("on POST", () => { + it("createVoucher - returns 200 with the voucher ID", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + const [ + createVoucherResponseCode, + createVoucherResponseBody, + ] = await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + const expectedPropertyName = "voucherID"; + const propertyNames = Object.getOwnPropertyNames( + createVoucherResponseBody + ); + + expect(createVoucherResponseCode).to.eql(200); + expect(propertyNames).to.include(expectedPropertyName); + }); + + it("createVoucher - returns 400 if record with same user and correlationId already exits", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [ + voucherSupplyId, + voucherSupplyOwner, + ] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY 1 Voucher + const voucherMetadata = prerequisites.createVoucherMetadata( + voucherSupplyOwner + ); + await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + // TRY TO COMMIT ANOTHER VOUCHER WITH SAME VOUCHER METADATA TO FORCE FAILURE + const [createVoucherResponseCode] = await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + + expect(createVoucherResponseCode).to.eql(400); + }); + + it("createVoucher - returns 403 with forbidden (voucher holder doesn't match requesting address)", async () => { + // CREATE VOUCHER SUPPLY + const [ + token, + voucherSupplyData, + imageFilePath, + ] = await prerequisites.createVoucherSupplyData(); + const [voucherSupplyId] = await prerequisites.createVoucherSupply( + token, + voucherSupplyData, + imageFilePath + ); + // END CREATE VOUCHER SUPPLY + + // COMMIT TO BUY + const voucherMetadata = prerequisites.createVoucherMetadata(); // no override to force failure + const [createVoucherResponseCode] = await prerequisites.createVoucher( + token, + voucherSupplyId, + voucherMetadata + ); + // END COMMIT TO BUY + + expect(createVoucherResponseCode).to.eql(403); + }); + }); +}); diff --git a/test/fixtures/greater-than-5MB.jpg b/test/fixtures/greater-than-5MB.jpg new file mode 100644 index 00000000..6bcc048e Binary files /dev/null and b/test/fixtures/greater-than-5MB.jpg differ diff --git a/test/fixtures/less-than-10KB.png b/test/fixtures/less-than-10KB.png new file mode 100644 index 00000000..6b63c320 Binary files /dev/null and b/test/fixtures/less-than-10KB.png differ diff --git a/test/fixtures/malicious-fake-image.html b/test/fixtures/malicious-fake-image.html new file mode 100644 index 00000000..2aaa0226 --- /dev/null +++ b/test/fixtures/malicious-fake-image.html @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/test/fixtures/update-image.png b/test/fixtures/update-image.png new file mode 100644 index 00000000..0159bb21 Binary files /dev/null and b/test/fixtures/update-image.png differ diff --git a/test/fixtures/valid-image-1.png b/test/fixtures/valid-image-1.png new file mode 100644 index 00000000..eb0f6d79 Binary files /dev/null and b/test/fixtures/valid-image-1.png differ diff --git a/test/fixtures/valid-image-2.jpg b/test/fixtures/valid-image-2.jpg new file mode 100644 index 00000000..e793f4c5 Binary files /dev/null and b/test/fixtures/valid-image-2.jpg differ diff --git a/test/integration/utils/AWSS3Storage.test.js b/test/integration/utils/AWSS3Storage.test.js new file mode 100644 index 00000000..fad5826d --- /dev/null +++ b/test/integration/utils/AWSS3Storage.test.js @@ -0,0 +1,221 @@ +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +chai.use(chaiAsPromised); +const { expect } = chai; + +const fs = require("fs"); +const { S3 } = require("aws-sdk"); +const MockExpressRequest = require("mock-express-request"); + +const AWSS3Storage = require("../../../src/utils/AWSS3Storage"); +const Promises = require("../../shared/helpers/Promises"); +const Random = require("../../shared/helpers/Random"); +const RegExps = require("../../shared/helpers/RegExps"); +const Streams = require("../../shared/helpers/Streams"); + +describe("AWSS3Storage", function () { + this.timeout(15 * 1000); // set longer timeout for image upload + + context("_handleFile", () => { + const bucketName = process.env.AWS_IMAGE_UPLOAD_STORAGE_BUCKET_NAME; + const region = process.env.AWS_REGION; + let info, s3; + + before(async () => { + const storage = new AWSS3Storage(bucketName); + + const file = { + fieldname: "whatever", + originalname: "valid-image-1.png", + encoding: "7bit", + mimetype: "image/png", + stream: fs.createReadStream("test/fixtures/valid-image-1.png"), + }; + const request = new MockExpressRequest(); + const handleFile = Promises.promisify(storage._handleFile, storage); + const result = await handleFile(request, file); + + info = result[0]; + + s3 = new S3(); + }); + + it("includes the location in the resulting info", async () => { + expect(info.location).to.match( + new RegExp(`https:\\/\\/${bucketName}.s3.${region}.amazonaws.com\\/.*`) + ); + }); + + it("includes the bucket in the resulting info", async () => { + expect(info.bucket).to.eql(bucketName); + }); + + it("includes the key in the resulting info", async () => { + expect(info.key).to.match(RegExps.uuidV4); + }); + + it("includes the size in the resulting info", async () => { + expect(info.size).to.eql(2236328); + }); + + it("includes the content type in the resulting info", async () => { + expect(info.contentType).to.eql("image/png"); + }); + + it("uploads the file to S3", async () => { + const source = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-1.png") + ); + const object = await Streams.readBinaryPromise( + s3 + .getObject({ + Bucket: bucketName, + Key: info.key, + }) + .createReadStream() + ); + + expect(object).to.eql(source); + }); + + it("allows public read of the file", async () => { + const acl = await s3 + .getObjectAcl({ + Bucket: bucketName, + Key: info.key, + }) + .promise(); + + expect(acl.Grants).to.deep.include({ + Grantee: { + Type: "Group", + URI: "http://acs.amazonaws.com/groups/global/AllUsers", + }, + Permission: "READ", + }); + }); + + it("uses the mimetype of the file", async () => { + const object = await s3 + .headObject({ + Bucket: bucketName, + Key: info.key, + }) + .promise(); + + expect(object.ContentType).to.eql("image/png"); + }); + + it("uses server side encryption for the file", async () => { + const object = await s3 + .headObject({ + Bucket: bucketName, + Key: info.key, + }) + .promise(); + + expect(object.ServerSideEncryption).to.eql("AES256"); + }); + }); + + context("_removeFile", () => { + const bucketName = process.env.AWS_IMAGE_UPLOAD_STORAGE_BUCKET_NAME; + let key, s3; + + before(async () => { + s3 = new S3(); + key = Random.uuid(); + + await s3 + .upload({ + Bucket: bucketName, + Key: key, + Body: fs.createReadStream("test/fixtures/valid-image-1.png"), + ServerSideEncryption: "AES256", + }) + .promise(); + + const storage = new AWSS3Storage(bucketName); + + const file = { + bucket: bucketName, + key: key, + }; + const request = new MockExpressRequest(); + const removeFile = Promises.promisify(storage._removeFile, storage); + + await removeFile(request, file); + }); + + it("removes the file from S3", async () => { + await expect( + s3 + .headObject({ + Bucket: bucketName, + Key: key, + }) + .promise() + ).to.eventually.be.rejected; + }); + }); + + context("_removeFiles", () => { + const bucketName = process.env.AWS_IMAGE_UPLOAD_STORAGE_BUCKET_NAME; + let key1, key2, s3, files; + + before(async () => { + s3 = new S3(); + key1 = Random.uuid(); + key2 = Random.uuid(); + + await s3 + .upload({ + Bucket: bucketName, + Key: key1, + Body: fs.createReadStream("test/fixtures/valid-image-1.png"), + ServerSideEncryption: "AES256", + }) + .promise(); + await s3 + .upload({ + Bucket: bucketName, + Key: key2, + Body: fs.createReadStream("test/fixtures/update-image.png"), + ServerSideEncryption: "AES256", + }) + .promise(); + + const storage = new AWSS3Storage(bucketName); + + files = [ + { + bucket: bucketName, + key: key1, + }, + { + bucket: bucketName, + key: key2, + }, + ]; + const request = new MockExpressRequest(); + const removeFiles = Promises.promisify(storage._removeFiles, storage); + + await removeFiles(request, files); + }); + + it("removes all files from S3", async () => { + await Promise.all( + files.map((file) => { + return expect( + s3 + .headObject({ + Bucket: file.bucket, + Key: file.key, + }) + .promise() + ).to.eventually.be.rejected; + }) + ); + }); + }); +}); diff --git a/test/integration/utils/GCPStorage.test.js b/test/integration/utils/GCPStorage.test.js new file mode 100644 index 00000000..4466bc98 --- /dev/null +++ b/test/integration/utils/GCPStorage.test.js @@ -0,0 +1,185 @@ +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +chai.use(chaiAsPromised); +const { expect } = chai; + +const fs = require("fs"); +const { Storage } = require("@google-cloud/storage"); +const MockExpressRequest = require("mock-express-request"); + +const GCPStorage = require("../../../src/utils/GCPStorage"); +const Promises = require("../../shared/helpers/Promises"); +const Random = require("../../shared/helpers/Random"); +const RegExps = require("../../shared/helpers/RegExps"); +const Streams = require("../../shared/helpers/Streams"); + +describe("GCPStorage", function () { + this.timeout(15 * 1000); // set longer timeout for image upload + + context("_handleFile", () => { + const bucketName = process.env.GCP_IMAGE_UPLOAD_STORAGE_BUCKET_NAME; + let info, gcpStorage; + + before(async () => { + const storage = new GCPStorage(bucketName); + + const file = { + fieldname: "whatever", + originalname: "valid-image-1.png", + encoding: "7bit", + mimetype: "image/png", + stream: fs.createReadStream("test/fixtures/valid-image-1.png"), + }; + const request = new MockExpressRequest(); + const handleFile = Promises.promisify(storage._handleFile, storage); + const result = await handleFile(request, file); + + info = result[0]; + + gcpStorage = new Storage(); + }); + + it("includes the location in the resulting info", async () => { + expect(info.location).to.match( + new RegExp(`https:\\/\\/${bucketName}.storage.googleapis.com\\/.*`) + ); + }); + + it("includes the bucket in the resulting info", async () => { + expect(info.bucket).to.eql(bucketName); + }); + + it("includes the key in the resulting info", async () => { + expect(info.key).to.match(RegExps.uuidV4); + }); + + it("includes the size in the resulting info", async () => { + expect(info.size).to.eql(2236328); + }); + + it("includes the content type in the resulting info", async () => { + expect(info.contentType).to.eql("image/png"); + }); + + it("uploads the file to Google Cloud Storage", async () => { + const source = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-1.png") + ); + const object = await Streams.readBinaryPromise( + gcpStorage.bucket(bucketName).file(info.key).createReadStream() + ); + + expect(object).to.eql(source); + }); + + it("allows public read of the file", async () => { + const [isPublic] = await gcpStorage + .bucket(bucketName) + .file(info.key) + .isPublic(); + + expect(isPublic).to.eql(true); + }); + + it("uses the mimetype of the file", async () => { + const [metadata] = await gcpStorage + .bucket(bucketName) + .file(info.key) + .getMetadata(); + + expect(metadata.contentType).to.eql("image/png"); + }); + }); + + context("_removeFile", () => { + const bucketName = process.env.GCP_IMAGE_UPLOAD_STORAGE_BUCKET_NAME; + let key, gcpStorage; + + before(async () => { + gcpStorage = new Storage(); + key = Random.uuid(); + + await gcpStorage + .bucket(bucketName) + .file(key) + .save(fs.readFileSync("test/fixtures/valid-image-1.png"), { + predefinedAcl: "publicread", + metadata: { + contentType: "image/png", + }, + }); + + const storage = new GCPStorage(bucketName); + + const file = { + bucket: bucketName, + key: key, + }; + const request = new MockExpressRequest(); + const removeFile = Promises.promisify(storage._removeFile, storage); + + await removeFile(request, file); + }); + + it("removes the file from Google Cloud Storage", async () => { + await expect(gcpStorage.bucket(bucketName).file(key).get()).to.eventually + .be.rejected; + }); + }); + + context("_removeFiles", () => { + const bucketName = process.env.GCP_IMAGE_UPLOAD_STORAGE_BUCKET_NAME; + let key1, key2, gcpStorage, files; + + before(async () => { + gcpStorage = new Storage(); + key1 = Random.uuid(); + key2 = Random.uuid(); + + await gcpStorage + .bucket(bucketName) + .file(key1) + .save(fs.readFileSync("test/fixtures/valid-image-1.png"), { + predefinedAcl: "publicread", + metadata: { + contentType: "image/png", + }, + }); + await gcpStorage + .bucket(bucketName) + .file(key2) + .save(fs.readFileSync("test/fixtures/update-image.png"), { + predefinedAcl: "publicread", + metadata: { + contentType: "image/png", + }, + }); + + const storage = new GCPStorage(bucketName); + + files = [ + { + bucket: bucketName, + key: key1, + }, + { + bucket: bucketName, + key: key2, + }, + ]; + const request = new MockExpressRequest(); + const removeFiles = Promises.promisify(storage._removeFiles, storage); + + await removeFiles(request, files); + }); + + it("removes all files from S3", async () => { + await Promise.all( + files.map((file) => { + return expect(gcpStorage.bucket(bucketName).file(file.key).get()).to + .eventually.be.rejected; + }) + ); + }); + }); +}); diff --git a/test/persistence/EventsRepository.test.js b/test/persistence/EventsRepository.test.js new file mode 100644 index 00000000..499ee6f2 --- /dev/null +++ b/test/persistence/EventsRepository.test.js @@ -0,0 +1,270 @@ +const chai = require("chai"); +chai.use(require("chai-as-promised")); + +const expect = chai.expect; + +const EventsRepository = require("../../src/database/Event/EventsRepository"); +const Event = require("../../src/database/models/Event"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +describe("Events Repository", () => { + before(async () => { + await Database.connect(); + }); + + afterEach(async () => { + await Database.truncateCollection(Event); + }); + + after(async () => { + await Database.disconnect(); + }); + + context("createEvent", () => { + it("stores event", async () => { + const metadata = Random.eventMetadata(); + const eventsRepository = new EventsRepository(); + const created = await eventsRepository.create(metadata); + + expect(created.name).to.eq(metadata.name); + expect(created.address).to.eq(metadata.address); + expect(created.eventDetected).to.be.false; + expect(created._correlationId).to.eq(metadata._correlationId); + expect(created._tokenId).to.eq(metadata._tokenId); + }); + + it("fails when name is missing", async () => { + const metadata = Random.eventMetadata({ name: "" }); + const eventsRepository = new EventsRepository(); + + await expect(eventsRepository.create(metadata)).to.be.rejectedWith( + "Event validation failed: name: Path `name` is required." + ); + }); + + it("fails when address is missing", async () => { + const metadata = Random.eventMetadata({ address: "" }); + const eventsRepository = new EventsRepository(); + + await expect(eventsRepository.create(metadata)).to.be.rejectedWith( + "Event validation failed: address: Path `address` is required." + ); + }); + + it("trims event name when including whitespace", async () => { + const eventName = Random.eventName(); + const metadata = Random.eventMetadata({ name: ` ${eventName} ` }); + + const eventsRepository = new EventsRepository(); + const created = await eventsRepository.create(metadata); + + expect(created.name).to.eq(eventName); + }); + }); + + context("updateEvent", () => { + it("fails if address is missing", async () => { + const metadata = Random.eventMetadata(); + const eventsRepository = new EventsRepository(); + + let created = await eventsRepository.create(metadata); + + created.address = ""; + + await expect(eventsRepository.update(created)).to.be.rejectedWith( + "Event validation failed: address: Path `address` is required." + ); + }); + + it("fails if name is missing", async () => { + const metadata = Random.eventMetadata(); + const eventsRepository = new EventsRepository(); + + let created = await eventsRepository.create(metadata); + + created.name = ""; + + await expect(eventsRepository.update(created)).to.be.rejectedWith( + "Event validation failed: name: Path `name` is required." + ); + }); + }); + + context("findByCorrelationId", () => { + it("finds event by specified _correlationId, address and event name", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + const found = await eventsRepository.findByCorrelationId({ + name: metadata.name, + _correlationId: metadata._correlationId, + address: metadata.address, + }); + + expect(found.toObject()).to.eql(event.toObject()); + }); + + it("fails if address is missing", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + await expect( + eventsRepository.findByCorrelationId({ + name: metadata.name, + _correlationId: metadata._correlationId, + }) + ).to.be.rejectedWith( + `Event ${metadata.name} with Correlation Id: ${metadata._correlationId} for User: undefined does not exist!` + ); + }); + + it("fails if _correlationId is missing", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + await expect( + eventsRepository.findByCorrelationId({ + name: metadata.name, + address: metadata.address, + }) + ).to.be.rejectedWith( + `Event ${metadata.name} with Correlation Id: undefined for User: ${metadata.address} does not exist!` + ); + }); + + it("fails if name is missing", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + + await expect( + eventsRepository.findByCorrelationId({ + address: metadata.address, + _correlationId: metadata._correlationId, + }) + ).to.be.rejectedWith( + `Event undefined with Correlation Id: ${metadata._correlationId} for User: ${metadata.address} does not exist!` + ); + }); + }); + + context("findByTokenId", () => { + it("finds event by specified _tokenId and event name", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + const found = await eventsRepository.findByTokenId({ + name: metadata.name, + _tokenId: metadata._tokenId, + }); + + expect(found.toObject()).to.eql(event.toObject()); + }); + + it("fails if _tokenId is missing", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + + await expect( + eventsRepository.findByTokenId({ + name: metadata.name, + }) + ).to.be.rejectedWith( + `Event ${metadata.name} with Token Id: undefined does not exist!` + ); + }); + + it("fails if event name is missing", async () => { + const metadata = Random.eventMetadata(); + const event = new Event(metadata); + await event.save(); + + const eventsRepository = new EventsRepository(); + + await expect( + eventsRepository.findByTokenId({ + _tokenId: metadata._tokenId, + }) + ).to.be.rejectedWith( + `Event undefined with Token Id: ${metadata._tokenId} does not exist!` + ); + }); + }); + + context("getAllDetected", () => { + it("returns all events that have been detected", async () => { + const metadata1 = Random.eventMetadata({ eventDetected: true }); + const metadata2 = Random.eventMetadata({ eventDetected: true }); + const metadata3 = Random.eventMetadata(); + + const event1 = new Event(metadata1); + const event2 = new Event(metadata2); + const event3 = new Event(metadata3); + + await event1.save(); + await event2.save(); + await event3.save(); + + const eventsRepository = new EventsRepository(); + + let events = await eventsRepository.getAllDetected(); + + expect(events.length).to.eq(2); + expect(events[0].toObject()).to.eql(event1.toObject()); + expect(events[1].toObject()).to.eql(event2.toObject()); + }); + + it("returns an empty list when there are no events", async () => { + const eventsRepository = new EventsRepository(); + const events = await eventsRepository.getAllDetected(); + + expect(events).to.eql([]); + }); + }); + + context("getAllFailed", () => { + it("returns all events that have not been detected", async () => { + const metadata1 = Random.eventMetadata({ eventDetected: true }); + const metadata2 = Random.eventMetadata(); + const metadata3 = Random.eventMetadata(); + + const event1 = new Event(metadata1); + const event2 = new Event(metadata2); + const event3 = new Event(metadata3); + + await event1.save(); + await event2.save(); + await event3.save(); + + const eventsRepository = new EventsRepository(); + + let events = await eventsRepository.getAllFailed(); + + expect(events.length).to.eq(2); + expect(events[0].toObject()).to.eql(event2.toObject()); + expect(events[1].toObject()).to.eql(event3.toObject()); + }); + + it("returns an empty list when there are no events", async () => { + const eventsRepository = new EventsRepository(); + const events = await eventsRepository.getAllFailed(); + + expect(events).to.eql([]); + }); + }); +}); diff --git a/test/persistence/PaymentsRepository.test.js b/test/persistence/PaymentsRepository.test.js new file mode 100644 index 00000000..cb5413c1 --- /dev/null +++ b/test/persistence/PaymentsRepository.test.js @@ -0,0 +1,207 @@ +const chai = require("chai"); +chai.use(require("chai-as-promised")); + +const expect = chai.expect; + +const PaymentsRepository = require("../../src/database/Payment/PaymentsRepository"); +const Payment = require("../../src/database/models/Payment"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +describe("Payments Repository", () => { + before(async () => { + await Database.connect(); + }); + + afterEach(async () => { + await Database.truncateCollection(Payment); + }); + + after(async () => { + await Database.disconnect(); + }); + + context("createPayment", () => { + it("stores the payment when valid", async () => { + const metadata = Random.paymentMetadata(); + + const paymentsRepository = new PaymentsRepository(); + await paymentsRepository.createPayment(metadata); + + const payment = await Payment.findOne({ + _tokenIdVoucher: metadata._tokenIdVoucher, + }); + + expect(payment._tokenIdVoucher).to.eql(metadata._tokenIdVoucher); + expect(payment._to).to.eql(metadata._to); + expect(payment._payment.toString()).to.eql(metadata._payment); + expect(payment._type).to.eql(metadata._type); + expect(payment.txHash).to.eql(metadata.txHash); + }); + + it("fails when voucher token ID is missing", async () => { + const metadata = Random.paymentMetadata({ + _tokenIdVoucher: null, + }); + + const paymentsRepository = new PaymentsRepository(); + + await expect( + paymentsRepository.createPayment(metadata) + ).to.be.rejectedWith( + "Payment validation failed: _tokenIdVoucher: Path `_tokenIdVoucher` is required." + ); + }); + + it("trims the voucher token ID when including whitespace", async () => { + const voucherTokenId = Random.uint256(); + const metadata = Random.paymentMetadata({ + _tokenIdVoucher: ` ${voucherTokenId} `, + }); + + const paymentsRepository = new PaymentsRepository(); + await paymentsRepository.createPayment(metadata); + + const payment = await Payment.findOne({ + _tokenIdVoucher: metadata._tokenIdVoucher, + }); + + expect(payment._tokenIdVoucher).to.eql(voucherTokenId); + }); + + it("fails when payment is missing", async () => { + const metadata = Random.paymentMetadata({ + _payment: null, + }); + + const paymentsRepository = new PaymentsRepository(); + + await expect( + paymentsRepository.createPayment(metadata) + ).to.be.rejectedWith( + "Payment validation failed: _payment: Path `_payment` is required." + ); + }); + + it("fails when to is missing", async () => { + const metadata = Random.paymentMetadata({ + _to: null, + }); + + const paymentsRepository = new PaymentsRepository(); + + await expect( + paymentsRepository.createPayment(metadata) + ).to.be.rejectedWith( + "Payment validation failed: _to: Path `_to` is required." + ); + }); + + it("fails when type is missing", async () => { + const metadata = Random.paymentMetadata({ + _type: null, + }); + + const paymentsRepository = new PaymentsRepository(); + + await expect( + paymentsRepository.createPayment(metadata) + ).to.be.rejectedWith( + "Payment validation failed: _type: Path `_type` is required." + ); + }); + + it("trims the type when including whitespace", async () => { + const type = Random.paymentType(); + const metadata = Random.paymentMetadata({ + _type: ` ${type} `, + }); + + const paymentsRepository = new PaymentsRepository(); + await paymentsRepository.createPayment(metadata); + + const payment = await Payment.findOne({ + _tokenIdVoucher: metadata._tokenIdVoucher, + }); + + expect(payment._type).to.eql(type); + }); + + it("fails when transaction hash is missing", async () => { + const metadata = Random.paymentMetadata({ + txHash: null, + }); + + const paymentsRepository = new PaymentsRepository(); + + await expect( + paymentsRepository.createPayment(metadata) + ).to.be.rejectedWith( + "Payment validation failed: txHash: Path `txHash` is required." + ); + }); + }); + + context("getPaymentsByVoucherTokenId", () => { + it("finds all payments for the provided voucher token ID", async () => { + const voucherTokenId = Random.uint256(); + + const metadata1 = Random.paymentMetadata({ + _tokenIdVoucher: voucherTokenId, + }); + const metadata2 = Random.paymentMetadata(); + const metadata3 = Random.paymentMetadata({ + _tokenIdVoucher: voucherTokenId, + }); + + const payment1 = new Payment(metadata1); + const payment2 = new Payment(metadata2); + const payment3 = new Payment(metadata3); + + await payment1.save(); + await payment2.save(); + await payment3.save(); + + const paymentsRepository = new PaymentsRepository(); + const payments = await paymentsRepository.getPaymentsByVoucherTokenId( + voucherTokenId + ); + + expect(payments.length).to.eql(2); + expect(payments[0].toObject()).to.eql(payment1.toObject()); + expect(payments[1].toObject()).to.eql(payment3.toObject()); + }); + + it("returns empty list when no payments for voucher token ID", async () => { + const voucherTokenId = Random.uint256(); + + const metadata1 = Random.paymentMetadata(); + const metadata2 = Random.paymentMetadata(); + + const payment1 = new Payment(metadata1); + const payment2 = new Payment(metadata2); + + await payment1.save(); + await payment2.save(); + + const paymentsRepository = new PaymentsRepository(); + const payments = await paymentsRepository.getPaymentsByVoucherTokenId( + voucherTokenId + ); + + expect(payments).to.eql([]); + }); + + it("returns an empty list when there are no payments", async () => { + const voucherTokenId = Random.uint256(); + + const paymentsRepository = new PaymentsRepository(); + const payments = await paymentsRepository.getPaymentsByVoucherTokenId( + voucherTokenId + ); + + expect(payments).to.eql([]); + }); + }); +}); diff --git a/test/persistence/UsersRepository.test.js b/test/persistence/UsersRepository.test.js new file mode 100644 index 00000000..6c6de652 --- /dev/null +++ b/test/persistence/UsersRepository.test.js @@ -0,0 +1,235 @@ +const chai = require("chai"); +chai.use(require("chai-as-promised")); + +const expect = chai.expect; + +const UsersRepository = require("../../src/database/User/UsersRepository"); +const User = require("../../src/database/models/User"); +const userRoles = require("../../src/database/User/userRoles"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +describe("Users Repository", () => { + before(async () => { + await Database.connect(); + }); + + afterEach(async () => { + await Database.truncateCollection(User); + }); + + after(async () => { + await Database.disconnect(); + }); + + context("createUser", () => { + it("stores the user when valid", async () => { + const address = Random.address(); + const nonce = Random.nonce(); + + const usersRepository = new UsersRepository(); + await usersRepository.createUser(address, nonce); + + const user = await User.findOne({ address }); + + expect(user.address).to.eql(address); + expect(user.nonce).to.eql(nonce); + expect(user.role).to.eql(userRoles.USER); + }); + + it("fails if nonce is negative", async () => { + const address = Random.address(); + const nonce = -167463; + + const usersRepository = new UsersRepository(); + await expect( + usersRepository.createUser(address, nonce) + ).to.be.rejectedWith( + "User validation failed: nonce: Nonce must be a positive number" + ); + }); + + it("fails if nonce is not a number", async () => { + const address = Random.address(); + const nonce = "not-a-number"; + + const usersRepository = new UsersRepository(); + await expect( + usersRepository.createUser(address, nonce) + ).to.be.rejectedWith( + 'User validation failed: nonce: Cast to Number failed for value "not-a-number" at path "nonce"' + ); + }); + + it("uses a nonce of zero when not provided", async () => { + const address = Random.address(); + const nonce = undefined; + + const usersRepository = new UsersRepository(); + await usersRepository.createUser(address, nonce); + + const user = await User.findOne({ address }); + + expect(user.nonce).to.eql(0); + }); + + it("fails if address is not provided", async () => { + const address = undefined; + const nonce = Random.nonce(); + + const usersRepository = new UsersRepository(); + await expect( + usersRepository.createUser(address, nonce) + ).to.be.rejectedWith( + "User validation failed: address: Path `address` is required." + ); + }); + }); + + context("preserveNonce", () => { + it("creates a user and stores the nonce when user doesn't exist", async () => { + const address = Random.address(); + const nonce = Random.nonce(); + + const usersRepository = new UsersRepository(); + await usersRepository.preserveNonce(address, nonce); + + const user = await User.findOne({ address }); + + expect(user.nonce).to.eql(nonce); + }); + + it("sets the nonce on a user when user already exists", async () => { + const address = Random.address(); + const nonce = Random.nonce(); + + const usersRepository = new UsersRepository(); + await usersRepository.createUser(address, undefined); + + await usersRepository.preserveNonce(address, nonce); + + const user = await User.findOne({ address }); + + expect(user.nonce).to.eql(nonce); + }); + + it("replaces the nonce on subsequent calls", async () => { + const address = Random.address(); + const firstNonce = Random.nonce(); + const secondNonce = Random.nonce(); + + const usersRepository = new UsersRepository(); + await usersRepository.preserveNonce(address, firstNonce); + await usersRepository.preserveNonce(address, secondNonce); + + const user = await User.findOne({ address }); + + expect(user.nonce).to.eql(secondNonce); + }); + }); + + context("getNonce", () => { + it("gets the nonce when the user exists", async () => { + const address = Random.address(); + const createdNonce = Random.nonce(); + + const usersRepository = new UsersRepository(); + await usersRepository.createUser(address, createdNonce); + + const foundNonce = await usersRepository.getNonce(address); + + expect(foundNonce).to.eql(createdNonce); + }); + + it("throws when there is no user for the address", async () => { + const address = Random.address(); + + const usersRepository = new UsersRepository(); + + await expect(usersRepository.getNonce(address)).to.be.rejectedWith( + "Cannot read property 'nonce' of null" + ); + }); + }); + + context("getUser", () => { + it("returns the user when it exists", async () => { + const address = Random.address(); + const nonce = Random.nonce(); + + await new User({ + address, + nonce, + role: userRoles.USER, + }).save(); + + const usersRepository = new UsersRepository(); + + const user = await usersRepository.getUser(address); + + expect(user.address).to.eql(address); + expect(user.nonce).to.eql(nonce); + expect(user.role).to.eql(userRoles.USER); + }); + + it("returns undefined when the user does not exist", async () => { + const address = Random.address(); + + const usersRepository = new UsersRepository(); + + const user = await usersRepository.getUser(address); + + expect(user).to.be.null; + }); + }); + + context("setUserToAdmin", () => { + it("sets the role of an existing user to admin", async () => { + const address = Random.address(); + const nonce = Random.nonce(); + + await new User({ + address, + nonce, + role: userRoles.USER, + }).save(); + + const usersRepository = new UsersRepository(); + await usersRepository.setUserToAdmin(address); + + const user = await User.findOne({ address }); + + expect(user.role).to.eql(userRoles.ADMIN); + }); + + it("leaves the role of an existing admin as admin", async () => { + const address = Random.address(); + const nonce = Random.nonce(); + + await new User({ + address, + nonce, + role: userRoles.ADMIN, + }).save(); + + const usersRepository = new UsersRepository(); + await usersRepository.setUserToAdmin(address); + + const user = await User.findOne({ address }); + + expect(user.role).to.eql(userRoles.ADMIN); + }); + + it("creates the user as an admin if they don't exist", async () => { + const address = Random.address(); + + const usersRepository = new UsersRepository(); + await usersRepository.setUserToAdmin(address); + + const user = await User.findOne({ address }); + + expect(user.role).to.eql(userRoles.ADMIN); + }); + }); +}); diff --git a/test/persistence/VoucherSuppliesRepository.test.js b/test/persistence/VoucherSuppliesRepository.test.js new file mode 100644 index 00000000..151d5c0c --- /dev/null +++ b/test/persistence/VoucherSuppliesRepository.test.js @@ -0,0 +1,1788 @@ +const chai = require("chai"); +chai.use(require("chai-as-promised")); +const { validate: uuidValidate } = require("uuid"); + +const expect = chai.expect; + +const VoucherSuppliesRepository = require("../../src/database/VoucherSupply/VoucherSuppliesRepository"); +const VoucherSupply = require("../../src/database/models/VoucherSupply"); +const Voucher = require("../../src/database/models/Voucher"); +const voucherStatuses = require("../../src/utils/voucherStatuses"); + +const Random = require("../shared/helpers/Random"); +const Database = require("../shared/helpers/Database"); + +describe("Voucher Supplies Repository", () => { + before(async () => { + await Database.connect(); + }); + + afterEach(async () => { + await Database.truncateCollection(VoucherSupply); + }); + + after(async () => { + await Database.disconnect(); + }); + + context("createVoucherSupply", () => { + it("stores the voucher supply when valid", async () => { + const uuidv4RegEx = /\/([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})\//; + const uuidExtractor = new RegExp(uuidv4RegEx); + + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + location: JSON.parse(Random.location()), + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ); + + const voucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(voucherSupply.voucherOwner).to.eql(voucherOwner); + expect(voucherSupply.title).to.eql(metadata.title); + expect(voucherSupply.qty).to.eql(metadata.qty); + expect(voucherSupply.category).to.eql(metadata.category); + expect(voucherSupply.startDate).to.eql(new Date(metadata.startDate)); + expect(voucherSupply.offeredDate).to.eql(new Date(metadata.offeredDate)); + expect(voucherSupply.expiryDate).to.eql(new Date(metadata.expiryDate)); + expect(voucherSupply.price.toString()).to.eql(metadata.price); + expect(voucherSupply.buyerDeposit.toString()).to.eql( + metadata.buyerDeposit + ); + expect(voucherSupply.sellerDeposit.toString()).to.eql( + metadata.sellerDeposit + ); + expect(voucherSupply.description).to.eql(metadata.description); + expect(voucherSupply.location).to.eql(metadata.location); + expect(voucherSupply.contact).to.eql(metadata.contact); + expect(voucherSupply.conditions).to.eql(metadata.conditions); + expect(voucherSupply._tokenIdSupply).to.eql(metadata._tokenIdSupply); + expect(voucherSupply.visible).to.be.true; + expect(voucherSupply.imagefiles).to.eql(fileRefs); + + fileRefs.forEach((ref) => { + const uuid = uuidExtractor.exec(ref.url)[1]; + expect(uuidValidate(uuid)).to.be.true; + }); + }); + + it("Should not fail if title is missing", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + title: null, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + const response = await voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ); + + expect(response.title).to.be.null; + }); + + it("trims the title when including whitespace", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + title: " some title ", + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ); + + const voucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(voucherSupply.title).to.eql("some title"); + }); + + it("fails when quantity is missing", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + qty: null, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ) + ).to.be.rejectedWith( + "VoucherSupply validation failed: qty: Path `qty` is required." + ); + }); + + it("fails when quantity is negative", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + qty: -15, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ) + ).to.be.rejectedWith( + "VoucherSupply validation failed: qty: Qty must be a positive number" + ); + }); + + it("fails when quantity is not a number", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + qty: "not-a-number", + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ) + ).to.be.rejectedWith( + 'VoucherSupply validation failed: qty: Cast to Number failed for value "not-a-number" at path "qty"' + ); + }); + + it("fails when price is missing", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + price: null, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ) + ).to.be.rejectedWith( + "VoucherSupply validation failed: price: Path `price` is required." + ); + }); + + it("fails when buyer deposit is missing", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + buyerDeposit: null, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ) + ).to.be.rejectedWith( + "VoucherSupply validation failed: buyerDeposit: Path `buyerDeposit` is required." + ); + }); + + it("fails when seller deposit is missing", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata({ + sellerDeposit: null, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.createVoucherSupply( + metadata, + fileRefs, + voucherOwner + ) + ).to.be.rejectedWith( + "VoucherSupply validation failed: sellerDeposit: Path `sellerDeposit` is required." + ); + }); + }); + + // TODO: test validations on update + context("updateVoucherSupply", () => { + it("updates the voucher supply metadata except token supply ID when valid", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + + const metadata1 = Random.voucherSupplyMetadata({ + location: JSON.parse(Random.location()), + }); + const metadata2 = Random.voucherSupplyMetadata({ + location: JSON.parse(Random.location()), + }); + + await new VoucherSupply({ + ...metadata1, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.updateVoucherSupply( + initialVoucherSupply, + metadata2, + [] + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(updatedVoucherSupply.voucherOwner).to.eql(voucherOwner); + expect(updatedVoucherSupply.title).to.eql(metadata2.title); + expect(updatedVoucherSupply.qty).to.eql(metadata2.qty); + expect(updatedVoucherSupply.category).to.eql(metadata2.category); + expect(updatedVoucherSupply.startDate).to.eql( + new Date(metadata2.startDate) + ); + expect(updatedVoucherSupply.offeredDate).to.eql( + new Date(metadata2.offeredDate) + ); + expect(updatedVoucherSupply.expiryDate).to.eql( + new Date(metadata2.expiryDate) + ); + expect(updatedVoucherSupply.price.toString()).to.eql(metadata2.price); + expect(updatedVoucherSupply.buyerDeposit.toString()).to.eql( + metadata2.buyerDeposit + ); + expect(updatedVoucherSupply.sellerDeposit.toString()).to.eql( + metadata2.sellerDeposit + ); + expect(updatedVoucherSupply.description).to.eql(metadata2.description); + expect(updatedVoucherSupply.location).to.eql(metadata2.location); + expect(updatedVoucherSupply.contact).to.eql(metadata2.contact); + expect(updatedVoucherSupply.conditions).to.eql(metadata2.conditions); + + expect(updatedVoucherSupply.visible).to.be.true; + expect(updatedVoucherSupply.imagefiles).to.eql(fileRefs); + + expect(updatedVoucherSupply._tokenIdSupply).to.eql( + metadata1._tokenIdSupply + ); + }); + + it("appends additional image files to the existing image files", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRef3 = Random.fileRef(); + const fileRefs1 = [fileRef1, fileRef2]; + const fileRefs2 = [fileRef3]; + + const metadata1 = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata1, + voucherOwner: voucherOwner, + imagefiles: fileRefs1, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.updateVoucherSupply( + initialVoucherSupply, + metadata1, + fileRefs2 + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(updatedVoucherSupply.imagefiles).to.eql([ + ...fileRefs1, + ...fileRefs2, + ]); + }); + + it("creates the voucher supply when it doesn't exist", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + + const metadata = Random.voucherSupplyMetadata({ + location: JSON.parse(Random.location()), + }); + + const initialVoucherSupply = new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.updateVoucherSupply( + initialVoucherSupply, + metadata, + [] + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(updatedVoucherSupply.voucherOwner).to.eql(voucherOwner); + expect(updatedVoucherSupply.title).to.eql(metadata.title); + expect(updatedVoucherSupply.qty).to.eql(metadata.qty); + expect(updatedVoucherSupply.category).to.eql(metadata.category); + expect(updatedVoucherSupply.startDate).to.eql( + new Date(metadata.startDate) + ); + expect(updatedVoucherSupply.offeredDate).to.eql( + new Date(metadata.offeredDate) + ); + expect(updatedVoucherSupply.expiryDate).to.eql( + new Date(metadata.expiryDate) + ); + expect(updatedVoucherSupply.price.toString()).to.eql(metadata.price); + expect(updatedVoucherSupply.buyerDeposit.toString()).to.eql( + metadata.buyerDeposit + ); + expect(updatedVoucherSupply.sellerDeposit.toString()).to.eql( + metadata.sellerDeposit + ); + expect(updatedVoucherSupply.description).to.eql(metadata.description); + expect(updatedVoucherSupply.location).to.eql(metadata.location); + expect(updatedVoucherSupply.contact).to.eql(metadata.contact); + expect(updatedVoucherSupply.conditions).to.eql(metadata.conditions); + + expect(updatedVoucherSupply.visible).to.be.true; + expect(updatedVoucherSupply.imagefiles).to.eql(fileRefs); + + expect(updatedVoucherSupply._tokenIdSupply).to.eql( + metadata._tokenIdSupply + ); + }); + }); + + context("decrementVoucherSupplyQuantity", () => { + it("reduces the quantity of the voucher supply by 1 when it exists", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.decrementVoucherSupplyQty( + initialVoucherSupply._tokenIdSupply + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(updatedVoucherSupply.qty).to.eql(initialVoucherSupply.qty - 1); + }); + + it("throws an error when the voucher supply does not exist", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + const voucherSupply = new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.decrementVoucherSupplyQty(voucherSupply._id) + ).to.be.rejectedWith("Voucher supply not found"); + }); + + it("Does not allow the quantity to be decremented below zero", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata({ qty: 1 }); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.decrementVoucherSupplyQty( + initialVoucherSupply._tokenIdSupply + ); + + await expect( + voucherSuppliesRepository.decrementVoucherSupplyQty( + initialVoucherSupply._tokenIdSupply + ) + ).to.be.rejectedWith( + "VoucherSupply validation failed: qty: Qty must be a positive number" + ); + }); + }); + + context("toggleVoucherSupplyVisibility", () => { + it("toggles the visibility of the voucher supply from true to false when it exists and is visible", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.toggleVoucherSupplyVisibility( + initialVoucherSupply._id + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(updatedVoucherSupply.visible).to.eql(false); + }); + + it("toggles the visibility of the voucher supply from false to true when it exists and is not visible", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: false, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.toggleVoucherSupplyVisibility( + initialVoucherSupply._id + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + expect(updatedVoucherSupply.visible).to.eql(true); + }); + + it("throws an error when the voucher supply does not exist", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + const voucherSupply = new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.toggleVoucherSupplyVisibility( + voucherSupply._id + ) + ).to.be.rejectedWith("Voucher supply not found"); + }); + }); + + context("deleteVoucherSupply", () => { + it("deletes the voucher supply when it exists", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.deleteVoucherSupply( + initialVoucherSupply._id + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + _id: initialVoucherSupply._id, + }); + + expect(updatedVoucherSupply).to.be.null; + }); + + it("throws an error when the voucher supply does not exist", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + const voucherSupply = new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.deleteVoucherSupply(voucherSupply._id) + ).to.be.rejectedWith("Voucher supply not found"); + }); + }); + + context("deleteVoucherSupplyImage", () => { + it("removes the image file from the voucher supply when it exists", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.deleteVoucherSupplyImage( + initialVoucherSupply._id, + fileRef1.url + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + _id: initialVoucherSupply._id, + }); + + expect(updatedVoucherSupply.imagefiles).to.eql([fileRef2]); + }); + + it("does nothing when the image file is not present on the voucher supply", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRef3 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const initialVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.deleteVoucherSupplyImage( + initialVoucherSupply._id, + fileRef3.url + ); + + const updatedVoucherSupply = await VoucherSupply.findOne({ + _id: initialVoucherSupply._id, + }); + + expect(updatedVoucherSupply.imagefiles).to.eql([fileRef1, fileRef2]); + }); + + it("throws an error when the voucher supply does not exist", async () => { + const voucherOwner = Random.address(); + const fileRef1 = Random.fileRef(); + const fileRef2 = Random.fileRef(); + const fileRefs = [fileRef1, fileRef2]; + const metadata = Random.voucherSupplyMetadata(); + + const voucherSupply = new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.deleteVoucherSupplyImage( + voucherSupply._id, + fileRef2.url + ) + ).to.be.rejectedWith("Voucher supply not found"); + }); + }); + + context("getVoucherSupplyById", () => { + it("returns the voucher supply when it exists", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const savedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const foundVoucherSupply = await voucherSuppliesRepository.getVoucherSupplyById( + savedVoucherSupply._id + ); + + expect(foundVoucherSupply).to.eql(savedVoucherSupply); + }); + + it("returns null when the voucher supply does not exist", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + const voucherSupply = new VoucherSupply({ + ...metadata, + voucherOwner: voucherOwner, + imagefiles: fileRefs, + visible: true, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const foundVoucherSupply = await voucherSuppliesRepository.getVoucherSupplyById( + voucherSupply._id + ); + + expect(foundVoucherSupply).to.be.null; + }); + }); + + context("getVoucherSupplyBySupplyTokenId", () => { + it("returns the voucher supply for the supply token ID when it exists", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const savedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const foundVoucherSupply = await voucherSuppliesRepository.getVoucherSupplyBySupplyTokenId( + metadata._tokenIdSupply + ); + + expect(foundVoucherSupply.toObject()).to.eql( + savedVoucherSupply.toObject() + ); + }); + + it("returns null when no voucher supply exists for the supply token ID", async () => { + const _tokenIdSupply = Random.uint256(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const foundVoucherSupply = await voucherSuppliesRepository.getVoucherSupplyBySupplyTokenId( + _tokenIdSupply + ); + + expect(foundVoucherSupply).to.be.null; + }); + }); + + context("getAllVoucherSupplies", () => { + it("returns all vouchers sets when many exist", async () => { + const voucherOwner1 = Random.address(); + const fileRefs1 = [Random.fileRef(), Random.fileRef()]; + const metadata1 = Random.voucherSupplyMetadata(); + + const voucherOwner2 = Random.address(); + const fileRefs2 = [Random.fileRef(), Random.fileRef()]; + const metadata2 = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata1, + voucherOwner: voucherOwner1, + imagefiles: fileRefs1, + visible: true, + }).save(); + + await new VoucherSupply({ + ...metadata2, + voucherOwner: voucherOwner2, + imagefiles: fileRefs2, + visible: true, + }).save(); + + const firstSavedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner: voucherOwner1, + }); + const secondSavedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner: voucherOwner2, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const voucherSupplies = await voucherSuppliesRepository.getAllVoucherSupplies(); + + expect(voucherSupplies.length).to.eql(2); + + const firstFoundVoucherSupply = voucherSupplies[0]; + const secondFoundVoucherSupply = voucherSupplies[1]; + + expect(firstFoundVoucherSupply.toObject()).to.eql( + firstSavedVoucherSupply.toObject() + ); + expect(secondFoundVoucherSupply.toObject()).to.eql( + secondSavedVoucherSupply.toObject() + ); + }); + + it("returns single vouchers set when only one exists", async () => { + const voucherOwner = Random.address(); + const fileRefs = [Random.fileRef(), Random.fileRef()]; + const metadata = Random.voucherSupplyMetadata(); + + await new VoucherSupply({ + ...metadata, + voucherOwner, + imagefiles: fileRefs, + visible: true, + }).save(); + + const savedVoucherSupply = await VoucherSupply.findOne({ + voucherOwner, + }); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const voucherSupplies = await voucherSuppliesRepository.getAllVoucherSupplies(); + + expect(voucherSupplies.length).to.eql(1); + + const foundVoucherSupply = voucherSupplies[0]; + + expect(foundVoucherSupply.toObject()).to.eql( + savedVoucherSupply.toObject() + ); + }); + + it("returns an empty array when no voucher sets exist", async () => { + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const voucherSupplies = await voucherSuppliesRepository.getAllVoucherSupplies(); + + expect(voucherSupplies).to.eql([]); + }); + + it("returns an empty array when voucher sets are not blockchainAnchored", async () => { + const voucherOwner1 = Random.address(); + const fileRefs1 = [Random.fileRef(), Random.fileRef()]; + const metadata1 = Random.voucherSupplyMetadata({ + blockchainAnchored: false, + }); + + const voucherOwner2 = Random.address(); + const fileRefs2 = [Random.fileRef(), Random.fileRef()]; + const metadata2 = Random.voucherSupplyMetadata({ + blockchainAnchored: false, + }); + + await new VoucherSupply({ + ...metadata1, + voucherOwner: voucherOwner1, + imagefiles: fileRefs1, + visible: true, + }).save(); + + await new VoucherSupply({ + ...metadata2, + voucherOwner: voucherOwner2, + imagefiles: fileRefs2, + visible: true, + }).save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const voucherSupplies = await voucherSuppliesRepository.getAllVoucherSupplies(); + + expect(voucherSupplies.length).to.eql(0); + }); + }); + + context("getAllVoucherSuppliesByOwner", () => { + it("returns voucher supplies created by the provided owner latest first", async () => { + const voucherOwner1 = Random.address(); + const voucherOwner2 = Random.address(); + const voucherOwner3 = Random.address(); + + const ownerVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + offeredDate: Date.now() - 10000, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + offeredDate: Date.now() - 5000, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const otherVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const otherVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await ownerVoucherSupply1.save(); + await ownerVoucherSupply2.save(); + await otherVoucherSupply1.save(); + await otherVoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const ownerVoucherSupplies = await voucherSuppliesRepository.getAllVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(ownerVoucherSupplies.length).to.eql(2); + expect(ownerVoucherSupplies[0]).to.eql({ + _id: ownerVoucherSupply2._id, + voucherOwner: voucherOwner1, + title: ownerVoucherSupply2.title, + price: ownerVoucherSupply2.price, + description: ownerVoucherSupply2.description, + imagefiles: ownerVoucherSupply2.imagefiles, + expiryDate: ownerVoucherSupply2.expiryDate, + startDate: ownerVoucherSupply2.startDate, + qty: ownerVoucherSupply2.qty, + visible: ownerVoucherSupply2.visible, + _paymentType: ownerVoucherSupply2._paymentType, + }); + expect(ownerVoucherSupplies[1]).to.eql({ + _id: ownerVoucherSupply1._id, + voucherOwner: voucherOwner1, + title: ownerVoucherSupply1.title, + price: ownerVoucherSupply1.price, + description: ownerVoucherSupply1.description, + imagefiles: ownerVoucherSupply1.imagefiles, + expiryDate: ownerVoucherSupply1.expiryDate, + startDate: ownerVoucherSupply1.startDate, + qty: ownerVoucherSupply1.qty, + visible: ownerVoucherSupply1.visible, + _paymentType: ownerVoucherSupply1._paymentType, + }); + }); + + it("returns empty list when owner has no voucher supplies", async () => { + const voucherOwner1 = Random.address(); + const voucherOwner2 = Random.address(); + const voucherOwner3 = Random.address(); + + const owner2VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await owner2VoucherSupply1.save(); + await owner2VoucherSupply2.save(); + await owner3VoucherSupply1.save(); + await owner3VoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const owner1VoucherSupplies = await voucherSuppliesRepository.getAllVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(owner1VoucherSupplies).to.eql([]); + }); + + it("returns empty list when voucher sets are not blockchainAnchored", async () => { + const voucherOwner1 = Random.address(); + + const ownerVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + blockchainAnchored: false, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + blockchainAnchored: false, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await ownerVoucherSupply1.save(); + await ownerVoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const ownerVoucherSupplies = await voucherSuppliesRepository.getAllVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(ownerVoucherSupplies.length).to.eql(0); + }); + }); + + context("getActiveVoucherSuppliesByOwner", () => { + it( + "returns voucher supplies created by the provided owner latest " + + "first if still active (after start date, before expiry and with " + + "remaining quantity)", + async () => { + const voucherOwner1 = Random.address().toLowerCase(); + const voucherOwner2 = Random.address().toLowerCase(); + + const alreadyExpiredDate = Random.pastDateUnixMillis(); + const notYetExpiredDate = Random.futureDateUnixMillis(); + const alreadyStartedDate = Random.pastDateUnixMillisBefore( + alreadyExpiredDate + ); + const notYetStartedDate = Random.futureDateUnixMillisBefore( + notYetExpiredDate + ); + + const availableQuantity = 5; + const unavailableQuantity = 0; + + const ownerInactiveVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: notYetStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerInactiveVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: alreadyExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerInactiveVoucherSupply3 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: unavailableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerActiveVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + offeredDate: Date.now() - 10000, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + const ownerActiveVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + offeredDate: Date.now() - 5000, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const otherVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const otherVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await ownerInactiveVoucherSupply1.save(); + await ownerInactiveVoucherSupply2.save(); + await ownerInactiveVoucherSupply3.save(); + await ownerActiveVoucherSupply1.save(); + await ownerActiveVoucherSupply2.save(); + await otherVoucherSupply1.save(); + await otherVoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const ownerVoucherSupplies = await voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(ownerVoucherSupplies.length).to.eql(2); + expect(ownerVoucherSupplies[0]).to.eql({ + _id: ownerActiveVoucherSupply2._id, + voucherOwner: voucherOwner1, + title: ownerActiveVoucherSupply2.title, + price: ownerActiveVoucherSupply2.price, + description: ownerActiveVoucherSupply2.description, + imagefiles: ownerActiveVoucherSupply2.imagefiles, + expiryDate: ownerActiveVoucherSupply2.expiryDate, + startDate: ownerActiveVoucherSupply2.startDate, + qty: ownerActiveVoucherSupply2.qty, + visible: ownerActiveVoucherSupply2.visible, + _paymentType: ownerActiveVoucherSupply2._paymentType, + }); + expect(ownerVoucherSupplies[1]).to.eql({ + _id: ownerActiveVoucherSupply1._id, + voucherOwner: voucherOwner1, + title: ownerActiveVoucherSupply1.title, + price: ownerActiveVoucherSupply1.price, + description: ownerActiveVoucherSupply1.description, + imagefiles: ownerActiveVoucherSupply1.imagefiles, + expiryDate: ownerActiveVoucherSupply1.expiryDate, + startDate: ownerActiveVoucherSupply1.startDate, + qty: ownerActiveVoucherSupply1.qty, + visible: ownerActiveVoucherSupply1.visible, + _paymentType: ownerActiveVoucherSupply1._paymentType, + }); + } + ); + + it("returns empty list when owner has no active voucher supplies", async () => { + const voucherOwner1 = Random.address(); + const voucherOwner2 = Random.address(); + const voucherOwner3 = Random.address(); + + const alreadyExpiredDate = Random.pastDateUnixMillis(); + const notYetExpiredDate = Random.futureDateUnixMillis(); + const alreadyStartedDate = Random.pastDateUnixMillisBefore( + alreadyExpiredDate + ); + const notYetStartedDate = Random.futureDateUnixMillisBefore( + notYetExpiredDate + ); + + const availableQuantity = 5; + const unavailableQuantity = 0; + + const owner1InactiveVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: notYetStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner1InactiveVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: alreadyExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner1InactiveVoucherSupply3 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: unavailableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await owner1InactiveVoucherSupply1.save(); + await owner1InactiveVoucherSupply2.save(); + await owner1InactiveVoucherSupply3.save(); + await owner2VoucherSupply1.save(); + await owner2VoucherSupply2.save(); + await owner3VoucherSupply1.save(); + await owner3VoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const owner1VoucherSupplies = await voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(owner1VoucherSupplies).to.eql([]); + }); + + it("returns empty list when owner has no voucher supplies at all", async () => { + const voucherOwner1 = Random.address(); + const voucherOwner2 = Random.address(); + const voucherOwner3 = Random.address(); + + const owner2VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await owner2VoucherSupply1.save(); + await owner2VoucherSupply2.save(); + await owner3VoucherSupply1.save(); + await owner3VoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const owner1VoucherSupplies = await voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(owner1VoucherSupplies).to.eql([]); + }); + + it("returns empty list when voucher supply is not blockchainAnchored", async () => { + const voucherOwner = Random.address(); + + new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + blockchainAnchored: false, + }), + voucherOwner: voucherOwner, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }).save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const voucherOwnerSupplies = await voucherSuppliesRepository.getActiveVoucherSuppliesByOwner( + voucherOwner + ); + + expect(voucherOwnerSupplies).to.eql([]); + }); + }); + + context("getInactiveVoucherSuppliesByOwner", () => { + it( + "returns voucher supplies created by the provided owner latest " + + "first if not active (before start date, after expiry or with " + + "no quantity)", + async () => { + const voucherOwner1 = Random.address().toLowerCase(); + const voucherOwner2 = Random.address().toLowerCase(); + + const alreadyExpiredDate = Random.pastDateUnixMillis(); + const notYetExpiredDate = Random.futureDateUnixMillis(); + const alreadyStartedDate = Random.pastDateUnixMillisBefore( + alreadyExpiredDate + ); + const notYetStartedDate = Random.futureDateUnixMillisBefore( + notYetExpiredDate + ); + + const availableQuantity = 5; + const unavailableQuantity = 0; + + const ownerInactiveVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: notYetStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + offeredDate: Date.now() - 10000, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerInactiveVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: alreadyExpiredDate, + qty: availableQuantity, + offeredDate: Date.now() - 5000, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerInactiveVoucherSupply3 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: unavailableQuantity, + offeredDate: Date.now(), + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerActiveVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const ownerActiveVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const otherVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const otherVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await ownerInactiveVoucherSupply1.save(); + await ownerInactiveVoucherSupply2.save(); + await ownerInactiveVoucherSupply3.save(); + await ownerActiveVoucherSupply1.save(); + await ownerActiveVoucherSupply2.save(); + await otherVoucherSupply1.save(); + await otherVoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const ownerVoucherSupplies = await voucherSuppliesRepository.getInactiveVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(ownerVoucherSupplies.length).to.eql(3); + expect(ownerVoucherSupplies[0]).to.eql({ + _id: ownerInactiveVoucherSupply3._id, + voucherOwner: voucherOwner1, + title: ownerInactiveVoucherSupply3.title, + price: ownerInactiveVoucherSupply3.price, + description: ownerInactiveVoucherSupply3.description, + imagefiles: ownerInactiveVoucherSupply3.imagefiles, + expiryDate: ownerInactiveVoucherSupply3.expiryDate, + startDate: ownerInactiveVoucherSupply3.startDate, + qty: ownerInactiveVoucherSupply3.qty, + visible: ownerInactiveVoucherSupply3.visible, + _paymentType: ownerInactiveVoucherSupply3._paymentType, + }); + expect(ownerVoucherSupplies[1]).to.eql({ + _id: ownerInactiveVoucherSupply2._id, + voucherOwner: voucherOwner1, + title: ownerInactiveVoucherSupply2.title, + price: ownerInactiveVoucherSupply2.price, + description: ownerInactiveVoucherSupply2.description, + imagefiles: ownerInactiveVoucherSupply2.imagefiles, + expiryDate: ownerInactiveVoucherSupply2.expiryDate, + startDate: ownerInactiveVoucherSupply2.startDate, + qty: ownerInactiveVoucherSupply2.qty, + visible: ownerInactiveVoucherSupply2.visible, + _paymentType: ownerInactiveVoucherSupply2._paymentType, + }); + expect(ownerVoucherSupplies[2]).to.eql({ + _id: ownerInactiveVoucherSupply1._id, + voucherOwner: voucherOwner1, + title: ownerInactiveVoucherSupply1.title, + price: ownerInactiveVoucherSupply1.price, + description: ownerInactiveVoucherSupply1.description, + imagefiles: ownerInactiveVoucherSupply1.imagefiles, + expiryDate: ownerInactiveVoucherSupply1.expiryDate, + startDate: ownerInactiveVoucherSupply1.startDate, + qty: ownerInactiveVoucherSupply1.qty, + visible: ownerInactiveVoucherSupply1.visible, + _paymentType: ownerInactiveVoucherSupply1._paymentType, + }); + } + ); + + it("returns empty list when owner has no inactive voucher supplies", async () => { + const voucherOwner1 = Random.address(); + const voucherOwner2 = Random.address(); + const voucherOwner3 = Random.address(); + + const notYetExpiredDate = Random.futureDateUnixMillis(); + const alreadyStartedDate = Random.pastDateUnixMillis(); + + const availableQuantity = 5; + + const owner1ActiveVoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner1ActiveVoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: availableQuantity, + }), + voucherOwner: voucherOwner1, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await owner1ActiveVoucherSupply1.save(); + await owner1ActiveVoucherSupply2.save(); + await owner2VoucherSupply1.save(); + await owner2VoucherSupply2.save(); + await owner3VoucherSupply1.save(); + await owner3VoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const owner1VoucherSupplies = await voucherSuppliesRepository.getInactiveVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(owner1VoucherSupplies).to.eql([]); + }); + + it("returns empty list when owner has no voucher supplies at all", async () => { + const voucherOwner1 = Random.address(); + const voucherOwner2 = Random.address(); + const voucherOwner3 = Random.address(); + + const owner2VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner2VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner2, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply1 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + const owner3VoucherSupply2 = new VoucherSupply({ + ...Random.voucherSupplyMetadata(), + voucherOwner: voucherOwner3, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }); + + await owner2VoucherSupply1.save(); + await owner2VoucherSupply2.save(); + await owner3VoucherSupply1.save(); + await owner3VoucherSupply2.save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const owner1VoucherSupplies = await voucherSuppliesRepository.getInactiveVoucherSuppliesByOwner( + voucherOwner1 + ); + + expect(owner1VoucherSupplies).to.eql([]); + }); + + it("returns empty list when voucher supply is not blockchainAnchored", async () => { + const voucherOwner = Random.address(); + const unavailableQuantity = 0; + const alreadyExpiredDate = Random.pastDateUnixMillis(); + const notYetExpiredDate = Random.futureDateUnixMillis(); + const alreadyStartedDate = Random.pastDateUnixMillisBefore( + alreadyExpiredDate + ); + + new VoucherSupply({ + ...Random.voucherSupplyMetadata({ + startDate: alreadyStartedDate, + expiryDate: notYetExpiredDate, + qty: unavailableQuantity, + offeredDate: Date.now(), + blockchainAnchored: false, + }), + voucherOwner: voucherOwner, + imagefiles: [Random.fileRef(), Random.fileRef()], + visible: true, + }).save(); + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + const voucherOwnerSupplies = await voucherSuppliesRepository.getInactiveVoucherSuppliesByOwner( + voucherOwner + ); + + expect(voucherOwnerSupplies).to.eql([]); + }); + }); + + context("getVoucherSupplyDetails", () => { + it("pushes voucher supply details into the provided list when the voucher supply exists", async () => { + const voucherOwner1 = Random.address(); + const fileRefs1 = [Random.fileRef(), Random.fileRef()]; + const voucherSupplyMetadata1 = Random.voucherSupplyMetadata(); + + const voucherSupply1 = new VoucherSupply({ + ...voucherSupplyMetadata1, + voucherOwner: voucherOwner1, + imagefiles: fileRefs1, + visible: true, + }); + await voucherSupply1.save(); + + const voucherOwner2 = Random.address(); + const fileRefs2 = [Random.fileRef(), Random.fileRef()]; + const voucherSupplyMetadata2 = Random.voucherSupplyMetadata(); + + const voucherSupply2 = new VoucherSupply({ + ...voucherSupplyMetadata2, + voucherOwner: voucherOwner2, + imagefiles: fileRefs2, + visible: true, + }); + await voucherSupply2.save(); + + const voucherMetadata1 = Random.voucherMetadata(); + + const voucher1 = new Voucher({ + supplyID: voucherSupply1.id, + _holder: voucherMetadata1._holder.toLowerCase(), + _tokenIdSupply: voucherMetadata1._tokenIdSupply, + _tokenIdVoucher: voucherMetadata1._tokenIdVoucher, + [voucherStatuses.COMMITTED]: new Date().getTime(), + [voucherStatuses.CANCELLED]: "", + [voucherStatuses.COMPLAINED]: "", + [voucherStatuses.REDEEMED]: "", + [voucherStatuses.REFUNDED]: "", + [voucherStatuses.FINALIZED]: "", + voucherOwner: voucherMetadata1._issuer.toLowerCase(), + actionDate: new Date().getTime(), + _paymentType: voucherSupply1._paymentType, + }); + + const voucherMetadata2 = Random.voucherMetadata(); + + const voucher2 = new Voucher({ + supplyID: voucherSupply2.id, + _holder: voucherMetadata2._holder.toLowerCase(), + _tokenIdSupply: voucherMetadata2._tokenIdSupply, + _tokenIdVoucher: voucherMetadata2._tokenIdVoucher, + [voucherStatuses.COMMITTED]: new Date().getTime(), + [voucherStatuses.CANCELLED]: "", + [voucherStatuses.COMPLAINED]: "", + [voucherStatuses.REDEEMED]: "", + [voucherStatuses.REFUNDED]: "", + [voucherStatuses.FINALIZED]: "", + voucherOwner: voucherMetadata2._issuer.toLowerCase(), + actionDate: new Date().getTime(), + _paymentType: voucherSupply2._paymentType, + }); + + const voucherSupplyDetailsList = []; + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + await voucherSuppliesRepository.getVoucherSupplyDetails( + voucher1, + voucherSupplyDetailsList + ); + await voucherSuppliesRepository.getVoucherSupplyDetails( + voucher2, + voucherSupplyDetailsList + ); + + expect(voucherSupplyDetailsList.length).to.eql(2); + expect(voucherSupplyDetailsList[0]).to.eql({ + _id: voucher1.id, + title: voucherSupply1.title, + qty: voucherSupply1.qty, + description: voucherSupply1.description, + imagefiles: voucherSupply1.imagefiles, + category: voucherSupply1.category, + price: voucherSupply1.price, + expiryDate: voucherSupply1.expiryDate, + visible: voucherSupply1.visible, + CANCELLED: voucher1.CANCELLED, + COMMITTED: voucher1.COMMITTED, + COMPLAINED: voucher1.COMPLAINED, + EXPIRED: voucher1.EXPIRED, + FINALIZED: voucher1.FINALIZED, + REDEEMED: voucher1.REDEEMED, + REFUNDED: voucher1.REFUNDED, + paymentType: voucherSupply1._paymentType, + }); + + expect(voucherSupplyDetailsList[1]).to.eql({ + _id: voucher2.id, + title: voucherSupply2.title, + qty: voucherSupply2.qty, + description: voucherSupply2.description, + imagefiles: voucherSupply2.imagefiles, + category: voucherSupply2.category, + price: voucherSupply2.price, + expiryDate: voucherSupply2.expiryDate, + visible: voucherSupply2.visible, + CANCELLED: voucher2.CANCELLED, + COMMITTED: voucher2.COMMITTED, + COMPLAINED: voucher2.COMPLAINED, + EXPIRED: voucher2.EXPIRED, + FINALIZED: voucher2.FINALIZED, + REDEEMED: voucher2.REDEEMED, + REFUNDED: voucher2.REFUNDED, + paymentType: voucherSupply2._paymentType, + }); + }); + + it("returns an empty object if the voucher supply does not exist", async () => { + const voucherMetadata = Random.voucherMetadata(); + + const voucher = new Voucher({ + supplyID: Random.documentId(), + _holder: voucherMetadata._holder.toLowerCase(), + _tokenIdSupply: voucherMetadata._tokenIdSupply, + _tokenIdVoucher: voucherMetadata._tokenIdVoucher, + [voucherStatuses.COMMITTED]: new Date().getTime(), + [voucherStatuses.CANCELLED]: "", + [voucherStatuses.COMPLAINED]: "", + [voucherStatuses.REDEEMED]: "", + [voucherStatuses.REFUNDED]: "", + [voucherStatuses.FINALIZED]: "", + voucherOwner: voucherMetadata._issuer.toLowerCase(), + actionDate: new Date().getTime(), + }); + + const voucherSupplyDetailsList = []; + + const voucherSuppliesRepository = new VoucherSuppliesRepository(); + + await expect( + voucherSuppliesRepository.getVoucherSupplyDetails( + voucher, + voucherSupplyDetailsList + ) + ).to.be.empty; + }); + }); +}); diff --git a/test/persistence/VouchersRepository.test.js b/test/persistence/VouchersRepository.test.js new file mode 100644 index 00000000..1c9d435c --- /dev/null +++ b/test/persistence/VouchersRepository.test.js @@ -0,0 +1,570 @@ +const chai = require("chai"); +chai.use(require("chai-as-promised")); + +const expect = chai.expect; + +const VouchersRepository = require("../../src/database/Voucher/VouchersRepository"); +const Voucher = require("../../src/database/models/Voucher"); +const voucherStatuses = require("../../src/utils/voucherStatuses"); + +const Random = require("../shared/helpers/Random"); +const Time = require("../shared/helpers/Time"); +const Database = require("../shared/helpers/Database"); + +describe("Vouchers Repository", () => { + before(async () => { + await Database.connect(); + }); + + afterEach(async () => { + await Database.truncateCollection(Voucher); + }); + + after(async () => { + await Database.disconnect(); + }); + + context("createVoucher", () => { + it("stores the voucher when valid", async () => { + const voucherSupplyId = Random.documentId().toString(); + const metadata = Random.voucherMetadata(); + + const vouchersRepository = new VouchersRepository(); + + const [before, after] = await Time.boundaries(() => + vouchersRepository.createVoucher(metadata, voucherSupplyId) + ); + + const voucher = await Voucher.findOne({ + supplyID: voucherSupplyId, + }); + + expect(voucher.supplyID).to.eql(voucherSupplyId); + expect(voucher._holder).to.eql(metadata._holder.toLowerCase()); + expect(voucher._tokenIdSupply).to.eql(metadata._tokenIdSupply); + expect(voucher._tokenIdVoucher).to.eql(metadata._tokenIdVoucher); + expect(voucher.voucherOwner).to.eql(metadata._issuer.toLowerCase()); + expect(voucher.actionDate.getTime()).to.be.greaterThan(before); + expect(voucher.actionDate.getTime()).to.be.lessThan(after); + expect(voucher[voucherStatuses.COMMITTED].getTime()).to.be.greaterThan( + before + ); + expect(voucher[voucherStatuses.COMMITTED].getTime()).to.be.lessThan( + after + ); + expect(voucher[voucherStatuses.CANCELLED]).to.be.null; + expect(voucher[voucherStatuses.COMPLAINED]).to.be.null; + expect(voucher[voucherStatuses.REDEEMED]).to.be.null; + expect(voucher[voucherStatuses.REFUNDED]).to.be.null; + expect(voucher[voucherStatuses.FINALIZED]).to.be.null; + }); + + it("fails when voucher supply ID is missing", async () => { + const voucherSupplyId = undefined; + const metadata = Random.voucherMetadata(); + + const vouchersRepository = new VouchersRepository(); + + await expect( + vouchersRepository.createVoucher(metadata, voucherSupplyId) + ).to.be.rejectedWith( + "Voucher validation failed: supplyID: Path `supplyID` is required." + ); + }); + + it("trims the voucher supply ID when including whitespace", async () => { + const voucherSupplyId = Random.documentId().toString(); + const metadata = Random.voucherMetadata(); + + const vouchersRepository = new VouchersRepository(); + await vouchersRepository.createVoucher(metadata, ` ${voucherSupplyId} `); + + const voucher = await Voucher.findOne({ + supplyID: voucherSupplyId, + }); + + expect(voucher.supplyID).to.eql(voucherSupplyId); + }); + + it("creates new voucher if already exists", async () => { + const voucherSupplyId = Random.documentId().toString(); + const voucherTokenId = Random.uint256(); + + const metadata1 = Random.voucherMetadata({ + _tokenIdVoucher: voucherTokenId, + }); + const metadata2 = Random.voucherMetadata({ + _tokenIdVoucher: voucherTokenId, + }); + + await new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId, + ...metadata1, + }) + ).save(); + + const vouchersRepository = new VouchersRepository(); + await vouchersRepository.createVoucher(metadata2, voucherSupplyId); + + const vouchers = await Voucher.find({ + supplyID: voucherSupplyId, + }); + + expect(vouchers.length).to.eq(2); + expect(vouchers[0].id).to.not.eql(vouchers[1].id); + }); + }); + + context("updateStatusFromKeepers", () => { + Object.values(voucherStatuses).forEach((status) => { + context(` for ${status} status`, () => { + it( + `sets the current date on the status on the voucher ` + + "with the provided voucher token ID when it exists", + async () => { + const voucherTokenId = Random.uint256(); + const savedVoucher = new Voucher( + Random.voucherAttributes({ + _tokenIdVoucher: voucherTokenId, + [voucherStatuses.COMMITTED]: Date.now(), + [voucherStatuses.CANCELLED]: null, + [voucherStatuses.COMPLAINED]: null, + [voucherStatuses.REDEEMED]: null, + [voucherStatuses.REFUNDED]: null, + [voucherStatuses.FINALIZED]: null, + }) + ); + await savedVoucher.save(); + + const vouchersRepository = new VouchersRepository(); + const [before, after] = await Time.boundaries(() => + vouchersRepository.updateStatusFromKeepers(voucherTokenId, status) + ); + + const foundVoucher = await Voucher.findById(savedVoucher._id); + + expect(foundVoucher[status].getTime()).to.be.greaterThan(before); + expect(foundVoucher[status].getTime()).to.be.lessThan(after); + } + ); + + it("does nothing when no voucher exists for the provided voucher ID", async () => { + const vouchersRepository = new VouchersRepository(); + await expect( + vouchersRepository.updateStatusFromKeepers(Random.uint256(), status) + ).to.be.rejectedWith("Voucher not found"); + }); + }); + }); + }); + + context("getAllVouchers", () => { + it("returns all vouchers in insertion order", async () => { + const voucherSupplyId1 = Random.documentId().toString(); + const voucherSupplyId2 = Random.documentId().toString(); + const voucherSupplyId3 = Random.documentId().toString(); + + const attributes1 = Random.voucherAttributes({ + supplyID: voucherSupplyId1, + ...Random.voucherMetadata(), + }); + const attributes2 = Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata(), + }); + const attributes3 = Random.voucherAttributes({ + supplyID: voucherSupplyId3, + ...Random.voucherMetadata(), + }); + + await new Voucher(attributes1).save(); + await new Voucher(attributes2).save(); + await new Voucher(attributes3).save(); + + const voucher1 = await Voucher.findOne({ supplyID: voucherSupplyId1 }); + const voucher2 = await Voucher.findOne({ supplyID: voucherSupplyId2 }); + const voucher3 = await Voucher.findOne({ supplyID: voucherSupplyId3 }); + + const vouchersRepository = new VouchersRepository(); + const allVouchers = await vouchersRepository.getAllVouchers(); + + expect(allVouchers.length).to.eql(3); + expect(allVouchers[0].toObject()).to.eql(voucher1.toObject()); + expect(allVouchers[1].toObject()).to.eql(voucher2.toObject()); + expect(allVouchers[2].toObject()).to.eql(voucher3.toObject()); + }); + + it("returns empty list when no vouchers", async () => { + const vouchersRepository = new VouchersRepository(); + const allVouchers = await vouchersRepository.getAllVouchers(); + + expect(allVouchers).to.eql([]); + }); + }); + + context("getAllVouchersByVoucherSupplyIdAndOwner", () => { + it("returns all vouchers for the voucher supply ID and owner in insertion order", async () => { + const voucherSupplyId1 = Random.documentId().toString(); + const voucherSupplyId2 = Random.documentId().toString(); + + const voucherOwner1 = Random.address().toLowerCase(); + const voucherOwner2 = Random.address().toLowerCase(); + + const savedVoucher1 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId1, + ...Random.voucherMetadata({ + _issuer: voucherOwner1, + }), + }) + ); + const savedVoucher2 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata({ + _issuer: voucherOwner1, + }), + }) + ); + const savedVoucher3 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId1, + ...Random.voucherMetadata({ + _issuer: voucherOwner2, + }), + }) + ); + const savedVoucher4 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata({ + _issuer: voucherOwner2, + }), + }) + ); + const savedVoucher5 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId1, + ...Random.voucherMetadata({ + _issuer: voucherOwner1, + }), + }) + ); + + await savedVoucher1.save(); + await savedVoucher2.save(); + await savedVoucher3.save(); + await savedVoucher4.save(); + await savedVoucher5.save(); + + const foundVoucher1 = await Voucher.findOne({ _id: savedVoucher1._id }); + const foundVoucher5 = await Voucher.findOne({ _id: savedVoucher5._id }); + + const vouchersRepository = new VouchersRepository(); + const vouchers = await vouchersRepository.getAllVouchersByVoucherSupplyIdAndOwner( + voucherSupplyId1, + voucherOwner1 + ); + + expect(vouchers.length).to.eql(2); + expect(vouchers[0].toObject()).to.eql(foundVoucher1.toObject()); + expect(vouchers[1].toObject()).to.eql(foundVoucher5.toObject()); + }); + + it("returns empty list when no vouchers for voucher supply ID", async () => { + const voucherSupplyId1 = Random.documentId().toString(); + const voucherSupplyId2 = Random.documentId().toString(); + + const voucherOwner1 = Random.address().toLowerCase(); + const voucherOwner2 = Random.address().toLowerCase(); + + const savedVoucher1 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata({ + _issuer: voucherOwner1, + }), + }) + ); + const savedVoucher2 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata({ + _issuer: voucherOwner1, + }), + }) + ); + const savedVoucher3 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata({ + _issuer: voucherOwner2, + }), + }) + ); + + await savedVoucher1.save(); + await savedVoucher2.save(); + await savedVoucher3.save(); + + const vouchersRepository = new VouchersRepository(); + const vouchers = await vouchersRepository.getAllVouchersByVoucherSupplyIdAndOwner( + voucherSupplyId1, + voucherOwner1 + ); + + expect(vouchers).to.eql([]); + }); + + it("returns empty list when no vouchers for owner", async () => { + const voucherSupplyId1 = Random.documentId().toString(); + const voucherSupplyId2 = Random.documentId().toString(); + + const voucherOwner1 = Random.address().toLowerCase(); + const voucherOwner2 = Random.address().toLowerCase(); + + const savedVoucher1 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId1, + ...Random.voucherMetadata({ + _issuer: voucherOwner2, + }), + }) + ); + const savedVoucher2 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId1, + ...Random.voucherMetadata({ + _issuer: voucherOwner2, + }), + }) + ); + const savedVoucher3 = new Voucher( + Random.voucherAttributes({ + supplyID: voucherSupplyId2, + ...Random.voucherMetadata({ + _issuer: voucherOwner2, + }), + }) + ); + + await savedVoucher1.save(); + await savedVoucher2.save(); + await savedVoucher3.save(); + + const vouchersRepository = new VouchersRepository(); + const vouchers = await vouchersRepository.getAllVouchersByVoucherSupplyIdAndOwner( + voucherSupplyId1, + voucherOwner1 + ); + + expect(vouchers).to.eql([]); + }); + + it("returns empty list when no vouchers", async () => { + const voucherSupplyId = Random.documentId().toString(); + const voucherOwner = Random.address().toLowerCase(); + + const vouchersRepository = new VouchersRepository(); + const allVouchers = await vouchersRepository.getAllVouchersByVoucherSupplyIdAndOwner( + voucherSupplyId, + voucherOwner + ); + + expect(allVouchers).to.eql([]); + }); + }); + + context("getAllVouchersByHolder", () => { + it("returns all vouchers for the holder ordered by action date descending", async () => { + const voucherHolder1 = Random.address().toLowerCase(); + const voucherHolder2 = Random.address().toLowerCase(); + + const savedVoucher1 = new Voucher( + Random.voucherAttributes({ + ...Random.voucherMetadata(), + _holder: voucherHolder1, + actionDate: Date.now() - 10000, + }) + ); + const savedVoucher2 = new Voucher( + Random.voucherAttributes({ + ...Random.voucherMetadata(), + _holder: voucherHolder2, + }) + ); + const savedVoucher3 = new Voucher( + Random.voucherAttributes({ + ...Random.voucherMetadata(), + _holder: voucherHolder1, + actionDate: Date.now() - 5000, + }) + ); + const savedVoucher4 = new Voucher( + Random.voucherAttributes({ + ...Random.voucherMetadata(), + _holder: voucherHolder2, + }) + ); + const savedVoucher5 = new Voucher( + Random.voucherAttributes({ + ...Random.voucherMetadata(), + _holder: voucherHolder1, + actionDate: Date.now() - 15000, + }) + ); + + await savedVoucher1.save(); + await savedVoucher2.save(); + await savedVoucher3.save(); + await savedVoucher4.save(); + await savedVoucher5.save(); + + const foundVoucher1 = await Voucher.findOne({ _id: savedVoucher1._id }); + const foundVoucher3 = await Voucher.findOne({ _id: savedVoucher3._id }); + const foundVoucher5 = await Voucher.findOne({ _id: savedVoucher5._id }); + + const vouchersRepository = new VouchersRepository(); + const vouchers = await vouchersRepository.getAllVouchersByHolder( + voucherHolder1 + ); + + expect(vouchers.length).to.eql(3); + expect(vouchers[0].toObject()).to.eql(foundVoucher3.toObject()); + expect(vouchers[1].toObject()).to.eql(foundVoucher1.toObject()); + expect(vouchers[2].toObject()).to.eql(foundVoucher5.toObject()); + }); + + it("returns empty list when vouchers are not blockchainAnchored", async () => { + const voucherHolder1 = Random.address().toLowerCase(); + + const savedVoucher1 = new Voucher( + Random.voucherAttributes({ + actionDate: Date.now() - 10000, + _holder: voucherHolder1, + }) + ); + + const savedVoucher2 = new Voucher( + Random.voucherAttributes({ + _holder: voucherHolder1, + actionDate: Date.now() - 5000, + }) + ); + + const savedVoucher3 = new Voucher( + Random.voucherAttributes({ + _holder: voucherHolder1, + actionDate: Date.now() - 15000, + }) + ); + + await savedVoucher1.save(); + await savedVoucher2.save(); + await savedVoucher3.save(); + + const vouchersRepository = new VouchersRepository(); + const vouchers = await vouchersRepository.getAllVouchersByHolder( + voucherHolder1 + ); + + expect(vouchers.length).to.eql(0); + }); + + it("returns empty list when no vouchers for holder", async () => { + const voucherHolder1 = Random.address().toLowerCase(); + const voucherHolder2 = Random.address().toLowerCase(); + + const savedVoucher1 = new Voucher( + Random.voucherAttributes({ + _holder: voucherHolder2, + }) + ); + const savedVoucher2 = new Voucher( + Random.voucherAttributes({ + _holder: voucherHolder2, + }) + ); + const savedVoucher3 = new Voucher( + Random.voucherAttributes({ + _holder: voucherHolder2, + }) + ); + + await savedVoucher1.save(); + await savedVoucher2.save(); + await savedVoucher3.save(); + + const vouchersRepository = new VouchersRepository(); + const vouchers = await vouchersRepository.getAllVouchersByHolder( + voucherHolder1 + ); + + expect(vouchers).to.eql([]); + }); + + it("returns empty list when no vouchers", async () => { + const voucherHolder = Random.address().toLowerCase(); + + const vouchersRepository = new VouchersRepository(); + const allVouchers = await vouchersRepository.getAllVouchersByHolder( + voucherHolder + ); + + expect(allVouchers).to.eql([]); + }); + }); + + context("getVoucherById", () => { + it("returns the voucher with the provided ID when it exists", async () => { + const savedVoucher = new Voucher(Random.voucherAttributes()); + + await savedVoucher.save(); + + const vouchersRepository = new VouchersRepository(); + const foundVoucher = await vouchersRepository.getVoucherById( + savedVoucher._id + ); + + expect(foundVoucher.toObject()).to.eql(savedVoucher.toObject()); + }); + + it("returns null when no voucher with the provided ID", async () => { + const vouchersRepository = new VouchersRepository(); + const foundVoucher = await vouchersRepository.getVoucherById( + Random.documentId().toString() + ); + + expect(foundVoucher).to.be.null; + }); + }); + + context("getVoucherByVoucherTokenId", () => { + it("returns the voucher with the provided voucher token ID when it exists", async () => { + const voucherTokenId = Random.uint256(); + const savedVoucher = new Voucher( + Random.voucherAttributes({ + _tokenIdVoucher: voucherTokenId, + }) + ); + await savedVoucher.save(); + + const vouchersRepository = new VouchersRepository(); + const foundVoucher = await vouchersRepository.getVoucherByVoucherTokenId( + voucherTokenId + ); + + expect(foundVoucher.toObject()).to.eql(savedVoucher.toObject()); + }); + + it("returns null when no voucher with the provided voucher token ID", async () => { + const vouchersRepository = new VouchersRepository(); + const foundVoucher = await vouchersRepository.getVoucherByVoucherTokenId( + Random.uint256() + ); + + expect(foundVoucher).to.be.null; + }); + }); +}); diff --git a/test/shared/fakes/utils/FakeStorage.js b/test/shared/fakes/utils/FakeStorage.js new file mode 100644 index 00000000..1e18b8be --- /dev/null +++ b/test/shared/fakes/utils/FakeStorage.js @@ -0,0 +1,71 @@ +const Streams = require("../../helpers/Streams"); +const { v4: uuidv4 } = require("uuid"); + +class FakeStorage { + static successful() { + return new FakeStorage(); + } + + static failure() { + return new FakeStorage("Oops!"); + } + + constructor(errorMessage = null) { + this.errorMessage = errorMessage; + this.handleFileCalls = []; + this.removeFileCalls = []; + this.removeFilesCalls = []; + } + + _handleFile(req, file, cb) { + Streams.readBinary(file.stream, (err, data) => { + if (this.errorMessage) { + cb(new Error(this.errorMessage)); + } + + const info = { + size: data.length, + bucket: uuidv4(), + key: uuidv4(), + location: `https://example.com/${file.originalname}`, + contentType: file.mimetype, + }; + + this.handleFileCalls.push({ + file: { + ...file, + ...info, + data, + }, + }); + + cb(null, info); + }); + } + + _removeFile(req, file, cb) { + if (this.errorMessage) { + cb(new Error(this.errorMessage)); + } + + this.removeFileCalls.push({ + file, + }); + + cb(null); + } + + _removeFiles(req, files, cb) { + if (this.errorMessage) { + cb(new Error(this.errorMessage)); + } + + this.removeFilesCalls.push({ + files, + }); + + cb(null); + } +} + +module.exports = FakeStorage; diff --git a/test/shared/helpers/Database.js b/test/shared/helpers/Database.js new file mode 100644 index 00000000..6eccf04a --- /dev/null +++ b/test/shared/helpers/Database.js @@ -0,0 +1,41 @@ +const mongoose = require("mongoose"); + +const ConfigurationService = require("../../../src/services/ConfigurationService"); +const MongooseClient = require("../../../src/clients/MongooseClient"); +const User = require("../../../src/database/models/User"); +const Payment = require("../../../src/database/models/Payment"); +const Voucher = require("../../../src/database/models/Voucher"); +const VoucherSupply = require("../../../src/database/models/VoucherSupply"); +const Event = require("../../../src/database/models/Event"); + +class Database { + static async connect() { + const configurationService = new ConfigurationService(); + const mongooseClient = new MongooseClient( + configurationService.databaseConnectionString, + configurationService.databaseName, + configurationService.databaseUsername, + configurationService.databasePassword + ); + + return mongooseClient.connect(); + } + + static async disconnect() { + return mongoose.disconnect(); + } + + static async truncateCollection(model) { + await model.collection.deleteMany({}); + } + + static async truncate() { + await this.truncateCollection(User); + await this.truncateCollection(Payment); + await this.truncateCollection(Voucher); + await this.truncateCollection(VoucherSupply); + await this.truncateCollection(Event); + } +} + +module.exports = Database; diff --git a/test/shared/helpers/Ports.js b/test/shared/helpers/Ports.js new file mode 100644 index 00000000..6e079865 --- /dev/null +++ b/test/shared/helpers/Ports.js @@ -0,0 +1,17 @@ +const freeport = require("freeport"); + +class Ports { + static getAvailablePort() { + return new Promise((resolve, reject) => { + freeport((error, port) => { + if (error) { + return reject(error); + } + + return resolve(port); + }); + }); + } +} + +module.exports = Ports; diff --git a/test/shared/helpers/Promises.js b/test/shared/helpers/Promises.js new file mode 100644 index 00000000..e2327d10 --- /dev/null +++ b/test/shared/helpers/Promises.js @@ -0,0 +1,19 @@ +class Promises { + static promisify(fn, target = null) { + return function () { + return new Promise((resolve, reject) => { + fn.apply(target, [ + ...arguments, + (err, ...args) => { + if (err) { + reject(err); + } + resolve(args); + }, + ]); + }); + }; + } +} + +module.exports = Promises; diff --git a/test/shared/helpers/Random.js b/test/shared/helpers/Random.js new file mode 100644 index 00000000..5179750b --- /dev/null +++ b/test/shared/helpers/Random.js @@ -0,0 +1,404 @@ +const faker = require("faker"); +const keythereum = require("keythereum"); +const ethers = require("ethers"); +const mongoose = require("mongoose"); +const keccak256 = require("keccak256"); +const { v4: uuidv4 } = require("uuid"); + +const voucherStatuses = require("../../../src/utils/voucherStatuses"); +const User = require("../../../src/database/models/User"); +const userRoles = require("../../../src/database/User/userRoles"); + +const Time = require("./Time"); + +class Random { + static documentId() { + return new mongoose.Types.ObjectId(); + } + + static account() { + const keyDetails = keythereum.create(); + const privateKey = keyDetails.privateKey; + const address = ethers.utils.computeAddress(privateKey); + + return { + address, + privateKey, + }; + } + + static address() { + const keyDetails = keythereum.create(); + + return ethers.utils.computeAddress(keyDetails.privateKey).toLowerCase(); + } + + static transactionHash() { + return `0x${keccak256(faker.random.alpha(64)).toString("hex")}`; + } + + static nonce() { + return faker.random.number({ min: 0, max: 1000000 }); + } + + static userRole() { + return faker.random.arrayElement(Object.values(userRoles)); + } + + static chainId() { + return faker.random.number({ min: 1, max: 5 }); + } + + static signingDomain() { + return { + name: "Leptonite", + version: "1", + chainId: Random.chainId(), + verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", + }; + } + + static tokenSecret() { + return faker.random.hexaDecimal(128).slice(2); + } + + // TODO change to match gCloudSecret format + static gcloudSecret() { + return faker.random.hexaDecimal(128).slice(2); + } + + static promiseId() { + return keccak256(faker.random.alpha(64)).toString("hex"); + } + + static title() { + return faker.random.words(3); + } + + static description() { + return faker.random.words(6); + } + + static quantity() { + return faker.random.number({ min: 1, max: 20 }); + } + + static category() { + return faker.random.arrayElement([ + "Accessories", + "Automobiles & Motorcycles", + "Beauty & Health", + "Books", + "Clothes", + "Electronics", + "Furniture", + "Home & Garden", + "Jewelry", + "Kids", + ]); + } + + static pastDateUnixMillis() { + return ( + Date.now() - + Time.daysInMilliseconds(2) - + faker.random.number({ + min: -Time.oneDayInMilliseconds(), + max: Time.oneDayInMilliseconds(), + }) + ); + } + + static pastDateUnixMillisBefore(otherDateUnixMillis) { + return ( + otherDateUnixMillis - + Time.daysInMilliseconds(2) + + faker.random.number({ + min: -Time.oneDayInMilliseconds(), + max: Time.oneDayInMilliseconds(), + }) + ); + } + + static pastDateUnixMillisAfter(otherDateUnixMillis) { + const nowMillis = Date.now(); + const millisSinceOther = nowMillis - otherDateUnixMillis; + return ( + otherDateUnixMillis + + faker.random.number({ min: 1, max: millisSinceOther - 1 }) + ); + } + + static currentDateUnixMillis() { + return Date.now(); + } + + static futureDateUnixMillis() { + return ( + Date.now() + + Time.daysInMilliseconds(2) + + faker.random.number({ + min: -Time.oneDayInMilliseconds(), + max: Time.oneDayInMilliseconds(), + }) + ); + } + + static futureDateUnixMillisBefore(otherDateUnixMillis) { + const nowMillis = Date.now(); + const millisUntilOther = otherDateUnixMillis - nowMillis; + return ( + otherDateUnixMillis - + faker.random.number({ min: 1, max: millisUntilOther - 1 }) + ); + } + + static futureDateUnixMillisAfter(otherDateUnixMillis) { + return ( + otherDateUnixMillis + + Time.daysInMilliseconds(2) + + faker.random.number({ + min: -Time.oneDayInMilliseconds(), + max: Time.oneDayInMilliseconds(), + }) + ); + } + + static monetaryAmount(options = {}) { + return ethers.utils + .parseEther( + faker.random + .float({ + min: options.min || 0.00001, + max: options.max || 0.01, + precision: 0.0000000000001, + }) + .toString() + ) + .toString(); + } + + static price() { + return Random.monetaryAmount({ min: 0.00001, max: 0.01 }); + } + + static deposit() { + return Random.monetaryAmount({ min: 0.000001, max: 0.001 }); + } + + static location() { + return JSON.stringify({ + country: faker.address.country(), + city: faker.address.city(), + addressLineOne: faker.address.streetAddress(), + addressLineTwo: faker.address.streetAddress(), + postcode: faker.address.zipCode(), + }); + } + + static contact() { + return faker.phone.phoneNumber(); + } + + static conditions() { + return faker.random.arrayElement(["new", "used"]); + } + + static eventName() { + const events = [ + "LogVoucherDelivered", + "LogOrderCreated", + "LogVoucherSetFaultCancel", + "LogVoucherFaultCancel", + "LogVoucherComplain", + "LogVoucherRedeemed", + "LogVoucherRefunded", + "Transfer", + "TransferSingle", + "TransferBatch", + ]; + + return events[faker.random.number({ min: 0, max: 9 })]; + } + + static digit() { + return faker.random.arrayElement([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); + } + + static hexDigit() { + return faker.random.arrayElement([ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + "a", + "b", + "c", + "d", + "e", + "f", + ]); + } + + static uint256() { + const digits = [1]; + for (var i = 0; i < 76; i++) { + digits.push(Random.digit()); + } + return digits.join(""); + } + + static uuid() { + return uuidv4(); + } + + static file(overrides = {}) { + const defaultFileName = `${this.uuid()}.png`; + const defaultPath = "test/fixtures/valid-image-1.png"; + const defaultMimeType = "image/png"; + const defaultFolder = this.uuid(); + + return { + originalname: overrides.fileName || defaultFileName, + path: overrides.path || defaultPath, + mimetype: overrides.mimeType || defaultMimeType, + folder: overrides.folder || defaultFolder, + }; + } + + static voucherSupplyId() { + const digits = []; + for (var i = 0; i < 24; i++) { + digits.push(Random.hexDigit()); + } + return digits.join(""); + } + + static user(overrides = {}) { + return new User({ + address: Random.address(), + nonce: Random.nonce(), + role: Random.userRole(), + ...overrides, + }); + } + + static voucherSupplyMetadata(overrides = {}) { + return { + title: Random.title(), + qty: Random.quantity(), + category: Random.category(), + startDate: Random.currentDateUnixMillis(), + expiryDate: Random.futureDateUnixMillis(), + offeredDate: Random.pastDateUnixMillis(), + price: Random.price(), + buyerDeposit: Random.deposit(), + sellerDeposit: Random.deposit(), + description: Random.description(), + location: Random.location(), + contact: Random.contact(), + conditions: Random.conditions(), + _correlationId: Random.uint256(), + _tokenIdSupply: Random.uint256(), + _paymentType: Random.paymentType(), + blockchainAnchored: true, + ...overrides, + }; + } + + static fileRefType() { + return faker.random.arrayElement(["document", "image"]); + } + + static fileRefUrl() { + const bucketName = faker.random.alpha(10); + const subFolderName = this.uuid(); + const fileName = faker.random.alpha(10); + + return `https://storage.googleapis.com/${bucketName}/${subFolderName}/${fileName}`; + } + + static fileRef(overrides = {}) { + return { + url: Random.fileRefUrl(), + type: Random.fileRefType(), + ...overrides, + }; + } + + static voucherMetadata(overrides = {}) { + return { + _tokenIdSupply: Random.uint256(), + _tokenIdVoucher: Random.uint256(), + _holder: Random.address(), + _issuer: Random.address(), + _correlationId: Random.uint256(), + blockchainAnchored: true, + ...overrides, + }; + } + + static voucherAttributes(overrides = {}) { + // Create happy path redeemed an finalized voucher by default + const finalizeUnixMillis = Random.pastDateUnixMillis(); + const redeemUnixMillis = Random.pastDateUnixMillisBefore( + finalizeUnixMillis + ); + const commitUnixMillis = Random.pastDateUnixMillisBefore(redeemUnixMillis); + + // Allow voucher metadata to be passed as overrides and do the right thing + const voucherOwner = overrides._issuer || Random.address().toLowerCase(); + delete overrides._issuer; + + return { + supplyID: Random.documentId().toString(), + _holder: Random.address().toLowerCase(), + _tokenIdSupply: Random.uint256(), + _tokenIdVoucher: Random.uint256(), + [voucherStatuses.COMMITTED]: commitUnixMillis, + [voucherStatuses.CANCELLED]: null, + [voucherStatuses.COMPLAINED]: null, + [voucherStatuses.REDEEMED]: redeemUnixMillis, + [voucherStatuses.REFUNDED]: null, + [voucherStatuses.FINALIZED]: finalizeUnixMillis, + voucherOwner, + actionDate: commitUnixMillis, + ...overrides, + }; + } + + static paymentType() { + return faker.random.number({ min: 1, max: 4 }); + } + + static paymentMetadata(overrides = {}) { + return { + _tokenIdVoucher: Random.uint256(), + _to: Random.address(), + _payment: Random.monetaryAmount(), + _type: Random.paymentType(), + txHash: Random.transactionHash(), + ...overrides, + }; + } + + static eventMetadata(overrides = {}) { + const account = Random.account(); + + return { + name: Random.eventName(), + address: account.address, + _correlationId: Random.uint256(), + _tokenId: Random.uint256(), + ...overrides, + }; + } +} + +module.exports = Random; diff --git a/test/shared/helpers/RegExps.js b/test/shared/helpers/RegExps.js new file mode 100644 index 00000000..1924b887 --- /dev/null +++ b/test/shared/helpers/RegExps.js @@ -0,0 +1,6 @@ +const uuidV4Pattern = + "\\b[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}\\b"; + +const uuidV4 = new RegExp(uuidV4Pattern); + +module.exports = { uuidV4Pattern, uuidV4 }; diff --git a/test/shared/helpers/Signing.js b/test/shared/helpers/Signing.js new file mode 100644 index 00000000..38b154e1 --- /dev/null +++ b/test/shared/helpers/Signing.js @@ -0,0 +1,39 @@ +const ethers = require("ethers"); +const { signTypedData_v4 } = require("eth-sig-util"); + +const EIP712Domain = [ + { name: "name", type: "string" }, + { name: "version", type: "string" }, + { name: "chainId", type: "uint256" }, + { name: "verifyingContract", type: "address" }, +]; +const AuthSignature = [{ name: "value", type: "string" }]; + +const Types = { + EIP712Domain, + AuthSignature, +}; + +class Signing { + static async signAuthenticationMessage(account, nonce, domain) { + const types = { + EIP712Domain, + AuthSignature, + }; + const message = { + value: `Authentication message: ${nonce}`, + }; + const data = { + domain, + types, + message, + primaryType: "AuthSignature", + }; + + return ethers.utils.splitSignature( + await signTypedData_v4(account.privateKey, { data }) + ); + } +} + +module.exports = { Signing, Types }; diff --git a/test/shared/helpers/Streams.js b/test/shared/helpers/Streams.js new file mode 100644 index 00000000..16610a05 --- /dev/null +++ b/test/shared/helpers/Streams.js @@ -0,0 +1,18 @@ +const Promises = require("./Promises"); + +const readBinary = (stream, cb) => { + let data = ""; + + stream.setEncoding("binary"); + stream.once("error", (err) => { + return cb(err); + }); + stream.on("data", (chunk) => (data += chunk)); + stream.on("end", () => { + return cb(null, data); + }); +}; + +const readBinaryPromise = Promises.promisify(readBinary); + +module.exports = { readBinary, readBinaryPromise }; diff --git a/test/shared/helpers/Time.js b/test/shared/helpers/Time.js new file mode 100644 index 00000000..0f8209a2 --- /dev/null +++ b/test/shared/helpers/Time.js @@ -0,0 +1,23 @@ +class Time { + static oneDayInSeconds() { + return 24 * 60 * 60; + } + + static oneDayInMilliseconds() { + return Time.oneDayInSeconds() * 1000; + } + + static daysInMilliseconds(days) { + return days * Time.oneDayInMilliseconds(); + } + + static async boundaries(fn, fuzz = 10) { + const before = Date.now(); + const result = await fn(); + const after = Date.now(); + + return [before - fuzz, after + fuzz, after - before, result]; + } +} + +module.exports = Time; diff --git a/test/shared/helpers/Tokens.js b/test/shared/helpers/Tokens.js new file mode 100644 index 00000000..3f9dbdfa --- /dev/null +++ b/test/shared/helpers/Tokens.js @@ -0,0 +1,23 @@ +const jwt = require("jsonwebtoken"); + +const Time = require("./Time"); + +class Tokens { + static sign(payload, secret) { + return jwt.sign(payload, secret); + } + + static verify(token, secret) { + return jwt.verify(token, secret); + } + + static validityInSeconds(payload) { + return payload.exp - payload.iat; + } + + static validityInDays(payload) { + return this.validityInSeconds(payload) / Time.oneDayInSeconds(); + } +} + +module.exports = Tokens; diff --git a/test/unit/api/middlewares/FileStorageMiddleware.test.js b/test/unit/api/middlewares/FileStorageMiddleware.test.js new file mode 100644 index 00000000..4fc2c1fa --- /dev/null +++ b/test/unit/api/middlewares/FileStorageMiddleware.test.js @@ -0,0 +1,307 @@ +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +chai.use(chaiAsPromised); + +const { expect } = chai; + +const fs = require("fs"); +const MockExpressRequest = require("mock-express-request"); +const FormData = require("form-data"); + +const FakeStorage = require("../../../shared/fakes/utils/FakeStorage"); +const FileValidator = require("../../../../src/services/FileValidator"); +const FileStorageMiddleware = require("../../../../src/api/middlewares/FileStorageMiddleware"); +const Promises = require("../../../shared/helpers/Promises"); +const Streams = require("../../../shared/helpers/Streams"); +const RegExps = require("../../../shared/helpers/RegExps"); + +describe("FileStorageMiddleware", () => { + context("storeFiles", () => { + it("uploads the files using the provided storage", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, [ + "test/fixtures/valid-image-1.png", + "test/fixtures/valid-image-2.jpg", + ]); + const response = {}; + + const [file1Data] = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-1.png") + ); + const [file2Data] = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-2.jpg") + ); + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await storeFiles(request, response); + + const files = storage.handleFileCalls; + expect(files.length).to.eql(2); + + const file1 = files[0].file; + expect(file1.data).to.eql(file1Data); + expect(file1.size).to.eql(file1Data.length); + expect(file1.bucket).to.match(RegExps.uuidV4); + expect(file1.key).to.match(RegExps.uuidV4); + expect(file1.location).to.eql("https://example.com/valid-image-1.png"); + expect(file1.contentType).to.eql("image/png"); + + const file2 = files[1].file; + expect(file2.data).to.eql(file2Data); + expect(file2.size).to.eql(file2Data.length); + expect(file2.bucket).to.match(RegExps.uuidV4); + expect(file2.key).to.match(RegExps.uuidV4); + expect(file2.location).to.eql("https://example.com/valid-image-2.jpg"); + expect(file2.contentType).to.eql("image/jpeg"); + }); + + it("adds the files to the request", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, [ + "test/fixtures/valid-image-1.png", + "test/fixtures/valid-image-2.jpg", + ]); + const response = {}; + + const [file1Data] = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-1.png") + ); + const [file2Data] = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-2.jpg") + ); + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await storeFiles(request, response); + + const files = request.files; + expect(files.length).to.eql(2); + + const file1 = files[0]; + expect(file1.size).to.eql(file1Data.length); + expect(file1.bucket).to.match(RegExps.uuidV4); + expect(file1.key).to.match(RegExps.uuidV4); + expect(file1.location).to.eql("https://example.com/valid-image-1.png"); + expect(file1.contentType).to.eql("image/png"); + + const file2 = files[1]; + expect(file2.size).to.eql(file2Data.length); + expect(file2.bucket).to.match(RegExps.uuidV4); + expect(file2.key).to.match(RegExps.uuidV4); + expect(file2.location).to.eql("https://example.com/valid-image-2.jpg"); + expect(file2.contentType).to.eql("image/jpeg"); + }); + + it("adds an empty array to the request when no files are present", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, []); + const response = {}; + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await storeFiles(request, response); + + expect(request.files).to.eql([]); + }); + + it("limits the allowed files to the provided maximum", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, [ + "test/fixtures/valid-image-1.png", + "test/fixtures/valid-image-2.jpg", + ]); + const response = {}; + + const [file1Data] = await Streams.readBinaryPromise( + fs.createReadStream("test/fixtures/valid-image-1.png") + ); + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + maximumFiles: 1, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await storeFiles(request, response); + + expect(request.files.length).to.eql(1); + + const file1 = request.files[0]; + expect(file1.size).to.eql(file1Data.length); + expect(file1.bucket).to.match(RegExps.uuidV4); + expect(file1.key).to.match(RegExps.uuidV4); + expect(file1.location).to.eql("https://example.com/valid-image-1.png"); + expect(file1.contentType).to.eql("image/png"); + }); + + it("removes all files when one file is too large", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, [ + "test/fixtures/valid-image-1.png", + "test/fixtures/greater-than-5MB.jpg", + ]); + const response = {}; + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await expect(storeFiles(request, response)).to.eventually.be.rejectedWith( + "Invalid file." + ); + + const removeFilesCall = storage.removeFilesCalls[0]; + const removedFiles = removeFilesCall.files; + + expect(removedFiles.length).to.eql(2); + expect(removedFiles[0].originalname).to.eql("valid-image-1.png"); + expect(removedFiles[0]).to.include.keys(["bucket", "key"]); + expect(removedFiles[1].originalname).to.eql("greater-than-5MB.jpg"); + expect(removedFiles[1]).to.include.keys(["bucket", "key"]); + + expect(request.files).to.eql([]); + }); + + it("removes all files when one file is too small", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, [ + "test/fixtures/valid-image-1.png", + "test/fixtures/less-than-10KB.png", + ]); + const response = {}; + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await expect(storeFiles(request, response)).to.eventually.be.rejectedWith( + "Invalid file." + ); + + const removeFilesCall = storage.removeFilesCalls[0]; + const removedFiles = removeFilesCall.files; + + expect(removedFiles.length).to.eql(2); + expect(removedFiles[0].originalname).to.eql("valid-image-1.png"); + expect(removedFiles[0]).to.include.keys(["bucket", "key"]); + expect(removedFiles[1].originalname).to.eql("less-than-10KB.png"); + expect(removedFiles[1]).to.include.keys(["bucket", "key"]); + + expect(request.files).to.eql([]); + }); + + it("removes all files when one file has an unsupported mime type", async () => { + const fieldName = "image"; + + const request = fileUploadRequest(fieldName, [ + "test/fixtures/valid-image-1.png", + "test/fixtures/malicious-fake-image.html", + ]); + const response = {}; + + const storage = FakeStorage.successful(); + const middleware = fileStorageMiddleware({ + storage, + fieldName, + }); + const storeFiles = Promises.promisify(middleware.storeFiles, middleware); + + await expect(storeFiles(request, response)).to.eventually.be.rejectedWith( + "Invalid file." + ); + + const removeFilesCall = storage.removeFilesCalls[0]; + const removedFiles = removeFilesCall.files; + + expect(removedFiles.length).to.eql(2); + expect(removedFiles[0].originalname).to.eql("valid-image-1.png"); + expect(removedFiles[0]).to.include.keys(["bucket", "key"]); + expect(removedFiles[1].originalname).to.eql("malicious-fake-image.html"); + expect(removedFiles[1]).to.include.keys(["bucket", "key"]); + + expect(request.files).to.eql([]); + }); + }); +}); + +const fileUploadRequest = (fieldName, paths) => { + const formData = new FormData(); + formData.append("title", "some-voucher"); + + paths.forEach((path) => { + formData.append(fieldName, fs.createReadStream(path)); + }); + + const request = new MockExpressRequest({ + method: "POST", + host: "localhost", + url: "/voucher-sets", + headers: formData.getHeaders(), + }); + + formData.pipe(request); + + return request; +}; + +const fileValidator = ({ + allowedMimeTypes = ["image/png", "image/jpeg"], + minimumFileSizeInKB = 10, + maximumFileSizeInKB = 5120, +}) => { + return new FileValidator( + allowedMimeTypes, + minimumFileSizeInKB, + maximumFileSizeInKB + ); +}; + +const fileStorageMiddleware = ({ + storage, + fieldName, + allowedMimeTypes = ["image/png", "image/jpeg"], + maximumFiles = 5, + minimumFileSizeInKB = 10, + maximumFileSizeInKB = 5120, +}) => { + return new FileStorageMiddleware( + fieldName, + maximumFiles, + fileValidator({ + allowedMimeTypes, + minimumFileSizeInKB, + maximumFileSizeInKB, + }), + storage + ); +}; diff --git a/test/unit/services/AuthenticationService.test.js b/test/unit/services/AuthenticationService.test.js new file mode 100644 index 00000000..dd337b14 --- /dev/null +++ b/test/unit/services/AuthenticationService.test.js @@ -0,0 +1,107 @@ +const { expect } = require("chai"); + +const AuthenticationService = require("../../../src/services/AuthenticationService"); +const userRoles = require("../../../src/database/User/userRoles"); + +const Tokens = require("../../shared/helpers/Tokens"); +const Random = require("../../shared/helpers/Random"); + +describe("AuthenticationService", () => { + context("generateToken", () => { + it( + "generates a token for the user using the configured " + + "token secret, and 7 days validity by default", + () => { + const tokenSecret = Random.tokenSecret(); + + const address = Random.address(); + const role = userRoles.USER; + const user = Random.user({ address, role }); + const authenticationService = new AuthenticationService(tokenSecret); + + const token = authenticationService.generateToken(user); + + const result = Tokens.verify(token, tokenSecret); + const resultValidityInDays = Tokens.validityInDays(result); + + expect(result.user).to.eql(address.toLowerCase()); + expect(result.role).to.eql(role); + expect(resultValidityInDays).to.eql(7); + } + ); + + it( + "generates a token for the user using the configured " + + "token secret, and provided validity when specified", + () => { + const tokenSecret = Random.tokenSecret(); + + const address = Random.address(); + const role = userRoles.USER; + const user = Random.user({ address, role }); + + const validityInSeconds = 300; + + const authenticationService = new AuthenticationService(tokenSecret); + + const token = authenticationService.generateToken( + user, + validityInSeconds + ); + + const result = Tokens.verify(token, tokenSecret); + const resultValidityInSeconds = Tokens.validityInSeconds(result); + + expect(result.user).to.eql(address.toLowerCase()); + expect(result.role).to.eql(role); + expect(resultValidityInSeconds).to.eql(300); + } + ); + }); + + context("verifyToken", () => { + it("verifies a token signed using the configured token secret returning the payload", () => { + const address = Random.address(); + const role = Random.userRole(); + const tokenSecret = Random.tokenSecret(); + + const authenticationService = new AuthenticationService(tokenSecret); + + const token = Tokens.sign( + { + user: address.toLowerCase(), + role, + }, + tokenSecret + ); + + const result = authenticationService.verifyToken(token); + + expect(result.user).to.eql(address.toLowerCase()); + expect(result.role).to.eql(role); + }); + + it("throws when verifying a token signed using a different token secret", () => { + const address = Random.address(); + const role = Random.userRole(); + const signingTokenSecret = Random.tokenSecret(); + const verifyingTokenSecret = Random.tokenSecret(); + + const authenticationService = new AuthenticationService( + verifyingTokenSecret + ); + + const token = Tokens.sign( + { + user: address.toLowerCase(), + role, + }, + signingTokenSecret + ); + + expect(() => { + authenticationService.verifyToken(token); + }).to.throw("invalid signature"); + }); + }); +}); diff --git a/test/unit/services/ConfigurationService.test.js b/test/unit/services/ConfigurationService.test.js new file mode 100644 index 00000000..c42c770a --- /dev/null +++ b/test/unit/services/ConfigurationService.test.js @@ -0,0 +1,423 @@ +const { expect } = require("chai"); + +const ConfigurationService = require("../../../src/services/ConfigurationService"); + +const withEnv = (name, value, fn) => { + const before = process.env[name]; + process.env[name] = value; + fn(); + process.env[name] = before; +}; + +describe("ConfigurationService", () => { + context("for database connection string", () => { + it("uses environment variable when present", () => { + withEnv("DB_CONNECTION_STRING", "mongodb://localhost:27017", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.databaseConnectionString).to.eql( + "mongodb://localhost:27017" + ); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("DB_CONNECTION_STRING", "mongodb://localhost:27017", () => { + const configurationService = new ConfigurationService({ + databaseConnectionString: "mongodb://mongo.example.com:27017", + }); + expect(configurationService.databaseConnectionString).to.eql( + "mongodb://mongo.example.com:27017" + ); + }); + }); + + it("uses localhost:27017 when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.databaseConnectionString).to.eql( + "mongodb://localhost:27017" + ); + }); + }); + + context("for database name", () => { + it("uses environment variable when present", () => { + withEnv("DB_NAME", "service", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.databaseName).to.eql("service"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("DB_NAME", "service", () => { + const configurationService = new ConfigurationService({ + databaseName: "backend", + }); + expect(configurationService.databaseName).to.eql("backend"); + }); + }); + + it("uses api when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.databaseName).to.eql("api"); + }); + }); + + context("for database username", () => { + it("uses environment variable when present", () => { + withEnv("DB_USERNAME", "user", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.databaseUsername).to.eql("user"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("DB_USERNAME", "user", () => { + const configurationService = new ConfigurationService({ + databaseUsername: "app", + }); + expect(configurationService.databaseUsername).to.eql("app"); + }); + }); + + it("uses admin when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.databaseUsername).to.eql("admin"); + }); + }); + + context("for database password", () => { + it("uses environment variable when present", () => { + withEnv("DB_PASSWORD", "password", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.databasePassword).to.eql("password"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("DB_PASSWORD", "password", () => { + const configurationService = new ConfigurationService({ + databasePassword: "pass", + }); + expect(configurationService.databasePassword).to.eql("pass"); + }); + }); + + it("uses admin when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.databasePassword).to.eql("secret"); + }); + }); + + context("for token secret", () => { + it("uses environment variable by default", () => { + withEnv("TOKEN_SECRET", "abcd123", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.tokenSecret).to.eql("abcd123"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("TOKEN_SECRET", "abcd123", () => { + const configurationService = new ConfigurationService({ + tokenSecret: "efgh456", + }); + expect(configurationService.tokenSecret).to.eql("efgh456"); + }); + }); + + it("returns undefined when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.tokenSecret).to.be.undefined; + }); + }); + + context("for gcloud secret", () => { + it("uses environment variable by default", () => { + withEnv("GCLOUD_SECRET", "abcd123", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.gcloudSecret).to.eql("abcd123"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("GCLOUD_SECRET", "abcd123", () => { + const configurationService = new ConfigurationService({ + gcloudSecret: "efgh456", + }); + expect(configurationService.gcloudSecret).to.eql("efgh456"); + }); + }); + + it("returns undefined when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.gcloudSecret).to.be.undefined; + }); + }); + + context("for image upload file field name", () => { + it("uses environment variable by default", () => { + withEnv("IMAGE_UPLOAD_FILE_FIELD_NAME", "someField", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadFileFieldName).to.eql( + "someField" + ); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("IMAGE_UPLOAD_FILE_FIELD_NAME", "someField", () => { + const configurationService = new ConfigurationService({ + imageUploadFileFieldName: "otherField", + }); + expect(configurationService.imageUploadFileFieldName).to.eql( + "otherField" + ); + }); + }); + + it("returns fileToUpload when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadFileFieldName).to.eql( + "fileToUpload" + ); + }); + }); + + context("for image upload storage engine", () => { + it("uses environment variable by default", () => { + withEnv("IMAGE_UPLOAD_STORAGE_ENGINE", "AWS", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadStorageEngine).to.eql("AWS"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("IMAGE_UPLOAD_STORAGE_ENGINE", "AWS", () => { + const configurationService = new ConfigurationService({ + imageUploadStorageEngine: "GCP", + }); + expect(configurationService.imageUploadStorageEngine).to.eql("GCP"); + }); + }); + + it("returns AWS when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadStorageEngine).to.eql("AWS"); + }); + }); + + context("for image upload storage bucket name", () => { + it("uses new environment variable by default", () => { + withEnv("IMAGE_UPLOAD_STORAGE_BUCKET_NAME", "some-new-bucket", () => { + withEnv("VOUCHERS_BUCKET", "some-old-bucket", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadStorageBucketName).to.eql( + "some-new-bucket" + ); + }); + }); + }); + + it("uses old environment variable if new not set", () => { + withEnv("VOUCHERS_BUCKET", "some-old-bucket", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadStorageBucketName).to.eql( + "some-old-bucket" + ); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("IMAGE_UPLOAD_STORAGE_BUCKET_NAME", "some-bucket", () => { + const configurationService = new ConfigurationService({ + imageUploadStorageBucketName: "some-other-bucket", + }); + expect(configurationService.imageUploadStorageBucketName).to.eql( + "some-other-bucket" + ); + }); + }); + + it("returns undefined when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadStorageBucketName).to.be.undefined; + }); + }); + + context("for image upload supported mime types", () => { + it("uses environment variable by default", () => { + withEnv( + "IMAGE_UPLOAD_SUPPORTED_MIME_TYPES", + "image/gif,image/png", + () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadSupportedMimeTypes).to.eql([ + "image/gif", + "image/png", + ]); + } + ); + }); + + it("uses the provided override when supplied", () => { + withEnv( + "IMAGE_UPLOAD_SUPPORTED_MIME_TYPES", + "image/gif,image/png", + () => { + const configurationService = new ConfigurationService({ + imageUploadSupportedMimeTypes: ["image/jpeg"], + }); + expect(configurationService.imageUploadSupportedMimeTypes).to.eql([ + "image/jpeg", + ]); + } + ); + }); + + it("returns jpeg or png when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadSupportedMimeTypes).to.eql([ + "image/jpeg", + "image/png", + ]); + }); + }); + + context("for image upload minimum file size", () => { + it("uses environment variable by default", () => { + withEnv("IMAGE_UPLOAD_MINIMUM_FILE_SIZE_IN_KB", "15", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadMinimumFileSizeInKB).to.eql(15); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("IMAGE_UPLOAD_MINIMUM_FILE_SIZE_IN_KB", "10", () => { + const configurationService = new ConfigurationService({ + imageUploadMinimumFileSizeInKB: 20, + }); + expect(configurationService.imageUploadMinimumFileSizeInKB).to.eql(20); + }); + }); + + it("returns 10KBs when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadMinimumFileSizeInKB).to.eql(10); + }); + }); + + context("for image upload maximum file size", () => { + it("uses environment variable by default", () => { + withEnv("IMAGE_UPLOAD_MAXIMUM_FILE_SIZE_IN_KB", "10240", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadMaximumFileSizeInKB).to.eql( + 10240 + ); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("IMAGE_UPLOAD_MAXIMUM_FILE_SIZE_IN_KB", "5120", () => { + const configurationService = new ConfigurationService({ + imageUploadMaximumFileSizeInKB: 7168, + }); + expect(configurationService.imageUploadMaximumFileSizeInKB).to.eql( + 7168 + ); + }); + }); + + it("returns 5120KBs when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadMaximumFileSizeInKB).to.eql(5120); + }); + }); + + context("for image upload maximum files", () => { + it("uses environment variable by default", () => { + withEnv("IMAGE_UPLOAD_MAXIMUM_FILES", "15", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.imageUploadMaximumFiles).to.eql(15); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("IMAGE_UPLOAD_MAXIMUM_FILES", "15", () => { + const configurationService = new ConfigurationService({ + imageUploadMaximumFiles: 20, + }); + expect(configurationService.imageUploadMaximumFiles).to.eql(20); + }); + }); + + it("returns 10 when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.imageUploadMaximumFiles).to.eql(10); + }); + }); + + context("for superadmin username", () => { + it("uses environment variable by default", () => { + withEnv("SUPERADMIN_USERNAME", "supremeadmin", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.superadminUsername).to.eql("supremeadmin"); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("SUPERADMIN_USERNAME", "supremeadmin", () => { + const configurationService = new ConfigurationService({ + superadminUsername: "ultimateadmin", + }); + expect(configurationService.superadminUsername).to.eql("ultimateadmin"); + }); + }); + + it("returns undefined when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.superadminUsername).to.be.undefined; + }); + }); + + context("for superadmin password", () => { + it("uses environment variable by default", () => { + withEnv("SUPERADMIN_PASSWORD", "extremelysecret", () => { + const configurationService = new ConfigurationService(); + expect(configurationService.superadminPassword).to.eql( + "extremelysecret" + ); + }); + }); + + it("uses the provided override when supplied", () => { + withEnv("SUPERADMIN_PASSWORD", "extremelysecret", () => { + const configurationService = new ConfigurationService({ + superadminPassword: "particularlysecret", + }); + expect(configurationService.superadminPassword).to.eql( + "particularlysecret" + ); + }); + }); + + it("returns undefined when no environment variable or override", () => { + const configurationService = new ConfigurationService(); + + expect(configurationService.superadminPassword).to.be.undefined; + }); + }); +});